The Godot Runtime MCP server enables AI assistants to interact with Godot 4.x projects through headless editing and live runtime control — no addon installation or permanent project changes required (a temporary UDP bridge is injected at runtime and removed afterward).
Project Management
Launch the Godot editor, run projects in debug mode, stop running projects, and read stdout/stderr output
List projects in a directory and retrieve project metadata or Godot version info
Runtime Interaction (requires a running project)
Screenshots: Capture PNG screenshots of the live game viewport
Input Simulation: Send batched input sequences — key presses, mouse clicks, mouse motion, UI element clicks (by name/path), Godot action events, and timed waits
UI Discovery: Get all visible Control nodes with their positions, types, and text content
Live Scripting: Execute arbitrary GDScript with full access to the live SceneTree
Headless Scene Editing
Create scenes, add nodes with properties, load textures onto sprites, save scenes, export MeshLibraries, and perform batch operations — all without opening the editor
Headless Node Editing
Get full scene tree hierarchies; read/set node properties (individually or in batch); attach scripts; duplicate or delete nodes; list, connect, and disconnect signals
Project Configuration (no Godot process required)
Manage autoloads (list, add, remove, update) in
project.godotRead project settings, browse project files, search source code, and list scene dependencies
Validation
Validate GDScript syntax (inline or file) and entire scene files to catch errors before execution
UID Management (Godot 4.4+)
Get resource UIDs and resave all resources to update UID references
Godot MCP Runtime
An MCP server that gives AI assistants direct access to a running Godot 4.x game. Not just file editing, not just scene manipulation. Actual runtime control: input simulation, screenshots, UI discovery, and live GDScript execution while the game is running.
When you run a project through this server, it injects a lightweight UDP bridge as an autoload, and suddenly the AI can interact with your game the same way a player would: press keys, click buttons, read what's on screen, and run arbitrary code against the live scene tree.
The distinction matters: the AI doesn't just write your game, it can check its work.
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. This server does none of that. The bridge script is injected on run_project and removed on stop_project. Your project files are left exactly as they were. All you need is Node.js and a Godot executable — no addon installation, no project modifications, no cleanup.
Think of it as Playwright MCP, but for Godot. Playwright lets agents verify that a web app actually works by driving a real browser. 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.
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. That's a fundamentally different development workflow, and it's what this server is built for.
Every operation is its own tool with only its relevant parameters — no operation discriminators, no conditional schemas. Each tool teaches agents how to use it through its description and response messages: what to call next, when to wait, and how to recover from errors.
What It Does
Headless editing. Create scenes, add nodes, set properties, attach scripts, connect signals, manage UIDs, validate GDScript. All the standard operations, no editor window required.
Runtime bridge. When run_project is called, the server injects McpBridge as an autoload. This opens a UDP channel on port 9900 (localhost only) and enables:
Screenshots: Capture the viewport at any point during gameplay
Input simulation: Batched sequences of key presses, mouse clicks, mouse motion, UI element clicks by name or path, Godot action events, and timed waits
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
The bridge cleans itself up automatically when stop_project is called. No leftover autoloads, no modified project files.
Related MCP server: Godot MCP
Quick Start
Prerequisites
That's it. No Godot addon, no project modifications.
Configure Your MCP Client
Add the following to your MCP client config. Works with Claude Code, Claude Desktop, Cursor, or any MCP-compatible client.
Zero-install via npx (recommended):
{
"mcpServers": {
"godot": {
"command": "npx",
"args": ["-y", "godot-mcp-runtime"],
"env": {
"GODOT_PATH": "<path-to-godot-executable>"
}
}
}
}Or install globally:
npm install -g godot-mcp-runtime{
"mcpServers": {
"godot": {
"command": "godot-mcp-runtime",
"env": {
"GODOT_PATH": "<path-to-godot-executable>"
}
}
}
}Or clone from source:
git clone https://github.com/Erodenn/godot-mcp-runtime.git
cd godot-mcp-runtime
npm install
npm run build{
"mcpServers": {
"godot": {
"command": "node",
"args": ["<path-to>/godot-mcp-runtime/dist/index.js"],
"env": {
"GODOT_PATH": "<path-to-godot-executable>"
}
}
}
}If Godot is on your PATH, you can omit GODOT_PATH entirely. The server will auto-detect it. Set "DEBUG": "true" in env for verbose logging.
Verify
Ask your AI assistant to call get_project_info. If it returns a Godot version string (e.g., 4.4.stable), you're connected and working.
Tools
Project Management
Tool | Description |
| Open the Godot editor GUI for a project |
| Run a project in debug mode and inject the MCP bridge |
| Stop the running project and remove the bridge |
| Read stdout/stderr from the running project |
| Find Godot projects in a directory |
| Get project metadata and Godot version |
Runtime (requires run_project first)
After calling run_project, wait 2-3 seconds for the bridge to initialize before using these tools.
Tool | Description |
| Capture a PNG of the running viewport |
| Send batched input: key, mouse, click_element, action, wait |
| Get all visible Control nodes with positions, types, and text |
| Execute arbitrary GDScript at runtime with full SceneTree access |
Scene Editing (headless)
All mutation operations save automatically. Use save_scene only for save-as (newPath) or to re-canonicalize a .tscn file.
Tool | Description |
| Create a new scene file |
| Add a node to an existing scene (supports promoted spatial params) |
| Set a texture on a Sprite2D, Sprite3D, or TextureRect |
| Re-pack and save the scene, or save-as with |
| Export scenes as a MeshLibrary for GridMap |
| Run multiple add_node/load_sprite/save ops in a single Godot process |
Node Editing (headless)
All mutation operations save automatically.
Tool | Description |
| Get the full scene tree hierarchy (use |
| Read properties from a node |
| Read properties from multiple nodes in one process |
| Set a property on a node |
| Set multiple properties in one process |
| Attach a GDScript to a node |
| Duplicate a node within the scene |
| Remove a node from the scene |
| List all signals on a node with their connections |
| Connect a signal to a method on another node |
| Disconnect a signal connection |
Project Config (no Godot process required)
These tools edit project.godot directly or read the filesystem. Safe to use even when autoloads are broken.
Tool | Description |
| List all registered autoloads with paths and singleton status |
| Register a new autoload |
| Unregister an autoload by name |
| Modify an existing autoload's path or singleton flag |
| Read settings from |
| Get the project file tree with types and extensions |
| Search for a string across project source files |
| List all resources a scene depends on |
Validation: validate
Validate before attaching or running. Catches syntax errors and missing resource references before they cause headless crashes or runtime failures. Supports scriptPath, source (inline GDScript), scenePath, or a targets array for batch validation.
UIDs: manage_uids (Godot 4.4+)
Operation | Description |
| Get a resource's UID |
| Resave all resources to update UID references |
Architecture
src/
├── index.ts # MCP server entry point, routes tool calls
├── tools/
│ ├── project-tools.ts # Project, runtime, autoload, filesystem, search, settings
│ ├── scene-tools.ts # Scene creation, node addition, sprite loading, batch ops, UIDs
│ ├── node-tools.ts # Node properties, scripts, tree, duplication, signals
│ └── validate-tools.ts # GDScript and scene validation
├── scripts/
│ ├── godot_operations.gd # Headless GDScript operations
│ └── mcp_bridge.gd # UDP autoload for runtime communication
└── utils/
└── godot-runner.ts # Process spawning, output parsing, shared validation helpersHeadless operations spawn Godot with --headless --script godot_operations.gd, perform the operation, and return JSON. Runtime operations communicate over UDP with the injected McpBridge autoload.
How the Bridge Works
When run_project is called:
mcp_bridge.gdis copied into the project directoryIt's registered as an autoload in
project.godotThe project launches with the bridge listening on
127.0.0.1:9900Runtime tools send JSON commands to the bridge and await responses
When
stop_projectis called, the autoload entry and bridge script are removed
Files generated during runtime (screenshots, executed scripts) are stored in .mcp/ inside the project directory. This directory is automatically added to .gitignore and has a .gdignore so Godot won't import it.
Broken Autoloads
If any registered autoload fails to initialize (syntax error, missing resource, display dependency), Godot's headless process will crash before any operation runs. Use list_autoloads and remove_autoload to inspect and remove the failing autoload. These tools edit project.godot directly, with no Godot process involved.
Acknowledgments
Built on the foundation laid by Coding-Solo/godot-mcp for headless Godot operations.
Developed with Claude Code.