Godot MCP (bundled server, run and read errors)
/godot-mcp
A GameSkill skill that ships the godot-mcp server (Coding-Solo, MIT) pre-built as one Node file, so an agent can drive Godot 4 over MCP: run the game and read its printed output and errors, stop it, launch the editor, create scenes, add nodes, put textures on sprites, export a MeshLibrary and read UIDs. Nothing is installed from npm or GitHub; it needs only Node.js 18+ and Godot 4.
- 许可证
- MIT
- 出品
- GameSkill 出品
我们测过
在 Godot 4.7.2 (headless tools, run_project under xvfb) + Node 22, bundled godot-mcp 0.1.1 上通过 32/32 项检查(2026-10-30):能触发、有可运行示例、有截图和自检清单、单一职责、中英文文档齐全。触发检查是把提示词和 skill 描述做匹配,不是真实 agent 运行。
测试报告GameSkill 测过的版本
GameSkill 为 gameskill.dev 原创编写并测过。ZIP 里是完整的 skill:SKILL.md 及中文版、脚本、可运行示例、测试、自检清单和我们的测试报告。
GameSkill 原创,协议 MIT。ZIP 保留 LICENSE 和 CREDITS.md,里面列出了流程灵感来源、CC0 测试素材和第三方库及其协议。

自检清单
- 服务器用 node 从 skill 文件夹启动,没有用 npx 或 GitHub / The server runs with node from the skill folder, not npx or GitHub
- get_godot_version 返回了 4.x,GODOT_PATH 指对了 / get_godot_version returns 4.x, so GODOT_PATH is right
- 加素材后先跑过 godot --headless --import,load_sprite 没报 No loader / Assets were imported before load_sprite
- 游戏还在运行时读了 get_debug_output,errors 和 output 都看了 / Debug output was read while the game ran, errors as well as output
- Vector2、Color 这类属性没有靠 add_node 设置,改完看过 .tscn / Vector2 and Color were not set through add_node, and the .tscn was checked
- 结束时调用了 stop_project / stop_project was called at the end
中文指南
这个 skill 做什么
GameSkill 出品(MIT),基于 Coding-Solo 的 godot-mcp(MIT)。我们把 godot-mcp 0.1.1 服务器连同两个依赖打包成一个 Node 文件放进 ZIP,代码原样未改。agent 通过 MCP 驱动 Godot 4:
- 运行游戏,读它打印的输出和错误,再停掉;
- 打开编辑器;
- 建场景、加节点、给精灵设贴图、另存场景;
- 导出 GridMap 用的 MeshLibrary,读项目信息和资源 UID。
不从 npm 或 GitHub 装任何东西,只需要 Node.js 18 以上和 Godot 4。
什么时候用
- 想让 agent 连上 Godot,自己跑游戏、看报错、改代码
- 不打开编辑器,用 MCP 工具搭简单场景
- 环境里不能用 npx 或访问 GitHub
怎么装
- 下载本页的 ZIP,把
godot-mcp/放进.claude/skills/(Claude Code)或.agents/skills/(Codex、Cursor)。 - 注册服务器,比如 Claude Code:
claude mcp add godot -e GODOT_PATH=/path/to/godot -- node "$PWD/.claude/skills/godot-mcp/server/godot-mcp.mjs"。Codex 用codex mcp add godot --env GODOT_PATH=... -- node <路径>;Cursor 和 opencode 的配置写法见 SKILL.zh.md。 - 重启 agent,先调用
get_godot_version确认配好了。
好用的循环
- 加了素材先跑一次
godot --headless --path <项目> --import。 create_scene→add_node→load_sprite,改完看一眼.tscn。run_project,等 2-3 秒,get_debug_output,errors和output都看。- 改完再
run_project,最后stop_project。
我们实测发现的坑
- 游戏一退出,输出就没了,
get_debug_output只会说没有进程。读完输出再stop_project。 add_node只能设字符串、数字、布尔。{"x": 240, "y": 40}这类对象会被悄悄忽略,不会变成 Vector2。run_project会开窗口,服务器上要用xvfb-run。get_project_info返回的名字是文件夹名。get_uid之前要先跑update_project_uids。
我们怎么测的
在我们自己的 Firefly Jar 小项目上,用一个最小的 MCP 客户端走 stdio 测了 19 项:握手和 14 个工具、建场景加节点、设贴图、另存、导出 MeshLibrary、UID、运行并读到三行输出和一条故意的错误、停止、拒绝不安全路径,最后确认改过的场景还能在 Godot 里加载运行。Godot 4.7.2,Node 22。
致谢
服务器是 Solomon Elias(Coding-Solo)的 godot-mcp,MIT 许可,原样打包;@modelcontextprotocol/sdk 和 zod 也是 MIT。许可证全文在 ZIP 的 server/ 里,CREDITS.md 列出所有来源。
安装
告诉你的 AI
Install the skill from https://gameskill.dev/skills/godot-mcp/install.md
GameSkill 测过的版本
mkdir -p .claude/skills
curl -fsSL https://gameskill.dev/dl/skills/godot-mcp.zip -o /tmp/gameskill-godot-mcp.zip
unzip -oq /tmp/gameskill-godot-mcp.zip -d .claude/skills
rm /tmp/gameskill-godot-mcp.zip包含内容
- server/godot-mcp.mjs: godot-mcp 0.1.1 with its two dependencies in one file, code unchanged, sha256 in BUILD.md
- 14 tools: run_project, get_debug_output, stop_project, launch_editor, create_scene, add_node, load_sprite, save_scene, export_mesh_library, project info and UID tools
- Setup commands for Claude Code, Codex, Cursor and opencode, plus the run, read, fix loop
- Six gotchas measured in our tests, such as output vanishing when the game quits
- Our Firefly Jar example project and 19 MCP checks you can run yourself
适合
- A light Godot bridge for an agent: run the game and fix the errors it prints
- Making simple scenes and nodes without opening the editor
- Setting up an MCP server when npx or GitHub is not an option
不适合
- Setting Vector2, Color or other non-plain properties through add_node: they are silently ignored
- Deep live-editor control: see Godot AI (link only) for a larger tool set
- GDScript unit tests: see godot-gdscript-headless-testing
试试这条提示词
Run my Godot project, read the debug output and fix the first error.关于这个 Skill
godot-mcp gives an agent a working loop in Godot. It can run the game, read what it prints, fix the code and run it again, and it can make simple scene edits. GameSkill ships the server pre-built inside the skill as one Node file, so setup is a single mcp add that points at the skill folder. There is no npx, npm install or GitHub clone.
Agent steps
- Register the server with
node <skill>/server/godot-mcp.mjsandGODOT_PATH, then check it withget_godot_version. - Import the project once after adding assets (
godot --headless --path <project> --import). - Edit with
create_scene,add_nodeandload_sprite, then read the.tscn. - Run and read:
run_project, wait a moment, thenget_debug_output. Readerrors(push_error, script errors) as well asoutput. - Fix, run again, stop:
run_projectreplaces the previous run, andstop_projectreturns the final lines.
Gotchas we measured
- The output is gone once the game exits, so keep it open while the agent reads.
add_nodesets plain values only. A{x, y}object is silently ignored, not turned into a Vector2.run_projectopens a window, so a server needsxvfb-run. The scene tools run headless.get_project_infonames the project after its folder, andget_uidneedsupdate_project_uidsfirst.
Credits
The server is godot-mcp by Solomon Elias (Coding-Solo), MIT, bundled unchanged with @modelcontextprotocol/sdk and zod (both MIT). The skill text, the tests and the Firefly Jar example are ours. For a larger live-editor tool set, compare Godot AI, which is listed with a link only.
环境要求
- Godot 4.x installed locally (tested on 4.7.2); set GODOT_PATH if it is not on PATH
- Node.js 18+ (no npm install: the server is one bundled file)
- run_project opens a window: on a server or CI use a virtual display such as xvfb-run
相关主题
常见问题
肉鸽构筑白标起步工程(Godot 4 + Web + 平衡表)
告别空工程从零搭架子!开箱即玩的白标肉鸽构筑商业起步模板(Godot 4 完整工程 + Web 可玩版):含开局三槽赐福、无交叉 DAG 地图、扇形出牌、Boss 半血锁血、篝火/商店删牌、32 位校验防坏档 SaveStore、中英切换、30 牌/18 遗物/15 怪平衡表与 1,000 局 HTML 压测工具。
- 完整 Godot 4.3+ 工程(打开即 F5 运行,内置防坏档原子 SaveStore + 中英实时切换 LocService)
- 零构建 Web HTML5 可玩起步版(扇形手牌、2 帧受击闪白、震屏与 Boss 半血锁血全跑通)
基于 godot-mcp 0.1.1 (server bundled unchanged) (作者 Solomon Elias (Coding-Solo),MIT)。原作者的代码原样打包进 ZIP,附带其许可证;skill 文字、测试和示例由 GameSkill 编写,ZIP 里的 CREDITS.md 列出所有来源。
搭配使用
作者标注的相关 Skills,或更适合相邻任务的 Skills。
Godot AI
Production-grade MCP server and editor plugin for Godot 4.7+: 46 tools and 120+ operations for scenes, nodes, scripts, UI and more.
Godot Headless Testing
Run GDScript test suites from the command line with `godot --headless`, using a SceneTree/MainLoop runner script that exits non-zero on failure so CI can gate merges.
相似 skills
Claude Code Game Studios
Turns Claude Code into a full game studio: 49 agents and 72 workflow skills arranged like a real studio hierarchy.
Awesome Gamedev Agent Skills
77 portable SKILL.md skills across 12 engines (Godot, Unity, Unreal, Phaser, PixiJS, three.js, Bevy, pygame, LÖVE, Roblox, Defold, Ebitengine), with a router.
3AGameFactory (GameFactory-3A)
An Apache-2.0 framework of agent skills and pipelines that turns a game requirement into assets (image, 3D, motion, audio, CG video) and engine-ready code for UE5, Blender, Unity, Godot 4 and three.js.
GladeKit MCP (Unity + Godot)
One MCP server for Unity and Godot editors: 275 Unity tools, 115 Godot tools, gameplay scaffolders, screenshot checks and GLADE.md project context.