跳过主要内容
GDT
MCP免费GameSkill 出品GameSkill 原创

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 出品
下载 ZIP

我们测过

在 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 及中文版、脚本、可运行示例、测试、自检清单和我们的测试报告。

下载测过的 ZIP(189 KB)路线图:引擎基础

GameSkill 原创,协议 MIT。ZIP 保留 LICENSE 和 CREDITS.md,里面列出了流程灵感来源、CC0 测试素材和第三方库及其协议。

Godot MCP (bundled server, run and read errors)

自检清单

  • 服务器用 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

怎么装

  1. 下载本页的 ZIP,把 godot-mcp/ 放进 .claude/skills/(Claude Code)或 .agents/skills/(Codex、Cursor)。
  2. 注册服务器,比如 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。
  3. 重启 agent,先调用 get_godot_version 确认配好了。

好用的循环

  1. 加了素材先跑一次 godot --headless --path <项目> --import。
  2. create_scene → add_node → load_sprite,改完看一眼 .tscn。
  3. run_project,等 2-3 秒,get_debug_output,errors 和 output 都看。
  4. 改完再 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 测过的版本

测过的版本装到 .claude/skills/
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

  1. Register the server with node <skill>/server/godot-mcp.mjs and GODOT_PATH, then check it with get_godot_version.
  2. Import the project once after adding assets (godot --headless --path <project> --import).
  3. Edit with create_scene, add_node and load_sprite, then read the .tscn.
  4. Run and read: run_project, wait a moment, then get_debug_output. Read errors (push_error, script errors) as well as output.
  5. Fix, run again, stop: run_project replaces the previous run, and stop_project returns the final lines.

Gotchas we measured

  • The output is gone once the game exits, so keep it open while the agent reads.
  • add_node sets plain values only. A {x, y} object is silently ignored, not turned into a Vector2.
  • run_project opens a window, so a server needs xvfb-run. The scene tools run headless.
  • get_project_info names the project after its folder, and get_uid needs update_project_uids first.

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

相关主题

常见问题

同赛道 PRO 商业源码$8.25/mo

肉鸽构筑白标起步工程(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。

相似 skills