godot-mcp-scene-builder
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMCP Scene Builder
MCP Scene Builder
High-level agentic interface for low-level Godot MCP tools to build scenes from scratch.
用于底层Godot MCP工具的高级智能代理界面,可从头开始构建场景。
NEVER Do in MCP Scene Building
MCP场景构建中的禁止操作
- NEVER skip design phase — Jumping straight to without planning hierarchy = spaghetti scenes. ALWAYS draft node tree first.
mcp_godot_add_node - NEVER assume scene exists before adding nodes — on non-existent scene = error. Must call
mcp_godot_add_nodeFIRST.mcp_godot_create_scene - NEVER use absolute paths in MCP calls — breaks on other machines. Use
texturePath="C:/Users/..."paths only.res:// - NEVER skip verification step — MCP creates .tscn files but doesn't validate. ALWAYS call or
mcp_godot_run_projectto verify no errors.mcp_godot_launch_editor - NEVER add CollisionShape2D without setting shape — MCP adds node but property is null by default. Must manually set or scene is broken.
shape
- 绝对不要跳过设计阶段 — 不规划层级结构就直接调用会导致混乱的场景。务必先草拟节点树。
mcp_godot_add_node - 绝对不要在添加节点前假设场景已存在 — 在不存在的场景上调用会报错。必须先调用
mcp_godot_add_node。mcp_godot_create_scene - 绝对不要在MCP调用中使用绝对路径 — 在其他机器上会失效。仅使用
texturePath="C:/Users/..."路径。res:// - 绝对不要跳过验证步骤 — MCP会创建.tscn文件,但不会进行验证。务必调用或
mcp_godot_run_project来确认无错误。mcp_godot_launch_editor - 绝对不要在未设置形状的情况下添加CollisionShape2D — MCP会添加节点,但属性默认是null。必须手动设置,否则场景会损坏。
shape
Available Scripts
可用脚本
scene_builder_manifest.gd
scene_builder_manifest.gd
Resource definition for declarative scene building via MCP.
用于通过MCP进行声明式场景构建的资源定义。
Available MCP Tools Summary
可用MCP工具汇总
- : Initializes a
mcp_godot_create_scenefile..tscn - : Adds a node to an existing scene.
mcp_godot_add_node - : Assigns a texture to a
mcp_godot_load_spritenode.Sprite2D - : Spawns the Godot editor to verify the result.
mcp_godot_run_project
- : 初始化一个
mcp_godot_create_scene文件。.tscn - : 向现有场景中添加节点。
mcp_godot_add_node - : 为
mcp_godot_load_sprite节点分配纹理。Sprite2D - : 启动Godot编辑器以验证结果。
mcp_godot_run_project
Workflow: Building a Scene
工作流:构建场景
When asked to "Create a scene", "Make a character", or "Setup a level":
-
Design Phase:
- Determine the Root node type (e.g., ,
CharacterBody2D,Node3D).Control - Draft a node hierarchy (e.g., Root -> Sprite2D, CollisionShape2D).
- Determine the Root node type (e.g.,
-
Execution Phase (MCP Pipeline):
- Step 1: Call to create the file.
mcp_godot_create_scene - Step 2: Sequentially call for each child.
mcp_godot_add_node - Step 3 (Optional): If sprites are needed, call .
mcp_godot_load_sprite - Step 4: (Critical for verifying) Call or
mcp_godot_run_project.mcp_godot_launch_editor
- Step 1: Call
-
Optimization Phase:
- Apply standards when attaching scripts.
godot-gdscript-mastery
- Apply
当收到“创建场景”、“制作角色”或“设置关卡”的请求时:
-
设计阶段:
- 确定根节点类型(如、
CharacterBody2D、Node3D)。Control - 草拟节点层级结构(如根节点 -> Sprite2D、CollisionShape2D)。
- 确定根节点类型(如
-
执行阶段(MCP流水线):
- 步骤1: 调用创建文件。
mcp_godot_create_scene - 步骤2: 依次为每个子节点调用。
mcp_godot_add_node - 步骤3(可选): 如果需要精灵,调用。
mcp_godot_load_sprite - 步骤4: (验证关键步骤)调用或
mcp_godot_run_project。mcp_godot_launch_editor
- 步骤1: 调用
-
优化阶段:
- 附加脚本时遵循标准。
godot-gdscript-mastery
- 附加脚本时遵循
Example: Creating a Basic 2D Player
示例:创建基础2D玩家
Prompt: "Create a 2D player scene with a sprite and collision."
Plan:
mcp_godot_create_scene(scenePath="player.tscn", rootNodeType="CharacterBody2D")mcp_godot_add_node(scenePath="player.tscn", nodeType="Sprite2D", nodeName="Skin", parentNodePath=".")mcp_godot_add_node(scenePath="player.tscn", nodeType="CollisionShape2D", nodeName="Hitbox", parentNodePath=".")mcp_godot_load_sprite(scenePath="player.tscn", nodePath="Skin", texturePath="res://icon.svg")
请求: "创建一个带有精灵和碰撞的2D玩家场景。"
计划:
mcp_godot_create_scene(scenePath="player.tscn", rootNodeType="CharacterBody2D")mcp_godot_add_node(scenePath="player.tscn", nodeType="Sprite2D", nodeName="Skin", parentNodePath=".")mcp_godot_add_node(scenePath="player.tscn", nodeType="CollisionShape2D", nodeName="Hitbox", parentNodePath=".")mcp_godot_load_sprite(scenePath="player.tscn", nodePath="Skin", texturePath="res://icon.svg")
Verification
验证
The agent must verify that the scene opens in the editor without errors.
代理必须确保场景能在编辑器中无错误打开。
Reference
参考
- Master Skill: godot-master
- 主技能: godot-master