Godot MCP
Edit Godot 4 scenes, nodes and scripts; run, test and debug games live in the editor or headless.
التثبيت
أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: .cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).
@shin2344234/godot-mcpclaude mcp add godot-mcp -e 'GODOT_PROJECT_PATH=<GODOT_PROJECT_PATH>' -e 'GODOT_PATH=<GODOT_PATH>' -e 'GODOT_MCP_MODE=full' -e 'GODOT_MCP_TOOLSETS=<GODOT_MCP_TOOLSETS>' -e 'GODOT_MCP_READ_ONLY=false' -e 'GODOT_MCP_ALLOW_EVAL=false' -e 'GODOT_MCP_CONFIRM=elicit' -e 'GODOT_MCP_LOG_LEVEL=info' -e 'GODOT_MCP_HEADLESS_TIMEOUT_MS=120000' -e 'GODOT_MCP_BRIDGE_TIMEOUT_MS=30000' -e 'GODOT_MCP_LSP_PORT=<GODOT_MCP_LSP_PORT>' -e 'GODOT_MCP_LSP_TIMEOUT_MS=15000' -e 'GODOT_MCP_LSP_IDLE_MS=600000' -e 'GODOT_MCP_CACHE_DIR=<GODOT_MCP_CACHE_DIR>' -- npx -y @shin2344234/godot-mcp@0.1.2
{
"mcpServers": {
"godot-mcp": {
"command": "npx",
"args": [
"-y",
"@shin2344234/godot-mcp@0.1.2"
],
"env": {
"GODOT_PROJECT_PATH": "<GODOT_PROJECT_PATH>",
"GODOT_PATH": "<GODOT_PATH>",
"GODOT_MCP_MODE": "full",
"GODOT_MCP_TOOLSETS": "<GODOT_MCP_TOOLSETS>",
"GODOT_MCP_READ_ONLY": "false",
"GODOT_MCP_ALLOW_EVAL": "false",
"GODOT_MCP_CONFIRM": "elicit",
"GODOT_MCP_LOG_LEVEL": "info",
"GODOT_MCP_HEADLESS_TIMEOUT_MS": "120000",
"GODOT_MCP_BRIDGE_TIMEOUT_MS": "30000",
"GODOT_MCP_LSP_PORT": "<GODOT_MCP_LSP_PORT>",
"GODOT_MCP_LSP_TIMEOUT_MS": "15000",
"GODOT_MCP_LSP_IDLE_MS": "600000",
"GODOT_MCP_CACHE_DIR": "<GODOT_MCP_CACHE_DIR>"
}
}
}
}
متغيرات البيئة
GODOT_PROJECT_PATHFolder of the Godot project (the one containing project.godot). Defaults to the folder the client starts the server in, so set it whenever that is not your project (e.g. in desktop apps).GODOT_PATHFull path of the Godot 4.x executable (GODOT_BIN is accepted too). If unset, the server looks for godot, godot4 or Godot_v4* on PATH. On Windows use the main Godot exe, not the _console.exe launcher.GODOT_MCP_MODEHow tools are exposed: 'full' lists every enabled operation as its own tool (best for clients with tool search); 'compact' lists only core tools plus router tools that reach the rest.GODOT_MCP_TOOLSETSComma-separated tool groups to enable, or 'all' (default). Groups: core, files, scene, node, script, run, editor, signal, resource, visual, anim, world, audio, project, import, export, code, docs, game, debug, test. 'core' is always on.GODOT_MCP_READ_ONLYSet to true to hide every tool that changes something (inspection only).GODOT_MCP_ALLOW_EVALSet to true to let godot_game_eval run GDScript inside the running game. Off by default: evaluated code can do anything the game can (files, OS calls).GODOT_MCP_CONFIRM'elicit' asks the user (through the client's elicitation dialog, when supported) before irreversible operations; 'never' skips asking, for unattended runs where nobody can answer.GODOT_MCP_LOG_LEVELVerbosity of the server's stderr log (use 'debug' when filing a bug report).GODOT_MCP_HEADLESS_TIMEOUT_MSAdvanced: timeout for one headless Godot invocation, in milliseconds.GODOT_MCP_BRIDGE_TIMEOUT_MSAdvanced: timeout for one request to the live editor bridge, in milliseconds.GODOT_MCP_LSP_PORTAdvanced: port of the Godot editor's GDScript language server on 127.0.0.1. Defaults to the port the editor plugin reports, else 6005.GODOT_MCP_LSP_TIMEOUT_MSAdvanced: timeout for one GDScript language server request, in milliseconds.GODOT_MCP_LSP_IDLE_MSAdvanced: stop the private headless language server after this many milliseconds without code tool calls.GODOT_MCP_CACHE_DIRAdvanced: folder for the server's cache (the Godot class docs index). Defaults to the per-user cache folder of the OS.
التوثيق
مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.
godot-mcp
An MCP server for the Godot 4 engine. It lets AI agents such as Claude Code, Claude Desktop, Cursor, VS Code Copilot, Codex, Gemini CLI, Windsurf and Zed work on your Godot project:
- inspect and edit scenes, nodes, signals and resources
- author animations, AnimationTrees, SpriteFrames, tile maps, navigation, audio buses and visual shaders
- change project settings, input actions, autoloads, import options and export presets, and run exports
- write scripts with GDScript language-server diagnostics, symbols and renames
- look up the Godot class reference offline for the exact version you have installed
- run the game and work on it live: inspect and change nodes, send input, pause and step frames, take screenshots, profile, record and replay input
- debug with breakpoints, stepping, stack and variables, and run GUT or GdUnit4 tests
It works through a live editor bridge, so every scene edit can be undone with Ctrl+Z, and through headless Godot when the editor is closed.
Requirements
- Godot 4.7 or newer (tested with 4.7.2)
- Node.js 22 or newer, unless you use the Claude Desktop bundle, which brings its own
Install
In your Godot project folder (the one with project.godot), run:
npx -y @shin2344234/godot-mcp init
init shows its plan and asks before writing anything (--dry-run previews, --remove undoes). It copies the editor addon into addons/godot_mcp and enables it, registers the server with the agents it finds on your machine (or the ones you pick with --agents claude-code,cursor,vscode,codex,gemini-cli,...), and adds a short note to AGENTS.md.
Then open the project in Godot, start a new agent session and ask it to call godot_status to check the connection.
Other ways to install
- Claude Code plugin: run
/plugin marketplace add shin2344234/godot-mcp, then/plugin install godot-mcp@godot-mcp. - Claude Desktop: download the
.mcpbfile from Releases and double-click it. - Any other MCP client: add the server to its config by hand. docs/setup.md gives the exact file and format for each client.
- From source:
git clone https://github.com/shin2344234/godot-mcp cd godot-mcp/server && npm install && npm run build cd /path/to/my-game node /path/to/godot-mcp/server/dist/index.js init
If you installed without init, ask the agent to run godot_addon_install once per project to add the editor addon.
Documentation
- Setup for each client: Claude Code, Claude Desktop, Cursor, VS Code, Codex, Gemini CLI, Windsurf and Zed, all options, and Windows notes
- Tools: every tool by group, tool modes and toolsets, resources and prompts
- How it works: editor bridge, headless fallback, the in-game runtime, safety and context size
- Troubleshooting: error messages and fixes
- All documentation, including the per-area method references and protocol designs
- Changelog · Contributing · Security
License
الأسئلة الشائعة
ما هو Godot MCP؟
Edit Godot 4 scenes, nodes and scripts; run, test and debug games live in the editor or headless.
كيف أثبّت Godot MCP؟
يعمل على جهازك. في Claude Code: claude mcp add godot-mcp -e 'GODOT_PROJECT_PATH=<GODOT_PROJECT_PATH>' -e 'GODOT_PATH=<GODOT_PATH>' -e 'GODOT_MCP_MODE=full' -e 'GODOT_MCP_TOOLSETS=<GODOT_MCP_TOOLSETS>' -e 'GODOT_MCP_READ_ONLY=false' -e 'GODOT_MCP_ALLOW_EVAL=false' -e 'GODOT_MCP_CONFIRM=elicit' -e 'GODOT_MCP_LOG_LEVEL=info' -e 'GODOT_MCP_HEADLESS_TIMEOUT_MS=120000' -e 'GODOT_MCP_BRIDGE_TIMEOUT_MS=30000' -e 'GODOT_MCP_LSP_PORT=<GODOT_MCP_LSP_PORT>' -e 'GODOT_MCP_LSP_TIMEOUT_MS=15000' -e 'GODOT_MCP_LSP_IDLE_MS=600000' -e 'GODOT_MCP_CACHE_DIR=<GODOT_MCP_CACHE_DIR>' -- npx -y @shin2344234/godot-mcp@0.1.2. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.
هل يحتاج Godot MCP إلى مفتاح API؟
لا يذكر إدراجه في السجل أي مفتاح أو سر إلزامي. قد تتطلب بعض الميزات حسابًا لدى الخدمة التي يتصل بها.
هل Godot MCP مفتوح المصدر؟
نعم. شيفرته متاحة على GitHub بترخيص MIT.
من يصون Godot MCP؟
ينشره shin2344234. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.
من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.