godot-mcp-rts
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@godot-mcp-rts test_run_scenario with a unit movement scenario"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Godot MCP RTS
Extended MCP (Model Context Protocol) server for the Godot game engine, with RTS agentic testing, scene/script introspection & mutation, and live game screenshot capture.
Forked from Coding-Solo/godot-mcp.
What this fork adds
On top of the original 14 godot-mcp tools, this fork ships 15 additional tools in three groups:
Test harness — agentic game testing (
test_get_info,test_get_game_state,test_validate_scenario,test_check_entity,test_validate_paths,test_run_scenario,test_check_mlx)Scene & script introspection / mutation —
get_scene_tree,remove_node,set_node_property,create_script,attach_script,list_scriptsVisual capture —
take_screenshot(script-mode, standalone scenes) andtest_take_screenshot(live game via TestController IPC, real scenes with autoloads)
Plus infrastructure improvements:
Upgraded to MCP SDK 1.x (from 0.6.0)
preflightProject()helper retrofit on the scene-op handlers (−150 LoC of validation boilerplate)Dropped the unused
axiosdependency (npm auditclean)End-to-end test suite (
npm test) covering protocol handshake, all mutation tools, and live screenshot capture
Related MCP server: Open Godot MCP
Tool reference
All 29 tools at a glance:
Original Godot MCP tools (14)
Tool | Purpose |
| Open the Godot editor for a project |
| Run a project in debug mode and capture output |
| Read stdout/stderr from the running project |
| Stop the running project |
| Print the installed Godot version |
| Find Godot projects in a directory |
| Project metadata + counts of scenes/scripts/assets |
| Create a new |
| Add a node to a scene |
| Load a texture into a Sprite2D/Sprite3D/TextureRect |
| Export a scene as a |
| Save a scene (optionally to a new path) |
| Get the UID of a file (Godot 4.4+) |
| Resave resources to refresh UID references |
Test harness tools (7)
Tool | Purpose |
| Test harness capabilities + project info |
| Snapshot of autoloads, constants, config |
| Validate a scenario config before running it |
| Verify a unit/building/resource scene exists |
| Validate all expected paths for a race |
| Launch the game with |
| MLX local LLM health + Apple Silicon platform info |
Scene & script tools (6, new in v0.3.0)
Tool | Purpose |
| Hierarchical JSON dump of a scene's nodes |
| Delete a node from a scene and save |
| Bulk-set properties on an existing node |
| Create a |
| Attach an existing script to a node in a scene |
| Recursively list |
Visual capture tools (2, new in v0.3.0)
Tool | Purpose |
| Render a scene via |
| Capture the currently running game via file-based IPC with TestController. Real game scenes with autoloads loaded. |
Installation
git clone https://github.com/mikeumus/godot-mcp-rts.git
cd godot-mcp-rts
npm install # also runs npm run build via the prepare hookConfiguration
Claude Code
Add to your MCP settings (.claude/settings.json or global settings):
{
"mcpServers": {
"godot": {
"command": "node",
"args": ["/absolute/path/to/godot-mcp-rts/build/index.js"],
"env": {
"GODOT_PATH": "/Applications/Godot.app/Contents/MacOS/Godot"
}
}
}
}Cline / Cursor / other MCP clients
Same configuration format. The server speaks MCP over stdio.
Environment variables
GODOT_PATH— Path to the Godot executable. If unset, the server auto-detects common install locations on macOS / Windows / Linux.DEBUG— Set totruefor verbose stderr logging.
Usage examples
Inspect a scene
get_scene_tree(
projectPath: "/path/to/game",
scenePath: "maps/test_map.tscn",
includeProperties: true
)Returns nested JSON with name, type, path, script, children, and
optionally properties.position / properties.visible for each node.
Create a script and attach it
create_script(
projectPath: "/path/to/game",
scriptPath: "scripts/my_unit.gd",
extendsClass: "CharacterBody3D"
)
attach_script(
projectPath: "/path/to/game",
scenePath: "units/my_unit.tscn",
nodePath: "MyUnit",
scriptPath: "scripts/my_unit.gd"
)Set node properties
set_node_property(
projectPath: "/path/to/game",
scenePath: "units/my_unit.tscn",
nodePath: "MyUnit",
properties: { visible: false, modulate.r: 0.5 }
)Note: Property names are converted to snake_case before reaching Godot. Built-in Godot properties (
position,rotation_degrees, etc.) are already snake_case so this is a no-op for them. Vector/Color values can't currently round-trip through JSON; pass scalar properties only.
Run a test scenario
test_run_scenario(
projectPath: "/path/to/game",
timeout: 30000
)Launches the game with the --test-harness flag, capturing stdout for
later inspection via get_debug_output.
Capture a live game screenshot
# 1. Start the game (must be running for IPC to work)
run_project(projectPath: "/path/to/game")
# 2. Wait a few seconds for it to render the first frame, then
test_take_screenshot(projectPath: "/path/to/game")
# → Screenshot saved to: /path/to/game/.mcp_screenshots/capture_<id>.png
# 3. Stop when done
stop_project()TestController integration
For the test harness tools and test_take_screenshot to work, your
Godot project needs to include the TestController autoload from
tests/harness/test_controller.gd (or its parent-repo equivalent).
Setup
Copy
tests/harness/test_controller.gdinto your projectRegister it as an autoload (Project Settings → AutoLoad)
The controller activates when the game runs with
--test-harness,--test-mode, or when theGODOT_MCP_TESTenv var is setThe screenshot polling code is independent of activation — it runs in any debug build so
test_take_screenshotworks even from a plainrun_projectinvocation
Screenshot IPC architecture
test_take_screenshot uses a file-based IPC handshake instead of trying
to capture from a headless --script subprocess (which can't load
autoloads or the main scene):
MCP server Running game
───────────── ────────────
1. Write request.json ──→ .mcp_screenshots/ ─→ TestController._process()
{ request_id, output_path? } polls every 6 frames
2. Detect request
3. get_viewport()
.get_texture()
.get_image()
.save_png(...)
4. Poll for response.json ←── .mcp_screenshots/ ←─ Write response.json
{ request_id, status, absolute_path } Print TestController logThe polling is gated on OS.is_debug_build() so exported builds are
unaffected. The polling interval is 6 frames (~10 Hz at 60 fps), which is
fast enough to feel synchronous from the MCP side and slow enough to be
free.
The IPC workspace lives at <projectPath>/.mcp_screenshots/. Add it to
your .gitignore:
.mcp_screenshots/Testing
This project has an end-to-end test suite that exercises a real Godot
binary. There are no unit tests — the value of testing this server lives
almost entirely in verifying that real godot --headless --script
invocations round-trip correctly, so e2e is the right shape.
npm run build # always build first
npm test # smoke + mutations (~35s, no game window)
npm run test:smoke # ~3s protocol handshake + tool registration
npm run test:mutations # ~30s every scene/script tool against a sandbox project
npm run test:screenshot # ~15s INTRUSIVE: opens a game window, opt-inThe screenshot test is opt-in and gated behind the MCP_TEST_PROJECT_PATH
env var:
MCP_TEST_PROJECT_PATH=/path/to/your/game npm run test:screenshotIt validates the full test_take_screenshot pipeline against a live game,
including the TestController IPC handshake. See
tests/e2e/README.md for the full breakdown.
Architecture
Claude Code / Cursor / etc.
│
│ MCP over stdio (SDK 1.x)
▼
godot-mcp-rts (Node/TypeScript)
│
├──→ child_process → godot --headless --script godot_operations.gd <op> <json>
│ (most tools: scene mutation, script create, etc.)
│
├──→ child_process → godot --headless --script test_operations.gd <op> <json>
│ (test harness tools: state snapshots, validation)
│
├──→ child_process → godot <project> [--debug | --test-harness]
│ (run_project, test_run_scenario; long-running)
│
└──→ file-based IPC at <project>/.mcp_screenshots/request.json
(test_take_screenshot, polled by TestController)Development
npm run build # compile TypeScript, copy .gd scripts to build/
npm run watch # tsc --watch
npm run inspector # launch the MCP inspector UI against the built server
npm test # run the e2e suite (see Testing above)When adding a new tool, see CONTRIBUTING.md for the full checklist.
Project layout
godot-mcp-rts/
├── src/
│ ├── index.ts # MCP server, tool definitions, handlers
│ └── scripts/
│ ├── godot_operations.gd # Headless GDScript dispatcher (file ops)
│ └── test_operations.gd # Headless GDScript dispatcher (test harness)
├── tests/
│ └── e2e/
│ ├── _client.mjs # JSON-RPC stdio client + tiny test runner
│ ├── smoke.mjs # Protocol + tool registration check
│ ├── mutations.mjs # All scene/script tools, 20 assertions
│ ├── screenshot.mjs # Live game capture via TestController IPC
│ └── README.md # How to run / extend the suite
├── scripts/
│ └── build.js # Post-tsc copy of .gd files into build/
├── build/ # Compiled JS + copied scripts (gitignored)
├── README.md
├── CONTRIBUTING.md
├── LICENSE # MIT
├── package.json
└── tsconfig.jsonLicense
MIT — see LICENSE.
Credits
Original godot-mcp by Coding-Solo
RTS testing extension and v0.3.0 tool additions by the As Above, So Below team
Available Tools
29 toolsadd_nodeB
Add a node to an existing scene
Inputs: nodeName (required), nodeType (required), scenePath (required), projectPath (required), +2 more.
attach_scriptB
Attach an existing GDScript to a node in a scene
Inputs: nodePath (required), scenePath (required), scriptPath (required), projectPath (required).
create_sceneA
Create a new Godot scene file
Inputs: scenePath (required), projectPath (required), rootNodeType.
create_scriptB
Create a new GDScript file with optional content or default template
Inputs: scriptPath (required), projectPath (required), content, extendsClass.
export_mesh_libraryB
Export a scene as a MeshLibrary resource
Inputs: scenePath (required), outputPath (required), projectPath (required), meshItemNames.
get_debug_outputB
Get the current debug output and errors
Inputs: no named parameters.
get_godot_versionA
Get the installed Godot version
Inputs: no named parameters.
get_project_infoB
Retrieve metadata about a Godot project
Inputs: projectPath (required).
get_scene_treeA
Get the hierarchical node tree of a scene file as JSON
Inputs: scenePath (required), projectPath (required), includeProperties.
get_uidB
Get the UID for a specific file in a Godot project (for Godot 4.4+)
Inputs: filePath (required), projectPath (required).
launch_editorC
Launch Godot editor for a specific project
Inputs: projectPath (required).
list_projectsA
List Godot projects in a directory
Inputs: directory (required), recursive.
list_scriptsA
Recursively list all .gd scripts in the project or a subdirectory
Inputs: projectPath (required), directory.
load_spriteC
Load a sprite into a Sprite2D node
Inputs: nodePath (required), scenePath (required), projectPath (required), texturePath (required).
remove_nodeB
Remove a node from a scene and save
Inputs: nodePath (required), scenePath (required), projectPath (required).
run_projectC
Run the Godot project and capture output
Inputs: projectPath (required), scene.
save_sceneC
Save changes to a scene file
Inputs: scenePath (required), projectPath (required), newPath.
set_node_propertyA
Set one or more properties on an existing node and save the scene
Inputs: nodePath (required), scenePath (required), properties (required), projectPath (required).
stop_projectA
Stop the currently running Godot project
Inputs: no named parameters.
take_screenshotA
Render a scene headlessly via --script and capture a PNG. Best for standalone scenes without autoload deps. For real game scenes, prefer test_take_screenshot against a running game.
Inputs: scenePath (required), projectPath (required), outputPath.
test_check_entityC
Check if a unit, building, or resource scene exists and get its properties
Inputs: entityType (required), projectPath (required), race.
test_check_mlxB
Check MLX local LLM server health and Apple Silicon platform compatibility
Inputs: projectPath (required), mlxUrl.
test_get_game_stateC
Get a snapshot of game state including available autoloads, constants, and configuration
Inputs: projectPath (required), include.
test_get_infoC
Get information about the test harness capabilities and game project
Inputs: projectPath (required).
test_run_scenarioB
Run the game with test harness mode enabled for a specific scenario
Inputs: projectPath (required), scene, timeout.
test_take_screenshotA
Capture a screenshot of the currently running game via file-based IPC with TestController. Requires the game to already be running (use run_project or test_run_scenario first). Works with autoloads and real scenes.
Inputs: projectPath (required), timeout, outputPath.
test_validate_pathsB
Validate that all unit/building scene paths exist for a race
Inputs: projectPath (required), race.
test_validate_scenarioA
Validate that a test scenario configuration is valid before running it
Inputs: config (required), projectPath (required).
update_project_uidsB
Update UID references in a Godot project by resaving resources (for Godot 4.4+)
Inputs: projectPath (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 29 tools
Most tools have clearly distinct purposes, though test_check_entity and test_validate_paths overlap somewhat in validating scene paths. The two screenshot tools are adequately differentiated by their descriptions, but the large number of test_* tools could cause brief confusion.
All tool names follow a consistent verb_noun pattern, using lowercase with underscores. Prefixes like 'get_', 'list_', 'create_', 'test_' are applied uniformly, making the naming predictable and readable.
At 29 tools, the count exceeds the 25 threshold for 'too many' per the calibration. While the server covers multiple sub-domains (project management, scene editing, testing, screenshots), the sheer number makes the toolset feel heavy and harder to navigate.
The toolset covers the core lifecycle of Godot project management, scene editing, scripting, testing, and screenshots. Missing operations like scene deletion or project settings editing are minor gaps that agents can work around.
Related MCP Connectors
Make games with AI: one MCP server that connects your agent to Unity, Unreal and Godot editors.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal E…
MCP server for building and testing AI agents with multi-model experimentation and insights.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that enables AI assistants to directly run, inspect, modify, and debug Godot game development projects through 110+ tools covering scenes, scripts, resources, runtime debugging, and asset management.333MIT
- AlicenseBqualityCmaintenanceMCP server for Godot Engine enabling AI to autonomously develop, test, and debug games with deterministic playtesting, multiplayer testing, DAP debugging, LSP integration, and token efficiency.3115MIT
- AlicenseNot gradedqualityCmaintenanceA security-first MCP server and Godot editor addon enabling AI agents to observe and control Godot games through bounded, permission-gated tools for debugging, input automation, and project editing.MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that enables AI agents to control and interact with Godot 4 editor, allowing scene manipulation, file editing, and project inspection through natural language.MIT