Godot MCP
Provides tools for interacting with the Godot game engine, including launching the editor, running and stopping projects, capturing debug output and GDScript backtraces, reading and editing scenes and scripts, validating GDScript, managing resources and UIDs, and performing reference-aware asset refactoring.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Godot MCP
((((((( (((((((
((((((((((( (((((((((((
((((((((((((( (((((((((((((
(((((((((((((((((((((((((((((((((
(((((((((((((((((((((((((((((((((
((((( ((((((((((((((((((((((((((((((((((((((((( (((((
(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
(((((((((((@@@@@@@(((((((((((((((((((((((((((@@@@@@@(((((((((((
(((((((((@@@@,,,,,@@@(((((((((((((((((((((@@@,,,,,@@@@(((((((((
((((((((@@@,,,,,,,,,@@(((((((@@@@@(((((((@@,,,,,,,,,@@@((((((((
((((((((@@@,,,,,,,,,@@(((((((@@@@@(((((((@@,,,,,,,,,@@@((((((((
(((((((((@@@,,,,,,,@@((((((((@@@@@((((((((@@,,,,,,,@@@(((((((((
((((((((((((@@@@@@(((((((((((@@@@@(((((((((((@@@@@@((((((((((((
(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
@@@@@@@@@@@@@((((((((((((@@@@@@@@@@@@@((((((((((((@@@@@@@@@@@@@
((((((((( @@@(((((((((((@@(((((((((((@@(((((((((((@@@ (((((((((
(((((((((( @@((((((((((@@@(((((((((((@@@((((((((((@@ ((((((((((
(((((((((((@@@@@@@@@@@@@@(((((((((((@@@@@@@@@@@@@@(((((((((((
(((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
(((((((((((((((((((((((((((((((((((((((((((((((((((((
(((((((((((((((((((((((((((((((((((((((((((((((
(((((((((((((((((((((((((((((((((
/$$ /$$ /$$$$$$ /$$$$$$$
| $$$ /$$$ /$$__ $$| $$__ $$
| $$$$ /$$$$| $$ \__/| $$ \ $$
| $$ $$/$$ $$| $$ | $$$$$$$/
| $$ $$$| $$| $$ | $$____/
| $$\ $ | $$| $$ $$| $$
| $$ \/ | $$| $$$$$$/| $$
|__/ |__/ \______/ |__/A Model Context Protocol (MCP) server for interacting with the Godot game engine.
Introduction
Godot MCP enables AI agents to launch the Godot editor, run projects, capture debug output, and control project execution. This direct feedback loop helps agents understand what works and what doesn't in real Godot projects, leading to better code generation and debugging assistance.
Related MCP server: Godot MCP
Features
A complete agent loop: see → edit → verify → run → observe.
See:
read_scenereturns the whole node tree with typed property values;read_file/list_filesread scripts, scenes and resources;scene_structurereports inherited bases, instanced sub-scenes and UIDs before you touch anything.Edit: create scenes, add/modify/remove nodes, rename, attach GDScript, assign textures, save variants — with JSON-friendly property values (
[x,y]or{"x":..,"y":..}for Vector2,"#ff0000"for Color,"res://..."for resources).Verify:
validate_scriptparse-checks GDScript through the engine and reports file:line errors (autoload false positives are filtered out).Run:
run_projectwithheadless+quitAfterfor scripted verification runs, orrun_scriptfor one-off headless GDScript tools.Observe:
get_debug_outputkeeps stdin/stdout/stderr after the process exits, with incremental (since) andclearpaging, plus exit codes and GDScript backtraces.Fail loudly: every engine operation returns an exit code and an explicit
[ERROR]contract, so a rejected property or a failed save can never be reported as success.
Tools (26)
Area | Tools |
Project |
|
Refactor assets |
|
Scenes (read) |
|
Scenes (write) |
|
Resources / UID |
|
Scripts |
|
Run / debug |
|
Asset refactoring workflow
Reorganising a project touches three things at once: the file, its .import/.uid
sidecars, and every res:// reference. Use these tools in this order:
find_references— see what references the file before touching it. It skips the file's own.import, which would otherwise always match.move_file— move/rename it. The tool carries the.importand.uidsidecars, rewritessource_file, and rewrites everyres://reference.rewrite_references— when the file is replaced rather than moved (e.g. a.pngre-encoded to.webp), repoint references without moving anything.
Clear
.godot/uid_cache.binafter replacing assets. Godot resolves a scene'suid="uid://..."through that cache first, so a stale entry makes it look for the deleted path and fail with[ext_resource] referenced non-existent resourceeven though the scene text is already correct. Deleting the cache is safe — it is rebuilt on the next editor start.
Helper scripts (read-only unless noted):
node scripts/audit-assets.mjs <project> # unused assets, junk, duplicates, size per dir
node scripts/check-refs.mjs <project> # every res:// reference resolves (exit 1 if not)
node scripts/check-stale-refs.mjs <project> # leftover old paths after a rename pass
node scripts/find-decor-scales.mjs <project> # instanced scenes and their scale overridesscripts/optimize_textures.gd is a one-off texture optimiser: run it through the
run_script tool, not with node. It crops animation frames to their used rect,
downscales them, and re-encodes the remaining bitmaps to WebP — reporting the
size delta and the scale factor the scene must compensate with.
Safety model
Every path is resolved inside the project;
..and absolute paths are rejected.write_file/delete_fileback the previous content up to.godot/mcp_backups/(git-ignored by default) before changing anything.Scenes whose root is an instance of another scene (inherited scenes) are refused, because re-packing would copy the base scene inline. Pass
force: trueto accept that.Scenes that merely contain instanced sub-scenes are allowed (Godot preserves
scene_file_pathon re-pack) but return a warning, since the whole file is rewritten.Property writes that the engine silently drops are reported as failures with the requested value, instead of pretending they worked.
Tool result contract
The bundled GDScript exits non-zero and prints [ERROR] ... on any failure, and prints exactly one [RESULT]<json> line on success. The server treats a non-zero exit code or an [ERROR] line as a failure, so an agent can trust isError.
Requirements
Godot Engine installed on your system
Node.js (>=18.0.0) and npm
An AI agent that supports MCP
Quick Start
Claude Code
claude mcp add godot -- npx @coding-solo/godot-mcpThat's it. Restart Claude Code and your Godot MCP tools are available.
With environment variables:
claude mcp add godot -e GODOT_PATH=/path/to/godot -e DEBUG=true -- npx @coding-solo/godot-mcpAdd to your Cline MCP settings file (~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json):
{
"mcpServers": {
"godot": {
"command": "npx",
"args": ["@coding-solo/godot-mcp"],
"env": {
"DEBUG": "true"
},
"disabled": false,
"autoApprove": [
"launch_editor",
"run_project",
"get_debug_output",
"stop_project",
"get_godot_version",
"list_projects",
"get_project_info",
"create_scene",
"add_node",
"load_sprite",
"export_mesh_library",
"save_scene",
"get_uid",
"update_project_uids"
]
}
}
}Using the Cursor UI:
Go to Cursor Settings > Features > MCP
Click on the + Add New MCP Server button
Fill out the form:
Name:
godotType:
commandCommand:
npx @coding-solo/godot-mcp
Click "Add"
You may need to press the refresh button in the top right corner of the MCP server card to populate the tool list
Using Project-Specific Configuration:
Create a file at .cursor/mcp.json in your project directory:
{
"mcpServers": {
"godot": {
"command": "npx",
"args": ["@coding-solo/godot-mcp"],
"env": {
"DEBUG": "true"
}
}
}
}For any MCP-compatible client, use this configuration:
{
"mcpServers": {
"godot": {
"command": "npx",
"args": ["@coding-solo/godot-mcp"],
"env": {
"GODOT_PATH": "/path/to/godot",
"DEBUG": "true"
}
}
}
}Environment Variables
Variable | Description |
| Path to the Godot executable (overrides automatic detection) |
| Set to |
| Set to |
| Timeout for a single engine operation (default |
git clone https://github.com/xuxinzhi007/godot-mcp.git
cd godot-mcp
npm install
npm run buildThen point your MCP client to build/index.js instead of using npx.
Smoke-test the server without a client (needs GODOT_PATH for engine-backed steps):
GODOT_PATH=/path/to/godot npm run probe:smoke
# or replay your own plan: npm run probe -- my-plan.jsonscripts/probe.mjs speaks MCP over stdio and prints PASS/FAIL per step, which is handy for verifying behaviour against a real project.
Architecture
MCP client (stdio)
└─ TypeScript server (src/index.ts)
├─ file tools → plain fs access, project-scoped
├─ verification → godot --check-only --script <file>
├─ run/debug → child process + retained log buffer
└─ scene/resource ops → godot --headless --script godot_operations.gd <op> <json>The bundled src/scripts/godot_operations.gd is a single SceneTree entry point that dispatches JSON operations. It is used only for work that needs the engine (scene packing, resource saving, UID lookup); everything else is plain filesystem access so it stays fast.
Why a script instead of an editor plugin: this keeps the server usable in headless / CI environments. The trade-off is that scene edits re-pack the file, which is why the structural safety checks above exist.
Troubleshooting
Godot Not Found: Set the
GODOT_PATHenvironment variable to your Godot executable pathConnection Issues: Ensure the server is running and restart your AI assistant
Invalid Project Path: Ensure the path points to a directory containing a
project.godotfileBuild Issues: Make sure all dependencies are installed by running
npm install
Ensure the MCP server shows up and is enabled in Cursor settings (Settings > MCP)
MCP tools can only be run using the Agent chat profile (Cursor Pro or Business subscription)
Use "Yolo Mode" to automatically run MCP tool requests
Credits
Originally based on Coding-Solo/godot-mcp (MIT). This fork rewrites the operation protocol (v2), adds scene reading, reference-aware file moves, script validation, headless runs and a retained debug log.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
AI game maker: build, run, screenshot and play-test Godot and retro console games in a live project
Develop, manage, and debug Railway projects, services, and deployments from within agents.
Drive real devices from your AI Coding tool. Embed a client SDK (Unity, Godot, Flutter, iOS/macOS, Android, React Native, Web) in your app, then capture screenshots, traverse the UI tree, inject taps and key events, and run automated test tasks on the physical device over a secure relay.
Persistent cloud workspaces for AI agents: run commands, edit files, use git and a browser.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI assistants to interact with the Godot game engine by launching the editor, running projects, capturing debug output, managing scenes and nodes, and controlling project execution through a standardized interface.18194 npm11MIT
- AlicenseBqualityNot gradedmaintenanceEnables AI assistants to interact with the Godot game engine by launching the editor, running projects, capturing debug output, managing scenes and nodes, and controlling project execution through a standardized interface.14194 npm1-
- AlicenseBqualityCmaintenanceEnables AI assistants to interact with the Godot game engine, including launching the editor, running projects, capturing debug output, and managing scenes.8456 PyPI1MIT
- AlicenseAqualityDmaintenanceEnables AI agents to launch, edit, debug, and test Godot game projects with comprehensive scene and script manipulation tools.501MIT