
Godot MCP
io.github.satelliteoflove由 GitHub 账号 satelliteoflove 发布v4.1.11更新于 Oct 25, 2026
Agent-driven Godot playtesting: editor control, input injection, game-time stepping, live state.
概览
一个本地 MCP 服务器,让 AI 助手控制 Godot 编辑器与正在运行的游戏,用于自动化试玩与验证。
- 可以做什么
- 在编辑器中打开、保存和检查场景、节点、资源、动画、TileMap 与 GridMap 单元格以及 3D 变换,并在支持范围内修改属性、轨道和单元格。读取编辑器状态、选中项、截图和错误日志,并运行、停止或重启游戏、控制 2D 视口。向运行中的游戏注入输入:带模拟强度的命名动作、手柄按键与摇杆、原始按键、鼠标视角和文本输入。冻结、步进游戏时钟或步进到条件成立,并以 JSON 读取实时实体状态、监视窗口和信号时间线。在运行中的游戏里执行 GDScript 以搭建测试场景,采集性能快照与逐帧时间序列,校验程序化网格,并获取与编辑器版本匹配的 Godot 文档。
- 适用场景
- 适合希望助手自行测试 Godot 4.5+ 项目的场景:复现缺陷、像玩家一样操作游戏、确认改动确实生效,或分析帧率尖峰,而不必来回传递截图和日志。
- 运行要求
- 通过 npx 在本地运行,需要 Node.js 20+,以及 Godot 4.5+ 并在项目中安装并启用随附插件。服务器通过本地 WebSocket(默认端口 6550,绑定 127.0.0.1)连接编辑器插件;GODOT_HOST 可为 WSL2 或远程环境覆盖主机地址。任何支持 stdio 的 MCP 客户端均可使用。
安装
在 SourceWeft 中
- 打开 控制台中的 Godot MCP,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
godot-mcp
[npm version] [CI] [Godot 4.5+] [Node 20+] [License: MIT]
Give your AI assistant eyes and hands in the Godot editor — and a running game it can actually playtest.
Why this one?
There are a few Godot MCP servers out there, and most can open a scene and poke at nodes. This one is built around a harder problem: letting an agent verify its own work. Run the game, drive it like a player, observe what actually happened, and prove the change did what it claimed — without you ferrying screenshots and error logs back and forth.
The pieces that make that possible, and that you won't find elsewhere:
- Deterministic playtesting. Freeze the game clock, step exact slices of game time (or step until a condition holds), with inputs riding inside the window. Observation never races the game.
- Cheap observation. Live entity state — positions, velocities, animation state, your own custom data — as structured JSON. Most "what's happening on screen?" questions get answered without spending vision tokens on a screenshot.
- Real input. Named actions with analog strength, joypad buttons and stick vectors, raw keys with modifier combos, relative mouse-look, text typing. Sequences run with precise timing and can prove they changed game state.
- Scenario setup. Run GDScript inside the running game: grant the weapon, skip to wave 3, spawn a test bot — no debug hooks baked into your game code.
Here's what that looks like when an agent tests a boss fight:
Less copy-paste, more creating.
Quick Start
1. Configure your AI assistant
Add godot-mcp to your MCP client. See the Installation Guide for config examples (Claude Desktop, Claude Code, VSCode/Copilot, and more). The short version:
2. Install the Godot addon
Enable it in Godot: Project > Project Settings > Plugins > Godot MCP
3. Start building
Open your Godot project, restart your AI assistant, and start building. If anything refuses to connect, the Troubleshooting Guide has you covered.
What's in the box
21 tools, 86 actions. Full API docs in the Tools Reference.
A note on shape: tools split along the read/write boundary, so every godot_*_read tool (and the other read-only tools) can be safely auto-allowed in your client's permission settings while writes stay gated. Related operations still live as actions inside one tool, so your agent's context isn't flooded with definitions it won't use. Anything an agent can do by editing project files directly — creating scenes and nodes, attaching scripts, connecting signals — is deliberately not duplicated as a tool; the bridge covers what files can't: editor state, verification, binary-encoded cell data, and the running game. A --read-only flag serves the look-but-don't-touch use case.
Things to ask for
A feel for what an agent can do with this, in plain prompts:
- "Run the game and screenshot the title screen. Does the layout survive 1280x720?"
- "The player can clip through the east wall. Reproduce it, then check the collision shapes and tell me why."
- "Step the game until the second wave spawns and give me every enemy's position and velocity."
- "Hold the left stick at half deflection for two seconds — does the walk animation blend correctly?"
- "Profile ten seconds of gameplay and find what's causing the frame spikes."
- "Add a hit-flash animation to the Player: modulate to red and back over 0.2 seconds."
For richer runtime observation, add key nodes to the mcp_watch group or give them a _mcp_state() method — see the Runtime State Guide.
How it works
The server talks to an editor addon over a local WebSocket; the addon reaches into the running game over Godot's own debugger protocol, so the game process needs no extra ports or setup. The addon binds to 127.0.0.1 by default. WSL2 is fully supported (auto-detection, host IP discovery, configurable bind modes) — see the Installation Guide.
Curious about connection lifecycles, the single-client policy, or how frozen-time stepping works under the hood? The Architecture Guide goes deep.
Works well with minimal-godot-mcp
minimal-godot-mcp by @ryanmazzolini covers exactly what this server doesn't: LSP diagnostics for fast static GDScript checking, and the running game's console output over DAP. This server covers everything that needs an editor bridge. No overlap, no conflict — run both, and your agent gets static analysis and the game console alongside full editor and runtime control.
One caveat: a Godot editor serves a single godot-mcp client at a time. Extra clients (a subagent inheriting your MCP config, say) wait their turn rather than hijacking your session — details in Troubleshooting.
Documentation
- Installation Guide — MCP client configs for Claude Desktop, Claude Code, VSCode/Copilot, and more
- Migrating to v4 — renamed tools, removed actions, allowlist updates
- Troubleshooting — connection checklist, CLI smoke test, common fixes
- Claude Code Setup Guide — CLAUDE.md template for Godot projects
- Runtime State Guide — expose game state to agents via
mcp_watchand_mcp_state() - Tools Reference — all 21 tools with full API docs
- Architecture Guide — how the server, addon, and game bridge fit together
- Contributing — dev setup, adding tools, release process
- Changelog — release history
Requirements
- Godot 4.5+ (the addon uses the Logger class introduced in 4.5)
- Node.js 20+
- Any MCP client that speaks stdio
Development
There is also an agentic eval harness (npm run eval) that runs realistic
tasks through headless Claude Code against a real project — see
server/evals/README.md. It never starts Godot; you
bring the open editor.
Contributions welcome — this project favors tools that solve real, time-wasting problems. Read CONTRIBUTING.md before building something big, or open an issue and we'll figure out the right shape together.
License
来源:README.md,提交 c732865
工具
0版本历史
1- v4.1.11最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分