Skip to main content
Glama

godot-mcp

Glama Score

Zero-setup Godot 4.x MCP server for scene authoring, cached ClassDB docs, headless diagnostics, and deterministic TAS-style game playtesting.

godot-mcp demo: ClassDB docs, atomic 3D scene authoring, mid-air ScriptBacktrace capture, and native 2x2 filmstrip playtesting

  • No res://addons/ plugin required — works on any Godot 4.x repo while keeping git status clean.

  • Godot >= 4.0 (>= 4.5 unlocks OS.add_logger() + ScriptBacktrace structured stack traces; 4.0–4.4 and pre-boot parse errors fall back to stderr).

  • Node.js >= 20.0.0 with zero native C++ addons.

60-Second Quickstart

npx (recommended)

npx -y @codyklim/godot-mcp --version

Homebrew (macOS / Linux)

brew tap CodyKlimkofski/tap
brew install godot-mcp

CLI Options & Godot Discovery

godot-mcp [--project <path>] [--godot-path <path>] [-v|--version] [-h|--help]

Godot binary discovery checks --godot-path, GODOT_PATH, PATH (godot, godot4), and standard platform locations (/opt/homebrew/bin/godot, /Applications/Godot*.app/Contents/MacOS/Godot, /usr/bin/godot*).

Related MCP server: Blender MCP

Client Configuration

Pass --project <path> if you want a default project directory instead of relying on cwd or per-tool projectPath, and --godot-path <path> if Godot is not on PATH.

Claude Code

claude mcp add godot-mcp -- npx -y @codyklim/godot-mcp

Or in .mcp.json:

{
  "mcpServers": {
    "godot-mcp": {
      "command": "npx",
      "args": ["-y", "@codyklim/godot-mcp"]
    }
  }
}

Cursor (.cursor/mcp.json)

{
  "mcpServers": {
    "godot-mcp": {
      "command": "npx",
      "args": ["-y", "@codyklim/godot-mcp", "--project", "/path/to/godot-project"]
    }
  }
}

Antigravity (~/.gemini/antigravity/mcp_config.json)

{
  "mcpServers": {
    "godot-mcp": {
      "command": "npx",
      "args": ["-y", "@codyklim/godot-mcp", "--godot-path", "/Applications/Godot.app/Contents/MacOS/Godot"]
    }
  }
}

Codex (~/.codex/config.toml)

[mcp_servers.godot-mcp]
command = "npx"
args = ["-y", "@codyklim/godot-mcp"]

How It Works

Zero-Footprint Transient Injection

  1. Before launching the game, godot-mcp stages pilot.gd into <project>/.godot/mcp/ (ignored by Godot's standard .gitignore and skipped by EditorFileSystem).

  2. Any existing override.cfg is backed up byte-for-byte to .godot/mcp/override.cfg.bak, and a transient override.cfg starting with ; __GODOT_MCP_TRANSIENT__ injects _GodotMcpPilot="*res://.godot/mcp/pilot.gd" under [autoload].

  3. Immediately after Godot reads override.cfg (~100ms after boot), pilot.gd._init() restores override.cfg.bak (or deletes override.cfg), so the project root stays clean even while playing or after a SIGKILL.

Deterministic TAS Playtesting

  • Non-clobbering autopause: startPaused on game_launch and freezeAfter (default true) on game_step freeze current_scene.process_mode and PhysicsServer2D/3D without touching get_tree().paused, so your game's pause menu still works.

  • until stop triggers: game_step can stop early on expression (truthy GDScript expression), onNewError, uiNodeVisible, or timeoutMs.

  • Native filmstrips: Set capture: "filmstrip" and filmstripFrames (1–9) to composite sampled frames inside GDScript via Image.blit_rect into a single PNG contact sheet.

14-Tool Reference

Tool

Description

Parameters

project_info

Inspect project.godot, Godot version, main scene, viewport, renderer, autoloads, InputMap, .tscn/.gd files

projectPath?

godot_api_docs

Look up cached Godot ClassDB docs for the active local Godot version

className?, member?, search?

project_diagnostics

Validate .gd scripts and scenes headlessly, optionally running --import first

projectPath?, runImport?, scriptsOnly?

project_settings_patch

Patch project.godot keys, *res://... autoloads, and InputMap actions via ConfigFile

projectPath?, set?, autoloads?, inputActions?

scene_inspect

Inspect .tscn/.scn/.tres node hierarchy, scripts, non-default properties, groups, signals, ext resources

projectPath?, scenePath, maxDepth?

scene_patch

Apply batched atomic ops (create_scene, add_node, modify_node, remove_node, reparent_node, connect_signal, disconnect_signal, add_collision_shape)

projectPath?, scenePath, ops

run_headless_script

Run a GDScript snippet inside func run(tree: SceneTree) headlessly

projectPath?, code, timeoutMs?

game_launch

Launch the game window with transient pilot injection, optionally frozen on frame 1

projectPath?, scene?, resolution?, position?, startPaused?, timeoutMs?

game_step

Unfreeze, run input actions, advance frames/durationMs, check until, capture final/filmstrip/none PNG, auto-freeze

actions?, durationMs?, frames?, timeScale?, until?, capture?, filmstripFrames?, freezeAfter?, timeoutMs?

game_screenshot

Capture current viewport PNG without advancing simulation ticks

maxWidth?

game_inspect

Query live SceneTree nodes, visible Control rects/text/disabled states, and Performance monitors

rootPath?, maxDepth?, includeControls?, includePerformance?

game_eval

Evaluate a GDScript expression or statement block against the live SceneTree

code, timeoutMs?

game_logs

Read and optionally clear buffered structured error / log / stderr diagnostics

clear?, sinceSeq?, kinds?

game_stop

Stop the active game session, verify override.cfg cleanup, and return final diagnostics

(none)

Roadmap

See ROADMAP.md for planned milestones from 0.2.0 through 1.0.0.

License

MIT — see LICENSE.

Available Tools

14 tools
game_evalC

Evaluate a GDScript expression or statement block against the live SceneTree and return the result and diagnostics.

Inputs: code (required), timeoutMs.

game_inspectC

Inspect the live SceneTree nodes, visible Control rects/text/disabled states, and Performance monitors.

Inputs: maxDepth, rootPath, includeControls, includePerformance.

game_launchC

Launch the Godot game window with zero-footprint transient pilot injection, optionally frozen on frame 1 (startPaused).

Inputs: scene, position, timeoutMs, resolution, +2 more.

game_logsB

Read and optionally clear buffered structured error/log/stderr diagnostics from the running or last game session.

Inputs: clear, kinds, sinceSeq.

game_screenshotB

Capture the current game viewport as a PNG image without advancing simulation ticks.

Inputs: maxWidth.

game_stepB

Unfreeze and advance simulation frames/duration with optional input actions, until trigger, final or filmstrip PNG capture, and auto-freeze.

Inputs: until, frames, actions, capture, +5 more.

game_stopA

Stop the active Godot game session cleanly, verify override.cfg cleanup, and return final diagnostics.

Inputs: no named parameters.

godot_api_docsC

Look up cached Godot ClassDB API docs (methods, properties, signals, constants) for the active local Godot version.

Inputs: member, search, className.

project_diagnosticsB

Validate GDScript files and scenes via headless Godot, optionally running --import first, and return structured diagnostics.

Inputs: runImport, projectPath, scriptsOnly.

project_infoB

Inspect project.godot metadata, Godot version, resolved main scene, viewport, renderer, autoloads, InputMap actions, and .tscn/.gd inventory.

Inputs: projectPath.

project_settings_patchC

Patch project.godot keys, autoloads (*res://...), and InputMap actions (Key / MouseButton) using Godot ConfigFile.

Inputs: set, autoloads, projectPath, inputActions.

run_headless_scriptC

Execute a GDScript body inside func run(tree: SceneTree) headlessly against the project for procedural asset/scene generation.

Inputs: code (required), timeoutMs, projectPath.

scene_inspectB

Inspect a .tscn/.scn/.tres scene structure: node hierarchy, scripts, non-default properties, groups, signal connections, and external resources.

Inputs: scenePath (required), maxDepth, projectPath.

scene_patchB

Apply batched atomic scene operations (create_scene, add_node, modify_node, remove_node, reparent_node, connect_signal, disconnect_signal, add_collision_shape) in one headless Godot run.

Inputs: ops (required), scenePath (required), projectPath.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 14 tools

    Disambiguation4/5

    The set is cleanly grouped into project_*, scene_*, and game_* families, and descriptions make the static vs. live distinction clear (scene_inspect vs. game_inspect). Minor overlap exists between scene_patch and run_headless_script, and between project_diagnostics and game_logs, but each tool's stated purpose keeps misselection unlikely.

    Naming Consistency4/5

    Nearly all tools follow a domain-prefix + noun_verb pattern (scene_inspect, scene_patch, game_launch, game_eval, project_info), which is highly predictable and readable. run_headless_script is the one clear outlier with verb-first ordering, and godot_api_docs breaks the family prefix, but these are minor deviations.

    Tool Count5/5

    Fourteen tools sit comfortably in the well-scoped 3-15 range for a Godot automation server. Each tool maps to a distinct lifecycle stage (inspect, validate, patch, run, observe, stop) with no filler entries.

    Completeness4/5

    The surface covers the full loop: project inspection/docs/diagnostics/settings, scene inspection and patching, headless scripting, and a complete game runtime cycle (launch, step, screenshot, inspect, eval, logs, stop). A gap remains around directly reading/writing GDScript or arbitrary resource files, which agents must work around via run_headless_script.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      A
      maintenance
      Connects MCP clients directly to a live Godot editor, enabling AI assistants to build scenes, edit nodes, and control the editor through over 120 operations.
      47
      12,588 PyPI
      3,933
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      MCP server for AI-assisted Blender automation, providing layered tools for perception, declarative and imperative writing, and fallback operations.
      29
      145 PyPI
      7
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to read and edit Godot 4.x scenes and resources, introspect the class API, run the game in a managed headless process with frame stepping, input injection and screenshots, validate scripts, and diagnose code via a built-in GDScript LSP plus a bridge to an already open editor.
      23
      MIT