@beremaran/godot-agent-loop 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +23 -0
- package/README.md +925 -0
- package/addons/godot_agent_loop/LICENSE +23 -0
- package/addons/godot_agent_loop/README.md +31 -0
- package/addons/godot_agent_loop/plugin.cfg +8 -0
- package/addons/godot_agent_loop/plugin.gd +417 -0
- package/agent-plugin/.claude-plugin/plugin.json +19 -0
- package/agent-plugin/.codex-plugin/plugin.json +37 -0
- package/agent-plugin/.mcp.json +14 -0
- package/agent-plugin/adapter-manifest.json +45 -0
- package/agent-plugin/pi/extension.ts +136 -0
- package/agent-plugin/skills/build-godot-game/SKILL.md +41 -0
- package/agent-plugin/skills/debug-godot-game/SKILL.md +37 -0
- package/agent-plugin/skills/ship-godot-game/SKILL.md +46 -0
- package/agent-plugin/skills/ship-godot-game/agents/openai.yaml +4 -0
- package/agent-plugin/skills/verify-godot-change/SKILL.md +35 -0
- package/build/authoring-session-manager.js +237 -0
- package/build/domain-tool-registries.js +207 -0
- package/build/editor-bridge-protocol.js +1 -0
- package/build/editor-connection.js +112 -0
- package/build/editor-mutation-guard.js +30 -0
- package/build/editor-plugin-installer.js +220 -0
- package/build/engine-api/extension_api-4.7.stable.official.5b4e0cb0f.json +356830 -0
- package/build/game-command-service.js +49 -0
- package/build/game-connection.js +337 -0
- package/build/godot-executable.js +156 -0
- package/build/godot-process-manager.js +112 -0
- package/build/godot-subprocess.js +23 -0
- package/build/headless-operation-runner.js +68 -0
- package/build/headless-operation-service.js +65 -0
- package/build/index.js +478 -0
- package/build/interaction-server-installer.js +234 -0
- package/build/opencode-setup.js +199 -0
- package/build/project-support.js +219 -0
- package/build/runtime-protocol.js +202 -0
- package/build/scripts/godot_operations.gd +1534 -0
- package/build/scripts/mcp_editor_plugin.gd +417 -0
- package/build/scripts/mcp_interaction_server.gd +1255 -0
- package/build/scripts/mcp_runtime/audio_animation_domain.gd +568 -0
- package/build/scripts/mcp_runtime/command_params.gd +339 -0
- package/build/scripts/mcp_runtime/core_domain.gd +591 -0
- package/build/scripts/mcp_runtime/input_domain.gd +695 -0
- package/build/scripts/mcp_runtime/networking_domain.gd +356 -0
- package/build/scripts/mcp_runtime/physics_domain.gd +653 -0
- package/build/scripts/mcp_runtime/privileged_command_policy.gd +81 -0
- package/build/scripts/mcp_runtime/rendering_domain.gd +807 -0
- package/build/scripts/mcp_runtime/runtime_domain.gd +108 -0
- package/build/scripts/mcp_runtime/scene_2d_domain.gd +527 -0
- package/build/scripts/mcp_runtime/scene_3d_domain.gd +573 -0
- package/build/scripts/mcp_runtime/system_domain.gd +277 -0
- package/build/scripts/mcp_runtime/ui_domain.gd +619 -0
- package/build/scripts/mcp_runtime/variant_codec.gd +335 -0
- package/build/scripts/validate_script.gd +28 -0
- package/build/server-instructions.js +11 -0
- package/build/session-timing.js +20 -0
- package/build/tool-argument-validation.js +120 -0
- package/build/tool-definitions.js +2727 -0
- package/build/tool-handlers/game-tool-handlers.js +1345 -0
- package/build/tool-handlers/lifecycle-tool-handlers.js +346 -0
- package/build/tool-handlers/project-handler-services.js +1458 -0
- package/build/tool-handlers/project-tool-handlers.js +1506 -0
- package/build/tool-handlers/visual-regression-service.js +139 -0
- package/build/tool-manifest.js +1193 -0
- package/build/tool-mutation-policy.js +122 -0
- package/build/tool-registry.js +34 -0
- package/build/tool-surface.js +70 -0
- package/build/utils.js +273 -0
- package/package.json +110 -0
- package/product.json +52 -0
- package/scripts/prepare-package.js +42 -0
package/README.md
ADDED
|
@@ -0,0 +1,925 @@
|
|
|
1
|
+
|
|
2
|
+
# Godot Agent Loop
|
|
3
|
+
|
|
4
|
+
**Build it. Play it. Prove it.**
|
|
5
|
+
|
|
6
|
+
An evidence-first MCP automation loop for Godot 4.
|
|
7
|
+
|
|
8
|
+
[](https://modelcontextprotocol.io/introduction)
|
|
9
|
+
[](https://godotengine.org)
|
|
10
|
+
[](https://www.typescriptlang.org/)
|
|
11
|
+
[](https://opensource.org/licenses/MIT)
|
|
12
|
+
|
|
13
|
+
Other integrations give agents tools. Godot Agent Loop gives them a tested
|
|
14
|
+
feedback loop to author, run, observe, playtest, and independently verify Godot
|
|
15
|
+
games.
|
|
16
|
+
|
|
17
|
+
[](assets/demo/godot-agent-loop-launch.mp4)
|
|
18
|
+
|
|
19
|
+
[Watch the 65-second proof](assets/demo/godot-agent-loop-launch.mp4) ·
|
|
20
|
+
[Read the exact run evidence](docs/launch/launch-evidence.md) ·
|
|
21
|
+
[Inspect the resulting project](examples/launch-demo)
|
|
22
|
+
|
|
23
|
+
<!-- generated-coverage-badge:start -->
|
|
24
|
+
[](docs/coverage/coverage-report.md)
|
|
25
|
+
<!-- generated-coverage-badge:end -->
|
|
26
|
+
|
|
27
|
+
## Start the loop
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
claude mcp add godot-agent-loop -- npx -y @beremaran/godot-agent-loop@1.0.0
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Then point the agent at a project directory—or an empty directory—and describe
|
|
34
|
+
the playable result. The server teaches and supports this loop:
|
|
35
|
+
|
|
36
|
+
```text
|
|
37
|
+
author → validate → run → observe → playtest → verify → refine
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
The compact default surface exposes 39 tools for that loop. `godot_tools`
|
|
41
|
+
searches, describes, and dispatches the specialized catalog only when needed.
|
|
42
|
+
Runtime and editor bridges are installed transiently and cleaned up
|
|
43
|
+
automatically.
|
|
44
|
+
|
|
45
|
+
## Proof before claims
|
|
46
|
+
|
|
47
|
+
- **167/167 tools** exercised through the complete MCP-to-Godot path.
|
|
48
|
+
- **358 public actions** traced to resolving tests.
|
|
49
|
+
- **201 full-path MCP E2E tests** in the current Godot 4.7 release candidate.
|
|
50
|
+
- **81.56% smaller default schema surface**, with all specialized tools still
|
|
51
|
+
available through `godot_tools`.
|
|
52
|
+
- A cold agent built and independently verified a playable win/lose game with
|
|
53
|
+
zero human corrections in 391.795 seconds using 103 MCP calls and no built-in
|
|
54
|
+
tools; see the [launch evidence](docs/launch/launch-evidence.md) and
|
|
55
|
+
[deterministic acceptance record](docs/golden-agent-acceptance.md).
|
|
56
|
+
- Privileged reflection, code execution, and networking groups are denied by
|
|
57
|
+
default, and the editor provides a human **Pause Agent** control.
|
|
58
|
+
|
|
59
|
+
Support is deliberately bounded: Godot 4.4 is the compatibility floor and 4.7
|
|
60
|
+
the primary target; editor UI/rendering depth is verified on Linux, while
|
|
61
|
+
Windows and macOS receive the documented portable acceptance path. Full
|
|
62
|
+
debugger automation, native extension builds, and unbounded engine control are
|
|
63
|
+
not claimed.
|
|
64
|
+
|
|
65
|
+
## Release 1.0
|
|
66
|
+
|
|
67
|
+
Godot Agent Loop 1.0 turns the inherited tool server into one coherent product
|
|
68
|
+
for agent-driven game development:
|
|
69
|
+
|
|
70
|
+
- **.NET / C# support** - Scaffold C# projects and generate C# scripts (`create_project` with `dotnet: true`, `create_csharp_script`); the `.csproj` SDK version is matched to your installed Godot.
|
|
71
|
+
- **GDScript diagnostics** - Validate scripts for syntax and type errors without running the game (`validate_script`, and `validate_scripts` for all git-changed or project-wide files).
|
|
72
|
+
- **Progressive tool discovery** - A compact default build/run/observe surface
|
|
73
|
+
keeps selection tractable. Use `godot_tools` to search, describe, and call any
|
|
74
|
+
specialized tool on demand; set `GODOT_MCP_TOOL_SURFACE=full` for the complete
|
|
75
|
+
static catalog.
|
|
76
|
+
- **Correctness and robustness fixes** across the headless scene operations and the runtime interaction server (resource-typed properties now persist, reparenting works, runtime commands are correlated by request id, and the tools survive projects with warnings-as-errors). Godot **4.7** is recommended; Godot 4.4 remains the tested compatibility floor.
|
|
77
|
+
|
|
78
|
+
### Runtime Code Execution
|
|
79
|
+
|
|
80
|
+
- **`game_eval`** - Execute arbitrary GDScript code in the running game with return values
|
|
81
|
+
- Full `await` support for async GDScript code
|
|
82
|
+
- Works even when the game is paused (`PROCESS_MODE_ALWAYS`)
|
|
83
|
+
|
|
84
|
+
### Editor state and undo/redo
|
|
85
|
+
|
|
86
|
+
- **`editor_control`** - Inspect the edited scene and selection, open/save/reload
|
|
87
|
+
scenes, and apply reversible property or node-name edits through
|
|
88
|
+
`EditorUndoRedoManager`. `launch_editor` installs the authenticated bridge
|
|
89
|
+
for the lifetime of the MCP-owned editor session. Its **Agent Activity** dock
|
|
90
|
+
shows each command's target, live outcome, and duration from the same
|
|
91
|
+
correlated lifecycle events used by server diagnostics. Successful session
|
|
92
|
+
writes also push a FileSystem rescan and reload the affected open scene, so
|
|
93
|
+
the editor reflects agent-authored files without waiting for a focus change.
|
|
94
|
+
When an operation identifies a scene node, the bridge selects and reveals it
|
|
95
|
+
in the editor so the human view follows the agent's current target. The dock's
|
|
96
|
+
**Pause Agent** button gives the human a cooperative editing lock: subsequent
|
|
97
|
+
mutating tools are refused before dispatch while inspection remains available;
|
|
98
|
+
**Resume Agent** returns control. The lock defaults to agent-driving and does
|
|
99
|
+
not affect unattended use when no editor is open.
|
|
100
|
+
|
|
101
|
+
### Runtime Node Inspection & Manipulation
|
|
102
|
+
|
|
103
|
+
- **`game_get_property`** / **`game_set_property`** - Read/write any property on any node by path
|
|
104
|
+
- **`game_call_method`** - Call any method on any node with arguments
|
|
105
|
+
- **`game_get_node_info`** - Full node introspection: properties, signals, methods, children
|
|
106
|
+
- **`game_instantiate_scene`** - Dynamically add scenes to the running game
|
|
107
|
+
- **`game_remove_node`** - Remove nodes at runtime
|
|
108
|
+
- **`game_change_scene`** - Switch scenes at runtime
|
|
109
|
+
- **`game_reparent_node`** - Move nodes between parents
|
|
110
|
+
|
|
111
|
+
### Signal System
|
|
112
|
+
|
|
113
|
+
- **`game_connect_signal`** - Wire up signal connections at runtime
|
|
114
|
+
- **`game_disconnect_signal`** - Remove signal connections
|
|
115
|
+
- **`game_emit_signal`** - Emit signals with arguments
|
|
116
|
+
|
|
117
|
+
### Animation & Tweening
|
|
118
|
+
|
|
119
|
+
- **`game_play_animation`** - Control AnimationPlayer (play, stop, pause, list)
|
|
120
|
+
- **`game_tween_property`** - Smooth property animation with configurable easing
|
|
121
|
+
|
|
122
|
+
### Game Control & Debugging
|
|
123
|
+
|
|
124
|
+
- **`game_pause`** - Pause/unpause the game
|
|
125
|
+
- **`game_performance`** - FPS, frame time, memory, object counts, draw calls,
|
|
126
|
+
bounded profiler sessions, and live orphan-node diagnostics
|
|
127
|
+
- **`game_wait`** - Wait N frames (timing-sensitive operations)
|
|
128
|
+
- **`game_get_nodes_in_group`** - Query nodes by group
|
|
129
|
+
- **`game_find_nodes_by_class`** - Find all nodes of a specific class
|
|
130
|
+
|
|
131
|
+
### Scene Authoring Operations (No Running Game Needed)
|
|
132
|
+
|
|
133
|
+
- **`read_scene`** - Parse any .tscn file and get full node tree with properties as JSON
|
|
134
|
+
- **`modify_scene_node`** - Change node properties in scene files
|
|
135
|
+
- **`remove_scene_node`** - Remove nodes from scene files
|
|
136
|
+
- **`attach_script`** - Attach GDScript files to nodes in scenes
|
|
137
|
+
- **`create_resource`** - Create .tres resource files (materials, themes, etc.)
|
|
138
|
+
|
|
139
|
+
### Project Management
|
|
140
|
+
|
|
141
|
+
- **`read_project_settings`** - Parse project.godot as structured JSON
|
|
142
|
+
- **`modify_project_settings`** - Change project settings programmatically
|
|
143
|
+
- **`list_project_files`** - Paginate project files with extension/subdirectory filters
|
|
144
|
+
- **`run_project_tests`** - Discover or run native, GUT, and GdUnit4 tests with structured results
|
|
145
|
+
- **`manage_import_pipeline`** - Inspect/change import metadata, synchronously reimport, and trace imported files
|
|
146
|
+
- **`analyze_project_integrity`** - Find dependency/integrity defects and preview rename impact without mutation
|
|
147
|
+
- **`verify_export_readiness`** - Validate templates/presets, export, inspect artifacts, and smoke-run supported builds
|
|
148
|
+
- **`verify_dotnet_project`** - Detect managed prerequisites, restore/build, report diagnostics, and run C# projects
|
|
149
|
+
- **`manage_addon`** - Install and manage hash-pinned local EditorPlugins with rollback and reload validation
|
|
150
|
+
|
|
151
|
+
### File I/O
|
|
152
|
+
|
|
153
|
+
- **`read_file`** / **`write_file`** / **`delete_file`** - Full file system access within Godot projects
|
|
154
|
+
- **`create_directory`** - Create directory structures for scripts, scenes, assets
|
|
155
|
+
|
|
156
|
+
### Error & Log Capture
|
|
157
|
+
|
|
158
|
+
- **`game_get_errors`** - Get new push_error/push_warning messages since last call
|
|
159
|
+
- **`game_get_logs`** - Get new print output from the running game since last call
|
|
160
|
+
|
|
161
|
+
### Enhanced Input
|
|
162
|
+
|
|
163
|
+
- **`game_key_hold`** / **`game_key_release`** - Hold keys down for movement testing (WASD etc.)
|
|
164
|
+
- **`game_scroll`** - Mouse scroll wheel events
|
|
165
|
+
- **`game_mouse_drag`** - Drag between two points over multiple frames
|
|
166
|
+
- **`game_gamepad`** - Gamepad button and axis input events
|
|
167
|
+
|
|
168
|
+
### Project Creation & Configuration
|
|
169
|
+
|
|
170
|
+
- **`create_project`** - Create a new Godot project from scratch (pass `dotnet: true` to scaffold a .NET/C# project)
|
|
171
|
+
- **`create_csharp_script`** - Create a C# script in a Godot .NET project
|
|
172
|
+
- **`manage_autoloads`** - Add, remove, or list autoloads
|
|
173
|
+
- **`manage_input_map`** - Add, remove, or list input actions and key bindings
|
|
174
|
+
- **`manage_export_presets`** - Create or modify export preset configuration
|
|
175
|
+
|
|
176
|
+
### .NET / C# Support
|
|
177
|
+
|
|
178
|
+
- **`create_project`** with `dotnet: true` - Scaffold a Godot .NET project (`.csproj` with `Godot.NET.Sdk` matched to your Godot version, plus the `"C#"` feature flag)
|
|
179
|
+
- **`create_csharp_script`** - Generate an idiomatic C# script (partial class, correct `_Ready`/`_Process` override signatures); the class name is kept in sync with the file name so Godot can attach it
|
|
180
|
+
- **`get_project_info`** reports an `isDotnet` field
|
|
181
|
+
|
|
182
|
+
### GDScript Diagnostics
|
|
183
|
+
|
|
184
|
+
- **`validate_script`** - Check a single GDScript file for syntax and type errors headlessly, returning `{ valid, errors: [{ message, file, line }] }`
|
|
185
|
+
- **`validate_scripts`** - Batch-validate all git-changed `.gd` files (or the whole project), so an agent can verify its edits before running the game
|
|
186
|
+
|
|
187
|
+
### Camera, Physics & Audio
|
|
188
|
+
|
|
189
|
+
- **`game_get_camera`** / **`game_set_camera`** - Query and control 2D/3D cameras
|
|
190
|
+
- **`game_raycast`** - Cast physics rays (auto-detects 2D vs 3D)
|
|
191
|
+
- **`game_get_audio`** - Get audio bus layout and playing streams
|
|
192
|
+
- **`game_spawn_node`** - Create any node type at runtime with properties
|
|
193
|
+
- **`game_set_shader_param`** - Set shader parameters on materials
|
|
194
|
+
- **`game_audio_play`** / **`game_audio_bus`** - Full audio playback and bus control
|
|
195
|
+
- **`game_navigate_path`** - Query navigation paths (2D/3D)
|
|
196
|
+
- **`game_tilemap`** - Get/set TileMapLayer cells
|
|
197
|
+
- **`game_add_collision`** - Add collision shapes to physics bodies
|
|
198
|
+
- **`game_environment`** - Configure post-processing (fog, glow, SSAO, tonemap, etc.)
|
|
199
|
+
- **`game_manage_group`** - Add/remove nodes from groups
|
|
200
|
+
- **`game_create_timer`** - Create timer nodes programmatically
|
|
201
|
+
- **`game_set_particles`** - Configure GPUParticles2D/3D properties and process materials
|
|
202
|
+
- **`game_create_animation`** - Create animations with value/method/bezier/audio tracks and keyframes
|
|
203
|
+
- **`export_project`** - Trigger headless project export builds (CI/CD ready)
|
|
204
|
+
- **`game_serialize_state`** - Save/load entire node tree state as JSON
|
|
205
|
+
- **`game_physics_body`** - Configure mass, velocity, damping, friction, bounce
|
|
206
|
+
- **`game_create_joint`** - Create physics joints (pin, spring, hinge, cone, slider)
|
|
207
|
+
- **`game_bone_pose`** - Get/set skeleton bone poses for character animation
|
|
208
|
+
- **`game_ui_theme`** - Apply color, constant, and font size theme overrides
|
|
209
|
+
- **`game_viewport`** - Create/configure SubViewport nodes
|
|
210
|
+
- **`game_debug_draw`** - Draw debug geometry (lines, spheres, boxes)
|
|
211
|
+
|
|
212
|
+
### Networking
|
|
213
|
+
|
|
214
|
+
- **`game_http_request`** - HTTP GET/POST/PUT/DELETE with headers and body
|
|
215
|
+
- **`game_websocket`** - WebSocket client connect/disconnect/send messages
|
|
216
|
+
- **`game_multiplayer`** - ENet multiplayer create server/client/disconnect
|
|
217
|
+
- **`game_rpc`** - Call or configure RPC methods on nodes
|
|
218
|
+
|
|
219
|
+
### System & Window Control
|
|
220
|
+
|
|
221
|
+
- **`game_script`** - Attach, detach, or get source of node scripts at runtime
|
|
222
|
+
- **`game_window`** - Get/set window size, fullscreen, title, position
|
|
223
|
+
- **`game_os_info`** - Get platform, locale, screen, adapter, memory info
|
|
224
|
+
- **`game_time_scale`** - Get/set Engine.time_scale and timing info
|
|
225
|
+
- **`game_process_mode`** - Set node process mode (pausable/always/disabled)
|
|
226
|
+
- **`game_world_settings`** - Get/set gravity, physics FPS, and world settings
|
|
227
|
+
|
|
228
|
+
### Advanced Signals & Input
|
|
229
|
+
|
|
230
|
+
- **`game_list_signals`** - List all signals on a node with connections
|
|
231
|
+
- **`game_await_signal`** - Await a signal with timeout and return args
|
|
232
|
+
- **`game_touch`** - Simulate touch press/release/drag and gestures
|
|
233
|
+
- **`game_input_state`** - Query pressed keys, mouse position, connected pads
|
|
234
|
+
- **`game_input_action`** - Manage runtime InputMap actions and strength
|
|
235
|
+
|
|
236
|
+
### 3D Rendering & Geometry
|
|
237
|
+
|
|
238
|
+
- **`game_csg`** - Create/configure CSG nodes with boolean operations
|
|
239
|
+
- **`game_multimesh`** - Create/configure MultiMeshInstance3D for instancing
|
|
240
|
+
- **`game_procedural_mesh`** - Generate meshes via ArrayMesh from vertex data
|
|
241
|
+
- **`game_light_3d`** - Create/configure 3D lights (directional/omni/spot)
|
|
242
|
+
- **`game_mesh_instance`** - Create MeshInstance3D with primitive meshes
|
|
243
|
+
- **`game_gridmap`** - GridMap set/get/clear cells and query used cells
|
|
244
|
+
- **`game_3d_effects`** - Create ReflectionProbe, Decal, or FogVolume
|
|
245
|
+
- **`game_gi`** - Create/configure VoxelGI or LightmapGI
|
|
246
|
+
- **`game_path_3d`** - Create Path3D/Curve3D and manage curve points
|
|
247
|
+
- **`game_sky`** - Create/configure Sky with procedural/physical sky
|
|
248
|
+
- **`game_camera_attributes`** - Configure DOF, exposure, auto-exposure on camera
|
|
249
|
+
- **`game_navigation_3d`** - Create/configure NavigationRegion3D and bake
|
|
250
|
+
- **`game_physics_3d`** - Area3D queries and point/shape intersection tests
|
|
251
|
+
|
|
252
|
+
### 2D Systems
|
|
253
|
+
|
|
254
|
+
- **`game_canvas`** - Create/configure CanvasLayer and CanvasModulate
|
|
255
|
+
- **`game_canvas_draw`** - 2D drawing: line/rect/circle/polygon/text/clear
|
|
256
|
+
- **`game_light_2d`** - Create/configure 2D lights and light occluders
|
|
257
|
+
- **`game_parallax`** - Create/configure ParallaxBackground and layers
|
|
258
|
+
- **`game_shape_2d`** - Line2D/Polygon2D point manipulation
|
|
259
|
+
- **`game_path_2d`** - Path2D/Curve2D management and AnimatedSprite2D
|
|
260
|
+
- **`game_physics_2d`** - Area2D queries and 2D point/shape intersections
|
|
261
|
+
|
|
262
|
+
### Advanced Animation
|
|
263
|
+
|
|
264
|
+
- **`game_animation_tree`** - AnimationTree state machine travel and params
|
|
265
|
+
- **`game_animation_control`** - AnimationPlayer seek/queue/speed/info control
|
|
266
|
+
- **`game_skeleton_ik`** - SkeletonIK3D start/stop/set target position
|
|
267
|
+
|
|
268
|
+
### Advanced Audio
|
|
269
|
+
|
|
270
|
+
- **`game_audio_effect`** - Add/remove/configure audio bus effects
|
|
271
|
+
- **`game_audio_bus_layout`** - Create/remove/reorder audio buses and routing
|
|
272
|
+
- **`game_audio_spatial`** - Configure AudioStreamPlayer3D spatial properties
|
|
273
|
+
|
|
274
|
+
### Editor & Project Tools
|
|
275
|
+
|
|
276
|
+
- **`rename_file`** - Rename or move a file within the project
|
|
277
|
+
- **`manage_resource`** - Read or modify .tres/.res resource files
|
|
278
|
+
- **`create_script`** - Create a GDScript file from a template
|
|
279
|
+
- **`validate_script`** - Check a GDScript file for syntax/type errors headlessly (no run needed)
|
|
280
|
+
- **`validate_scripts`** - Batch-check GDScript files: git-changed ones by default, or all
|
|
281
|
+
- **`manage_scene_signals`** - List/add/remove signal connections in .tscn files
|
|
282
|
+
- **`manage_layers`** - List/set named layer definitions in project
|
|
283
|
+
- **`manage_plugins`** - List/enable/disable editor plugins
|
|
284
|
+
- **`manage_shader`** - Create or read .gdshader files
|
|
285
|
+
- **`manage_theme_resource`** - Create/read/modify Theme .tres resources
|
|
286
|
+
- **`set_main_scene`** - Set the main scene in project.godot
|
|
287
|
+
- **`manage_scene_structure`** - Rename/duplicate/move nodes within .tscn scenes
|
|
288
|
+
- **`manage_translations`** - List/add/remove translation files in project
|
|
289
|
+
- **`game_locale`** - Set/get locale and translate strings at runtime
|
|
290
|
+
|
|
291
|
+
### UI Controls
|
|
292
|
+
|
|
293
|
+
- **`game_ui_control`** - Set focus, anchors, tooltip, mouse filter on Control
|
|
294
|
+
- **`game_ui_text`** - LineEdit/TextEdit/RichTextLabel text operations
|
|
295
|
+
- **`game_ui_popup`** - Show/hide/popup for Popup/Dialog/Window nodes
|
|
296
|
+
- **`game_ui_tree`** - Tree control: get/select/collapse/add/remove items
|
|
297
|
+
- **`game_ui_item_list`** - ItemList/OptionButton: get/select/add/remove items
|
|
298
|
+
- **`game_ui_tabs`** - TabContainer/TabBar: get/set current tab
|
|
299
|
+
- **`game_ui_menu`** - PopupMenu/MenuBar: add/remove/get menu items
|
|
300
|
+
- **`game_ui_range`** - ProgressBar/Slider/SpinBox/ColorPicker get/set
|
|
301
|
+
|
|
302
|
+
### Rendering & Resources
|
|
303
|
+
|
|
304
|
+
- **`game_render_settings`** - Get/set MSAA, FXAA, TAA, scaling mode/scale
|
|
305
|
+
- **`game_resource`** - Runtime resource load, save, or preload
|
|
306
|
+
|
|
307
|
+
### Robustness Improvements
|
|
308
|
+
|
|
309
|
+
- **Reentrancy guard** - Prevents concurrent command processing during async operations
|
|
310
|
+
- **Full type conversion** - Supports Vector2/3, Color, Quaternion, Basis, Transform2D/3D, AABB, Rect2, and all packed array types
|
|
311
|
+
- **Smart property type detection** - Uses node's `get_property_list()` for automatic type conversion
|
|
312
|
+
- **PackedArray serialization** - Proper JSON arrays instead of string fallback
|
|
313
|
+
- **Graceful error handling** - Scene read fallback to raw .tscn text on missing dependencies
|
|
314
|
+
|
|
315
|
+
## Tool inventory
|
|
316
|
+
|
|
317
|
+
### Project Management (14 tools)
|
|
318
|
+
|
|
319
|
+
| Tool | Description |
|
|
320
|
+
| ------ | ------------- |
|
|
321
|
+
| `launch_editor` | Launch Godot editor for a project |
|
|
322
|
+
| `run_project` | Run a Godot project and capture output |
|
|
323
|
+
| `verify_project` | Run, assert bounded runtime evidence, optionally capture, and tear down |
|
|
324
|
+
| `run_project_tests` | Discover or run native, GUT, and GdUnit4 tests with structured cases and logs |
|
|
325
|
+
| `manage_import_pipeline` | Inspect/change importer settings, reimport, and query generated dependencies |
|
|
326
|
+
| `analyze_project_integrity` | Analyze resource graphs and preview non-mutating rename impact |
|
|
327
|
+
| `verify_export_readiness` | Validate export prerequisites and return artifact plus smoke-run evidence |
|
|
328
|
+
| `verify_dotnet_project` | Inspect, restore, build, and run against the matching Godot.NET.Sdk |
|
|
329
|
+
| `manage_addon` | Inspect/install/update/remove and toggle hash-pinned local EditorPlugins |
|
|
330
|
+
| `stop_project` | Stop the running project |
|
|
331
|
+
| `get_debug_output` | Get console output and errors |
|
|
332
|
+
| `get_godot_version` | Get installed Godot version |
|
|
333
|
+
| `list_projects` | Find Godot projects in a directory |
|
|
334
|
+
| `get_project_info` | Get project metadata |
|
|
335
|
+
|
|
336
|
+
Import changes require an editor-capable Godot binary. `reimport` runs Godot's
|
|
337
|
+
bounded `--import` workflow and returns diagnostics; it may rewrite `.import`
|
|
338
|
+
metadata and `.godot/imported` cache files. Integrity analysis is read-only,
|
|
339
|
+
skips generated/vendor directories, defaults to 10,000 resource files, and
|
|
340
|
+
labels unreferenced resources as candidates because dynamic loads cannot be
|
|
341
|
+
proven statically. Use `preview_rename` before moving a resource; it reports
|
|
342
|
+
direct textual dependents, destination conflicts, and UID sidecars but never
|
|
343
|
+
changes files.
|
|
344
|
+
|
|
345
|
+
Export readiness recognizes the bounded Linux, Windows, macOS, and Web template
|
|
346
|
+
filenames for the active Godot version. Local smoke execution is intentionally
|
|
347
|
+
limited to Linux exports on Linux; other targets are inspected but not claimed
|
|
348
|
+
as locally runnable. Export writes the requested artifact and companion files,
|
|
349
|
+
returns bounded process output and SHA-256 evidence, and classifies missing
|
|
350
|
+
templates, unsupported platforms, invalid output paths, timeouts, export errors,
|
|
351
|
+
missing artifacts, and smoke failures.
|
|
352
|
+
|
|
353
|
+
The managed workflow requires both a .NET-enabled Godot editor and a 64-bit
|
|
354
|
+
.NET SDK. It verifies that the versioned `Godot.NET.Sdk` in the unique or
|
|
355
|
+
selected `.csproj` matches the active engine, returns bounded structured MSBuild
|
|
356
|
+
diagnostics, and hashes the resulting assembly. Standard Godot builds return a
|
|
357
|
+
controlled `dotnet_editor_required` result and do not attempt restore or build.
|
|
358
|
+
|
|
359
|
+
Add-on installation is deliberately offline and provenance-first: `sourcePath`
|
|
360
|
+
must be an allowed local directory and `expectedSha256` must match its authored
|
|
361
|
+
tree before any write. Symlinks, oversized trees, malformed `plugin.cfg`,
|
|
362
|
+
non-`@tool` scripts, incompatible minimum Godot versions, and traversal are
|
|
363
|
+
rejected. Replacement is staged atomically, editor reload is mandatory, and a
|
|
364
|
+
parse/load failure restores the prior version and plugin configuration.
|
|
365
|
+
|
|
366
|
+
### Scene Management (7 tools)
|
|
367
|
+
|
|
368
|
+
| Tool | Description |
|
|
369
|
+
| ------ | ------------- |
|
|
370
|
+
| `create_scene` | Create a new scene with a root node type |
|
|
371
|
+
| `add_node` | Add a node to an existing scene |
|
|
372
|
+
| `load_sprite` | Load a texture into a Sprite2D node |
|
|
373
|
+
| `export_mesh_library` | Export a scene as MeshLibrary |
|
|
374
|
+
| `save_scene` | Save a scene (with optional variant path) |
|
|
375
|
+
| `get_uid` | Get UID for a file (Godot 4.4+) |
|
|
376
|
+
| `update_project_uids` | Resave resources to update UIDs |
|
|
377
|
+
|
|
378
|
+
### Scene Authoring Operations (5 tools)
|
|
379
|
+
|
|
380
|
+
| Tool | Description |
|
|
381
|
+
| ------ | ------------- |
|
|
382
|
+
| `read_scene` | Read full scene tree as JSON |
|
|
383
|
+
| `modify_scene_node` | Modify node properties in a scene file |
|
|
384
|
+
| `remove_scene_node` | Remove a node from a scene file |
|
|
385
|
+
| `attach_script` | Attach a GDScript to a scene node |
|
|
386
|
+
| `create_resource` | Create a .tres resource file |
|
|
387
|
+
|
|
388
|
+
### Project Settings (3 tools)
|
|
389
|
+
|
|
390
|
+
| Tool | Description |
|
|
391
|
+
| ------ | ------------- |
|
|
392
|
+
| `read_project_settings` | Parse project.godot as JSON |
|
|
393
|
+
| `modify_project_settings` | Change a project setting |
|
|
394
|
+
| `list_project_files` | Paginate/filter project files |
|
|
395
|
+
|
|
396
|
+
### Runtime Input (5 tools)
|
|
397
|
+
|
|
398
|
+
| Tool | Description |
|
|
399
|
+
| ------ | ------------- |
|
|
400
|
+
| `game_screenshot` | Capture a screenshot (base64 PNG) |
|
|
401
|
+
| `game_visual_regression` | Capture baselines or compare frames with masks, tolerances, and retained PNG diffs |
|
|
402
|
+
| `game_click` | Click at a position |
|
|
403
|
+
| `game_key_press` | Send key press or input action |
|
|
404
|
+
| `game_mouse_move` | Move the mouse |
|
|
405
|
+
|
|
406
|
+
### Runtime Inspection (3 tools)
|
|
407
|
+
|
|
408
|
+
| Tool | Description |
|
|
409
|
+
| ------ | ------------- |
|
|
410
|
+
| `game_get_ui` | Get all visible UI elements |
|
|
411
|
+
| `game_get_scene_tree` | Get full scene tree structure |
|
|
412
|
+
| `game_get_node_info` | Detailed node introspection |
|
|
413
|
+
|
|
414
|
+
### Runtime Code Execution (1 tool)
|
|
415
|
+
|
|
416
|
+
| Tool | Description |
|
|
417
|
+
| ------ | ------------- |
|
|
418
|
+
| `game_eval` | Execute arbitrary GDScript with return values |
|
|
419
|
+
|
|
420
|
+
### Runtime Node Manipulation (7 tools)
|
|
421
|
+
|
|
422
|
+
| Tool | Description |
|
|
423
|
+
| ------ | ------------- |
|
|
424
|
+
| `game_get_property` | Get any node property |
|
|
425
|
+
| `game_set_property` | Set any node property (auto type conversion) |
|
|
426
|
+
| `game_call_method` | Call any method on a node |
|
|
427
|
+
| `game_instantiate_scene` | Add a PackedScene to the running tree |
|
|
428
|
+
| `game_remove_node` | Remove a node from the tree |
|
|
429
|
+
| `game_change_scene` | Switch to a different scene |
|
|
430
|
+
| `game_reparent_node` | Move a node to a new parent |
|
|
431
|
+
|
|
432
|
+
### Runtime Signals (5 tools)
|
|
433
|
+
|
|
434
|
+
| Tool | Description |
|
|
435
|
+
| ------ | ------------- |
|
|
436
|
+
| `game_connect_signal` | Connect a signal to a method |
|
|
437
|
+
| `game_disconnect_signal` | Disconnect a signal |
|
|
438
|
+
| `game_emit_signal` | Emit a signal with arguments |
|
|
439
|
+
| `game_list_signals` | List all signals on a node with connections |
|
|
440
|
+
| `game_await_signal` | Await a signal with timeout and return args |
|
|
441
|
+
|
|
442
|
+
### Runtime Animation (2 tools)
|
|
443
|
+
|
|
444
|
+
| Tool | Description |
|
|
445
|
+
| ------ | ------------- |
|
|
446
|
+
| `game_play_animation` | Control AnimationPlayer |
|
|
447
|
+
| `game_tween_property` | Tween a property with easing |
|
|
448
|
+
|
|
449
|
+
### Runtime Utilities (5 tools)
|
|
450
|
+
|
|
451
|
+
| Tool | Description |
|
|
452
|
+
| ------ | ------------- |
|
|
453
|
+
| `game_pause` | Pause/unpause the game |
|
|
454
|
+
| `game_performance` | Get FPS, memory, draw calls |
|
|
455
|
+
| `game_wait` | Wait N frames |
|
|
456
|
+
| `game_get_nodes_in_group` | Query nodes by group |
|
|
457
|
+
| `game_find_nodes_by_class` | Find nodes by class type |
|
|
458
|
+
|
|
459
|
+
### File I/O (4 tools)
|
|
460
|
+
|
|
461
|
+
| Tool | Description |
|
|
462
|
+
| ------ | ------------- |
|
|
463
|
+
| `read_file` | Read a text file from a Godot project |
|
|
464
|
+
| `write_file` | Create or overwrite a text file |
|
|
465
|
+
| `delete_file` | Delete a file from a project |
|
|
466
|
+
| `create_directory` | Create a directory inside a project |
|
|
467
|
+
|
|
468
|
+
### Error & Log Capture (2 tools)
|
|
469
|
+
|
|
470
|
+
| Tool | Description |
|
|
471
|
+
| ------ | ------------- |
|
|
472
|
+
| `game_get_errors` | Get new errors/warnings since last call |
|
|
473
|
+
| `game_get_logs` | Get new print output since last call |
|
|
474
|
+
|
|
475
|
+
### Enhanced Input (8 tools)
|
|
476
|
+
|
|
477
|
+
| Tool | Description |
|
|
478
|
+
| ------ | ------------- |
|
|
479
|
+
| `game_key_hold` | Hold a key down (no auto-release) |
|
|
480
|
+
| `game_key_release` | Release a held key |
|
|
481
|
+
| `game_scroll` | Mouse scroll wheel event |
|
|
482
|
+
| `game_mouse_drag` | Drag between two points over N frames |
|
|
483
|
+
| `game_gamepad` | Gamepad button or axis input |
|
|
484
|
+
| `game_touch` | Simulate touch press/release/drag and gestures |
|
|
485
|
+
| `game_input_state` | Query pressed keys, mouse position, connected pads |
|
|
486
|
+
| `game_input_action` | Manage runtime InputMap actions and strength |
|
|
487
|
+
|
|
488
|
+
### Project Creation (5 tools)
|
|
489
|
+
|
|
490
|
+
| Tool | Description |
|
|
491
|
+
| ------ | ------------- |
|
|
492
|
+
| `create_project` | Create a new Godot project (supports `dotnet: true` for C#) |
|
|
493
|
+
| `create_csharp_script` | Create a C# script in a Godot .NET project |
|
|
494
|
+
| `manage_autoloads` | Add, remove, or list autoloads |
|
|
495
|
+
| `manage_input_map` | Add, remove, or list input actions |
|
|
496
|
+
| `manage_export_presets` | Create or modify export presets |
|
|
497
|
+
|
|
498
|
+
### Advanced Runtime (24 tools)
|
|
499
|
+
|
|
500
|
+
| Tool | Description |
|
|
501
|
+
| ------ | ------------- |
|
|
502
|
+
| `game_get_camera` | Get active camera position/rotation/zoom |
|
|
503
|
+
| `game_set_camera` | Move or rotate the active camera |
|
|
504
|
+
| `game_raycast` | Cast a ray and return collision results |
|
|
505
|
+
| `game_get_audio` | Get audio bus layout and playing streams |
|
|
506
|
+
| `game_spawn_node` | Create a new node of any type at runtime |
|
|
507
|
+
| `game_set_shader_param` | Set a shader parameter on a node's material |
|
|
508
|
+
| `game_audio_play` | Play, stop, or pause an AudioStreamPlayer node |
|
|
509
|
+
| `game_audio_bus` | Set volume, mute, or solo on an audio bus |
|
|
510
|
+
| `game_navigate_path` | Query a navigation path between two points |
|
|
511
|
+
| `game_tilemap` | Get or set cells in a TileMapLayer node |
|
|
512
|
+
| `game_add_collision` | Add a collision shape to a physics body node |
|
|
513
|
+
| `game_environment` | Get or set environment and post-processing settings |
|
|
514
|
+
| `game_manage_group` | Add or remove a node from a group, or list groups |
|
|
515
|
+
| `game_create_timer` | Create a Timer node with configuration |
|
|
516
|
+
| `game_set_particles` | Configure GPUParticles2D/3D node properties |
|
|
517
|
+
| `game_create_animation` | Create an animation with tracks and keyframes |
|
|
518
|
+
| `game_serialize_state` | Save or load node tree state as JSON |
|
|
519
|
+
| `game_physics_body` | Configure physics body properties (mass, velocity) |
|
|
520
|
+
| `game_create_joint` | Create a physics joint between two bodies |
|
|
521
|
+
| `game_bone_pose` | Get or set bone poses on a Skeleton3D node |
|
|
522
|
+
| `game_ui_theme` | Apply theme overrides to a Control node |
|
|
523
|
+
| `game_viewport` | Create or configure a SubViewport node |
|
|
524
|
+
| `game_debug_draw` | Draw debug lines, spheres, or boxes in 3D |
|
|
525
|
+
|
|
526
|
+
### Build & Export (1 tool)
|
|
527
|
+
|
|
528
|
+
| Tool | Description |
|
|
529
|
+
| ------ | ------------- |
|
|
530
|
+
| `export_project` | Export a Godot project using a preset |
|
|
531
|
+
|
|
532
|
+
### Networking (4 tools)
|
|
533
|
+
|
|
534
|
+
| Tool | Description |
|
|
535
|
+
| ------ | ------------- |
|
|
536
|
+
| `game_http_request` | HTTP GET/POST/PUT/DELETE with headers and body |
|
|
537
|
+
| `game_websocket` | WebSocket client connect/disconnect/send messages |
|
|
538
|
+
| `game_multiplayer` | ENet multiplayer create server/client/disconnect |
|
|
539
|
+
| `game_rpc` | Call or configure RPC methods on nodes |
|
|
540
|
+
|
|
541
|
+
### System & Window (6 tools)
|
|
542
|
+
|
|
543
|
+
| Tool | Description |
|
|
544
|
+
| ------ | ------------- |
|
|
545
|
+
| `game_script` | Attach, detach, or get source of node scripts |
|
|
546
|
+
| `game_window` | Get/set window size, fullscreen, title, position |
|
|
547
|
+
| `game_os_info` | Get platform, locale, screen, adapter, memory info |
|
|
548
|
+
| `game_time_scale` | Get/set Engine.time_scale and timing info |
|
|
549
|
+
| `game_process_mode` | Set node process mode (pausable/always/disabled) |
|
|
550
|
+
| `game_world_settings` | Get/set gravity, physics FPS, and world settings |
|
|
551
|
+
|
|
552
|
+
### 3D Rendering & Geometry (13 tools)
|
|
553
|
+
|
|
554
|
+
| Tool | Description |
|
|
555
|
+
| ------ | ------------- |
|
|
556
|
+
| `game_csg` | Create/configure CSG nodes with boolean operations |
|
|
557
|
+
| `game_multimesh` | Create/configure MultiMeshInstance3D for instancing |
|
|
558
|
+
| `game_procedural_mesh` | Generate meshes via ArrayMesh from vertex data |
|
|
559
|
+
| `game_light_3d` | Create/configure 3D lights (directional/omni/spot) |
|
|
560
|
+
| `game_mesh_instance` | Create MeshInstance3D with primitive meshes |
|
|
561
|
+
| `game_gridmap` | GridMap set/get/clear cells and query used cells |
|
|
562
|
+
| `game_3d_effects` | Create ReflectionProbe, Decal, or FogVolume |
|
|
563
|
+
| `game_gi` | Create/configure VoxelGI or LightmapGI |
|
|
564
|
+
| `game_path_3d` | Create Path3D/Curve3D and manage curve points |
|
|
565
|
+
| `game_sky` | Create/configure Sky with procedural/physical sky |
|
|
566
|
+
| `game_camera_attributes` | Configure DOF, exposure, auto-exposure on camera |
|
|
567
|
+
| `game_navigation_3d` | Create/configure NavigationRegion3D and bake |
|
|
568
|
+
| `game_physics_3d` | Area3D queries and point/shape intersection tests |
|
|
569
|
+
|
|
570
|
+
### 2D Systems (7 tools)
|
|
571
|
+
|
|
572
|
+
| Tool | Description |
|
|
573
|
+
| ------ | ------------- |
|
|
574
|
+
| `game_canvas` | Create/configure CanvasLayer and CanvasModulate |
|
|
575
|
+
| `game_canvas_draw` | 2D drawing: line/rect/circle/polygon/text/clear |
|
|
576
|
+
| `game_light_2d` | Create/configure 2D lights and light occluders |
|
|
577
|
+
| `game_parallax` | Create/configure ParallaxBackground and layers |
|
|
578
|
+
| `game_shape_2d` | Line2D/Polygon2D point manipulation |
|
|
579
|
+
| `game_path_2d` | Path2D/Curve2D management and AnimatedSprite2D |
|
|
580
|
+
| `game_physics_2d` | Area2D queries and 2D point/shape intersections |
|
|
581
|
+
|
|
582
|
+
### Advanced Animation (3 tools)
|
|
583
|
+
|
|
584
|
+
| Tool | Description |
|
|
585
|
+
| ------ | ------------- |
|
|
586
|
+
| `game_animation_tree` | AnimationTree state machine travel and params |
|
|
587
|
+
| `game_animation_control` | AnimationPlayer seek/queue/speed/info control |
|
|
588
|
+
| `game_skeleton_ik` | SkeletonIK3D start/stop/set target position |
|
|
589
|
+
|
|
590
|
+
### Advanced Audio (3 tools)
|
|
591
|
+
|
|
592
|
+
| Tool | Description |
|
|
593
|
+
| ------ | ------------- |
|
|
594
|
+
| `game_audio_effect` | Add/remove/configure audio bus effects |
|
|
595
|
+
| `game_audio_bus_layout` | Create/remove/reorder audio buses and routing |
|
|
596
|
+
| `game_audio_spatial` | Configure AudioStreamPlayer3D spatial properties |
|
|
597
|
+
|
|
598
|
+
### Editor & Project Tools (14 tools)
|
|
599
|
+
|
|
600
|
+
| Tool | Description |
|
|
601
|
+
| ------ | ------------- |
|
|
602
|
+
| `rename_file` | Rename or move a file within the project |
|
|
603
|
+
| `manage_resource` | Read or modify .tres/.res resource files |
|
|
604
|
+
| `create_script` | Create a GDScript file from a template |
|
|
605
|
+
| `validate_script` | Check a GDScript file for syntax/type errors (headless) |
|
|
606
|
+
| `validate_scripts` | Batch-check GDScript files (git-changed by default, or all) |
|
|
607
|
+
| `manage_scene_signals` | List/add/remove signal connections in .tscn files |
|
|
608
|
+
| `manage_layers` | List/set named layer definitions in project |
|
|
609
|
+
| `manage_plugins` | List/enable/disable editor plugins |
|
|
610
|
+
| `manage_shader` | Create or read .gdshader files |
|
|
611
|
+
| `manage_theme_resource` | Create/read/modify Theme .tres resources |
|
|
612
|
+
| `set_main_scene` | Set the main scene in project.godot |
|
|
613
|
+
| `manage_scene_structure` | Rename/duplicate/move nodes within .tscn scenes |
|
|
614
|
+
| `manage_translations` | List/add/remove translation files in project |
|
|
615
|
+
| `game_locale` | Set/get locale and translate strings at runtime |
|
|
616
|
+
|
|
617
|
+
### UI Controls (8 tools)
|
|
618
|
+
|
|
619
|
+
| Tool | Description |
|
|
620
|
+
| ------ | ------------- |
|
|
621
|
+
| `game_ui_control` | Set focus, anchors, tooltip, mouse filter on Control |
|
|
622
|
+
| `game_ui_text` | LineEdit/TextEdit/RichTextLabel text operations |
|
|
623
|
+
| `game_ui_popup` | Show/hide/popup for Popup/Dialog/Window nodes |
|
|
624
|
+
| `game_ui_tree` | Tree control: get/select/collapse/add/remove items |
|
|
625
|
+
| `game_ui_item_list` | ItemList/OptionButton: get/select/add/remove items |
|
|
626
|
+
| `game_ui_tabs` | TabContainer/TabBar: get/set current tab |
|
|
627
|
+
| `game_ui_menu` | PopupMenu/MenuBar: add/remove/get menu items |
|
|
628
|
+
| `game_ui_range` | ProgressBar/Slider/SpinBox/ColorPicker get/set |
|
|
629
|
+
|
|
630
|
+
### Rendering & Resources (2 tools)
|
|
631
|
+
|
|
632
|
+
| Tool | Description |
|
|
633
|
+
| ------ | ------------- |
|
|
634
|
+
| `game_render_settings` | Get/set MSAA, FXAA, TAA, scaling mode/scale |
|
|
635
|
+
| `game_resource` | Runtime resource load, save, or preload |
|
|
636
|
+
|
|
637
|
+
## Requirements
|
|
638
|
+
|
|
639
|
+
- [Godot Engine](https://godotengine.org/download) 4.4 or later; the latest stable release, currently Godot **4.7**, is recommended
|
|
640
|
+
- (Optional) [.NET SDK](https://dotnet.microsoft.com/download) 8.0+ and the Godot .NET (C#) build, only if you use `create_project`'s `dotnet: true` flag or `create_csharp_script`
|
|
641
|
+
- [Node.js](https://nodejs.org/) >= 18.0.0
|
|
642
|
+
- An AI assistant that supports MCP (Claude Code, Cline, Cursor, etc.)
|
|
643
|
+
|
|
644
|
+
### Godot compatibility policy
|
|
645
|
+
|
|
646
|
+
Development targets the latest stable Godot release. The project also keeps a
|
|
647
|
+
tested compatibility floor while the same implementation remains cleanly
|
|
648
|
+
portable; currently, CI covers Godot 4.4 and 4.7. The floor may be raised when
|
|
649
|
+
it blocks useful features or creates meaningful maintenance cost. In that case,
|
|
650
|
+
the last compatible release remains available, and an older-version maintenance
|
|
651
|
+
branch will be created only when user demand justifies maintaining it. Such a
|
|
652
|
+
branch would receive critical fixes rather than new features.
|
|
653
|
+
|
|
654
|
+
### Verified support boundary
|
|
655
|
+
|
|
656
|
+
| Area | Status | Evidence or limitation |
|
|
657
|
+
| --- | --- | --- |
|
|
658
|
+
| Linux headed (desktop or Xvfb), Godot 4.4 and 4.7 | Verified in CI | Full MCP E2E under Xvfb, direct runtime, subprocess operations, and strict script parsing |
|
|
659
|
+
| GDScript project and running-game workflows | Verified for advertised tools | See the generated [coverage report](docs/coverage/coverage-report.md) |
|
|
660
|
+
| Privileged runtime commands | Opt-in only | Disabled by default; intended for trusted localhost development |
|
|
661
|
+
| Godot .NET/C# | Scaffold, compile, and editor-load verification | Godot .NET 4.4 and 4.7 with .NET SDK 8 |
|
|
662
|
+
| Linux exports | Release/debug template export and smoke-run verification | Godot 4.4 and 4.7 installed templates; other targets are not claimed |
|
|
663
|
+
| Rendering and screenshots | A headed rendering context is required | Compatibility and Forward+ on Linux software rendering; display-less sessions fail fast with desktop/Xvfb remediation |
|
|
664
|
+
| Windows and macOS | Portable acceptance verified | Godot 4.7 process, Unicode path, runtime input, window query, and teardown workflows |
|
|
665
|
+
| Windows/macOS editor UI, rendering, and exports | Not claimed | Verified on Linux only; Windows/macOS support is bounded to the portable acceptance suite |
|
|
666
|
+
| Editor state and undo/redo bridge | Verified in MCP E2E | The headed editor bridge is authenticated and uses `EditorInterface` plus `EditorUndoRedoManager` |
|
|
667
|
+
| Full debugger control | Not claimed | Breakpoints, stack inspection, and frame-local evaluation remain outside the supported boundary |
|
|
668
|
+
| Profiler, leak, asset, localization, and accessibility audits | Verified in MCP E2E | `game_performance` and `analyze_project_integrity` return bounded live/static evidence; native extension builds remain unsupported |
|
|
669
|
+
| GDExtension builds | Not claimed | `analyze_project_integrity` inspects declarations and libraries without invoking arbitrary native toolchains |
|
|
670
|
+
|
|
671
|
+
## Installation
|
|
672
|
+
|
|
673
|
+
```bash
|
|
674
|
+
git clone https://github.com/beremaran/godot-agent-loop.git
|
|
675
|
+
cd godot-agent-loop
|
|
676
|
+
npm install
|
|
677
|
+
npm run build
|
|
678
|
+
```
|
|
679
|
+
|
|
680
|
+
## Configuration
|
|
681
|
+
|
|
682
|
+
### Portable agent bundle
|
|
683
|
+
|
|
684
|
+
The repository ships one neutral bundle that starts the matching npm MCP server
|
|
685
|
+
and provides the same build, debug, verify, and ship skills to Claude Code,
|
|
686
|
+
Codex, OpenCode, and Pi. For Claude Code:
|
|
687
|
+
|
|
688
|
+
```text
|
|
689
|
+
/plugin marketplace add beremaran/godot-agent-loop
|
|
690
|
+
/plugin install godot-agent-loop@godot-agent-loop
|
|
691
|
+
```
|
|
692
|
+
|
|
693
|
+
For a local checkout, use `claude --plugin-dir ./agent-plugin`. See the
|
|
694
|
+
[portable agent bundle guide](docs/agent-plugin.md) for verified Claude Code,
|
|
695
|
+
Codex, OpenCode, and Pi install paths.
|
|
696
|
+
|
|
697
|
+
### Claude Code
|
|
698
|
+
|
|
699
|
+
Add to your Claude Code MCP settings:
|
|
700
|
+
|
|
701
|
+
```json
|
|
702
|
+
{
|
|
703
|
+
"mcpServers": {
|
|
704
|
+
"godot": {
|
|
705
|
+
"command": "node",
|
|
706
|
+
"args": ["/absolute/path/to/godot-agent-loop/build/index.js"],
|
|
707
|
+
"env": {
|
|
708
|
+
"GODOT_PATH": "/path/to/godot",
|
|
709
|
+
"DEBUG": "true"
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
}
|
|
714
|
+
```
|
|
715
|
+
|
|
716
|
+
### Cline (VS Code)
|
|
717
|
+
|
|
718
|
+
Add to your Cline MCP settings (`cline_mcp_settings.json`):
|
|
719
|
+
|
|
720
|
+
```json
|
|
721
|
+
{
|
|
722
|
+
"mcpServers": {
|
|
723
|
+
"godot": {
|
|
724
|
+
"command": "node",
|
|
725
|
+
"args": ["/absolute/path/to/godot-agent-loop/build/index.js"],
|
|
726
|
+
"disabled": false
|
|
727
|
+
}
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
```
|
|
731
|
+
|
|
732
|
+
### Cursor
|
|
733
|
+
|
|
734
|
+
Create `.cursor/mcp.json` in your project:
|
|
735
|
+
|
|
736
|
+
```json
|
|
737
|
+
{
|
|
738
|
+
"mcpServers": {
|
|
739
|
+
"godot": {
|
|
740
|
+
"command": "node",
|
|
741
|
+
"args": ["/absolute/path/to/godot-agent-loop/build/index.js"]
|
|
742
|
+
}
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
```
|
|
746
|
+
|
|
747
|
+
## Runtime Tools Setup
|
|
748
|
+
|
|
749
|
+
No setup is required when the game is started through `run_project`: the server
|
|
750
|
+
installs the interaction autoload automatically by generating an `override.cfg`
|
|
751
|
+
(which Godot merges over `project.godot` at startup) and copying the runtime
|
|
752
|
+
scripts into the project, then removes them again on `stop_project`, game exit,
|
|
753
|
+
or server shutdown. `project.godot` is never modified. If an earlier server
|
|
754
|
+
crashed or was killed before cleaning up, the next server detects and removes
|
|
755
|
+
the leftover files on first contact with the project; an installation you
|
|
756
|
+
manage yourself (declared in `project.godot`) is never touched.
|
|
757
|
+
|
|
758
|
+
To run the interaction server without `run_project`, copy
|
|
759
|
+
`build/scripts/mcp_interaction_server.gd` to your project and register it as an
|
|
760
|
+
autoload:
|
|
761
|
+
|
|
762
|
+
1. Copy `build/scripts/mcp_interaction_server.gd` to your project's scripts folder
|
|
763
|
+
2. In Godot: **Project > Project Settings > Autoload**
|
|
764
|
+
3. Add the script with the name `McpInteractionServer`
|
|
765
|
+
|
|
766
|
+
The server listens on `127.0.0.1:9090`. Each MCP server launch generates a
|
|
767
|
+
cryptographic runtime secret, passes it only to the Godot child process, and
|
|
768
|
+
authenticates it during capability negotiation before any runtime command is
|
|
769
|
+
accepted. A manually managed runtime should set the same
|
|
770
|
+
`GODOT_MCP_RUNTIME_SECRET` value in both processes; leaving it unset retains
|
|
771
|
+
legacy unauthenticated behavior and is suitable only for a trusted machine.
|
|
772
|
+
|
|
773
|
+
Commands that execute arbitrary GDScript, invoke arbitrary node properties or
|
|
774
|
+
methods, mutate scripts, call multiplayer peers, or make HTTP/WebSocket
|
|
775
|
+
connections remain disabled by default even after authentication. Grant only
|
|
776
|
+
the required group with `GODOT_MCP_PRIVILEGED_GROUPS`: `reflection` enables
|
|
777
|
+
arbitrary property/method access, `code-execution` enables eval/script control,
|
|
778
|
+
and `network` enables RPC, HTTP, and WebSocket. The legacy
|
|
779
|
+
`GODOT_MCP_ALLOW_PRIVILEGED_COMMANDS=true` grants all three groups. Use either
|
|
780
|
+
only for a trusted local developer workflow. Authentication and policy denials
|
|
781
|
+
never echo secrets, source, property values, URLs, headers, or engine errors.
|
|
782
|
+
Authentication success/failure emits a structured audit event containing only
|
|
783
|
+
the event name, runtime component, numeric session ID, and timestamp.
|
|
784
|
+
|
|
785
|
+
## Environment Variables
|
|
786
|
+
|
|
787
|
+
| Variable | Description |
|
|
788
|
+
| ---------- | ------------- |
|
|
789
|
+
| `GODOT_PATH` | Path to the Godot executable (overrides auto-detection) |
|
|
790
|
+
| `DEBUG` | Set to `"true"` for detailed server-side logging. This also runs the headless operations script with `--debug-godot`, which logs diagnostics and writes a temporary write-access probe file into the project (removed again on every branch). Parameter values are summarized by type and size in both logs, never printed. |
|
|
791
|
+
| `GODOT_MCP_ALLOWED_DIRS` | Optional. Restrict `run_project` to projects under these roots (`;`, `,`, or `:` separated). When unset, any project path is allowed. |
|
|
792
|
+
| `GODOT_MCP_RUNTIME_SECRET` | Optional explicit shared runtime secret. The MCP server generates a fresh 256-bit value when omitted and passes it only to Godot processes it launches. Set the same value manually only when connecting to a separately launched runtime. |
|
|
793
|
+
| `GODOT_MCP_EDITOR_START_PAUSED` | Optional, default `false`. Start the editor addon's cooperative lock in human-editing mode so mutating MCP tools are refused until **Resume Agent** is pressed. |
|
|
794
|
+
| `GODOT_MCP_TOOL_SURFACE` | Optional, default `core`. Set to `full` to advertise the complete static tool catalog instead of the compact core plus `godot_tools` discovery/dispatch. |
|
|
795
|
+
| `GODOT_MCP_PRIVILEGED_GROUPS` | Optional comma-separated least-privilege grants: `reflection`, `code-execution`, and/or `network`. All are denied by default. |
|
|
796
|
+
| `GODOT_MCP_ALLOW_PRIVILEGED_COMMANDS` | Optional, default `false`. Explicitly enable runtime `eval`, arbitrary property/method access, script control, RPC, HTTP, and WebSocket commands for a trusted localhost developer workflow. |
|
|
797
|
+
|
|
798
|
+
### Structured runtime evidence
|
|
799
|
+
|
|
800
|
+
With `DEBUG=true`, the MCP server emits JSON request lifecycle events to
|
|
801
|
+
stderr. The Godot runtime emits matching events to its captured stdout. Both
|
|
802
|
+
use an internal `mcp_<number>` correlation ID and controlled event fields;
|
|
803
|
+
parameters, response values, secrets, source, URLs, and malformed payloads are
|
|
804
|
+
never copied into logs. Runtime process output is capped at the latest 1,000
|
|
805
|
+
stdout and stderr lines. Stable JSON-RPC error codes remain the authoritative
|
|
806
|
+
machine-readable failure classification.
|
|
807
|
+
|
|
808
|
+
### Large-project response limits
|
|
809
|
+
|
|
810
|
+
Large responses are bounded rather than allowed to grow with project size.
|
|
811
|
+
`list_project_files` returns deterministic cursor pages of at most 1,000 files;
|
|
812
|
+
`game_get_scene_tree` returns deterministic pre-order trees of 1,000 nodes by
|
|
813
|
+
default (configurable up to 10,000) and reports truncation. `game_get_logs` and
|
|
814
|
+
`game_get_errors` return at most 1,000 unread lines per call with `hasMore` and
|
|
815
|
+
`remaining`, while retaining the latest 1,000 lines per stream. Runtime JSON
|
|
816
|
+
responses are capped at 8 MiB, screenshots additionally enforce pixel and
|
|
817
|
+
6 MiB PNG limits, and short-lived subprocess/import commands cap captured output
|
|
818
|
+
at 16 MiB. Limit failures are explicit; callers can narrow resource/import
|
|
819
|
+
queries instead of receiving partial unlabelled data.
|
|
820
|
+
|
|
821
|
+
## Architecture
|
|
822
|
+
|
|
823
|
+
The server uses three bounded execution paths:
|
|
824
|
+
|
|
825
|
+
1. **Persistent authoring session** - The primary scene/resource authoring path.
|
|
826
|
+
It owns a headed, deterministic Godot main loop and serves authenticated
|
|
827
|
+
JSON-RPC commands without paying engine startup cost per edit.
|
|
828
|
+
|
|
829
|
+
2. **Running-game socket** - `run_project` launches the user's game headed and
|
|
830
|
+
injects the authenticated `mcp_interaction_server.gd` autoload through
|
|
831
|
+
`override.cfg` for high-fidelity runtime interaction.
|
|
832
|
+
|
|
833
|
+
3. **One-shot subprocess fallback** - Isolated authoring, validation, import,
|
|
834
|
+
and export operations may invoke Godot once and exit. Commands that do not
|
|
835
|
+
render may internally use `--headless`; this is not a supported display-less
|
|
836
|
+
agent-loop tier. Authoring sessions, running games, screenshots, and visual
|
|
837
|
+
verification require a desktop display, Xvfb, or another reachable rendering
|
|
838
|
+
context and fail fast when none exists.
|
|
839
|
+
|
|
840
|
+
### Source layout
|
|
841
|
+
|
|
842
|
+
| Path | Description |
|
|
843
|
+
| ------ | ------------- |
|
|
844
|
+
| `src/index.ts` | MCP server, tool definitions, and all handlers |
|
|
845
|
+
| `src/utils.ts` | Pure utility functions (parameter mapping, validation, error helpers) |
|
|
846
|
+
| `src/scripts/godot_operations.gd` | Persistent and one-shot GDScript operations runner |
|
|
847
|
+
| `src/scripts/mcp_interaction_server.gd` | TCP interaction server autoload |
|
|
848
|
+
| `tests/` | Vitest test suite |
|
|
849
|
+
|
|
850
|
+
## Testing
|
|
851
|
+
|
|
852
|
+
The project uses Vitest plus direct Godot and full MCP-to-Godot suites. The
|
|
853
|
+
source-derived tool, action, command, and suite inventory is published in the
|
|
854
|
+
[coverage report](docs/coverage/coverage-report.md).
|
|
855
|
+
|
|
856
|
+
```bash
|
|
857
|
+
npm run check # TypeScript tests, lint, build, and coverage drift
|
|
858
|
+
npm run test:e2e # built MCP server through a real client and Godot
|
|
859
|
+
npm run test:golden-agent # cold-agent game build acceptance gate
|
|
860
|
+
npm run test:godot # strict parsing, subprocess operations, runtime protocol
|
|
861
|
+
npm run test:watch # watch mode
|
|
862
|
+
```
|
|
863
|
+
|
|
864
|
+
## Example Prompts
|
|
865
|
+
|
|
866
|
+
```text
|
|
867
|
+
"Run my Godot project and check for errors"
|
|
868
|
+
|
|
869
|
+
"Eval this in my running game: return get_tree().current_scene.name"
|
|
870
|
+
|
|
871
|
+
"Get the player's position in the running game"
|
|
872
|
+
|
|
873
|
+
"Set the player's health to 100"
|
|
874
|
+
|
|
875
|
+
"Read the test_level.tscn scene and show me the node tree"
|
|
876
|
+
|
|
877
|
+
"Change the player's speed property in the player.tscn scene file"
|
|
878
|
+
|
|
879
|
+
"List all .gd files in my project"
|
|
880
|
+
|
|
881
|
+
"Connect the enemy's 'died' signal to the game manager's 'on_enemy_died' method"
|
|
882
|
+
|
|
883
|
+
"Tween the camera's position to (0, 10, -5) over 2 seconds with ease-out"
|
|
884
|
+
|
|
885
|
+
"Get performance metrics - what's my FPS and draw call count?"
|
|
886
|
+
|
|
887
|
+
"Pause the game and take a screenshot"
|
|
888
|
+
|
|
889
|
+
"Find all CharacterBody3D nodes in the scene"
|
|
890
|
+
|
|
891
|
+
"Create a new Godot project called 'MyGame' and write a player script"
|
|
892
|
+
|
|
893
|
+
"Create a new C# (.NET) Godot project and add a CharacterBody2D script"
|
|
894
|
+
|
|
895
|
+
"Validate player.gd for errors"
|
|
896
|
+
|
|
897
|
+
"Check all my changed GDScript files for syntax errors before I run the game"
|
|
898
|
+
|
|
899
|
+
"Hold down the W key for 2 seconds to test walking"
|
|
900
|
+
|
|
901
|
+
"Cast a ray from the player downward to check for ground"
|
|
902
|
+
|
|
903
|
+
"Get the camera position and move it to look at the player"
|
|
904
|
+
|
|
905
|
+
"Show me the latest error messages from the running game"
|
|
906
|
+
```
|
|
907
|
+
|
|
908
|
+
## License
|
|
909
|
+
|
|
910
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
911
|
+
|
|
912
|
+
## Lineage
|
|
913
|
+
|
|
914
|
+
- **Original project:** [godot-mcp](https://github.com/Coding-Solo/godot-mcp)
|
|
915
|
+
by [Solomon Elias (Coding-Solo)](https://github.com/Coding-Solo), which
|
|
916
|
+
provided the foundational TypeScript MCP server, headless GDScript operations,
|
|
917
|
+
and TCP runtime interaction architecture.
|
|
918
|
+
- **Inherited from:** [Tugcan Topaloglu](https://github.com/tugcantopaloglu)'s
|
|
919
|
+
[godot-mcp](https://github.com/tugcantopaloglu/godot-mcp), which extended the
|
|
920
|
+
original project across networking, 3D/2D rendering, UI controls, audio,
|
|
921
|
+
animation, file I/O, runtime code execution, project creation, and physics
|
|
922
|
+
while preserving the MIT license.
|
|
923
|
+
- **Godot Agent Loop:** maintained and substantially extended by
|
|
924
|
+
[Berke Arslan](https://github.com/beremaran), preserving the complete Git
|
|
925
|
+
history and every inherited MIT notice.
|