Godot MCP Runtime
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
A lightweight MCP server that gives AI agents the tools to interact with the Godot game engine. Features comprehensive headless editing and full runtime control over a Godot 4.x project. Scene, node, autoload, and validation ops cover everything short of the most niche corners of the engine; the runtime bridge adds screenshots, input simulation, UI discovery, and live GDScript against the running scene tree.
The AI doesn't just write your game, it can check its work.
- **Headless editing**: scenes, nodes, scripts, signals, validation, no editor window
- **Runtime control**: screenshots, input simulation, UI discovery, live GDScript, and function profiling against the running game
- **Zero footprint**: no Godot addon, no project commits, auto-cleanup on shutdown
**No addon required.** Most Godot MCP servers that offer runtime support ship as a Godot addon, something you install into your project, commit to version control, and manage as a dependency. Use npx and there's no install or setup needed.
Think of it as Playwright MCP, but for Godot. This does the same thing for games: run the project, take a screenshot, simulate input, read what's on screen, execute a script against the live scene tree. The agent closes the loop on its own changes rather than handing off to you to verify.
> [!NOTE]
> This is not a playtesting replacement. It doesn't catch the subtle feel issues that only a human notices, and it won't tell you if your game is fun. What it does is let an agent confirm that a scene loads, a button responds, a value updated, a script ran without errors. The ability to check work is crucial for AI driven workflows.
Contents
- What It Does
- How It Compares
- Quick Start
- Docs
- Acknowledgments
- License
What It Does
> This server is the perfect tool kit for AI assisted game development with Godot. It provides a comprehensive suite of tools that allows agents to create scenes, nodes, scripts, and more. The runtime tool set provides the capabilities to check work by running the game and interacting with it in real time, all without becoming a cumbersome dependency on your project.
**Built for agents.** Every tool is purpose-built and self-documenting. When something fails, the response tells the agent how to fix it; when something succeeds, it points toward the next step. The result is an AI that stays unstuck and self-corrects without needing you to nudge it along.
**Headless editing.** Create scenes, add nodes, set properties, attach scripts, connect signals, validate GDScript. All the standard operations, no editor window required.
**Runtime bridge.** When run_project or attach_project is called, the server injects McpBridge as an autoload. This opens a localhost-only TCP listener (both auto-select a free port when bridgePort is omitted; pass bridgePort to pin a specific port) and enables:
- **Screenshots:** Capture the viewport. By default this returns a 960x540 preview inline plus the full PNG on disk
- **Input simulation:** Batched sequences of key presses, mouse clicks, mouse motion, UI element clicks by name or path, Godot action events, text typed into the focused Control, and timed waits. Each action reports what it did: the Control it hit, the signals it fired, and what changed on screen
- **UI discovery:** Walk the live scene tree and collect every visible Control node with its position, type, text content, and disabled state
- **Live script execution:** Compile and run arbitrary GDScript with full SceneTree access while the game is running
- **Function profiling:** With profiling: true at launch, capture Godot's own profiler and rank the most expensive GDScript functions by own or inclusive time, with source locations and per-frame averages