Skip to main content
Glama

godot-dev-mcp

IMPORTANT

This repository is archived and no longer maintained. The project was superseded bySwallowtail, which provides the adopted Godot CLI, Editor, runtime automation, testing, and MCP workflow. This code remains available for historical reference only.

CI Version Python 3.11+ Godot 4.7.1 Mono MCP stdio License: MIT

English · 中文

Safe, composable MCP (Model Context Protocol) gateway for Godot: scene authoring, read-only runtime diagnostics, and allowlisted verification.

Current version is 0.2.0. Python 3.11+ is required.

Contents

Related MCP server: godot-ai-mcp

What it is

godot-dev-mcp lets MCP clients such as Codex inspect and change Godot projects with structured tools, instead of guessing .tscn formats or running arbitrary commands.

You can

It will not

Inspect scenes, nodes, resources, signals, and scripts

Run arbitrary shell commands

Preview a single scene-property change with dry-run

Read arbitrary files or write at runtime

Read the Editor or game scene tree, logs, screenshots, and performance

Expose the observation bridge off loopback

Run allowlisted tests and Stagehand scenarios

Bind a specific game project into the generic core

The MCP server uses standard stdio transport: one UTF-8 JSON-RPC message per line. It supports requests, notifications, and batches, and never writes non-protocol content to stdout.

Architecture

flowchart LR
  Client["MCP Client<br/>Codex / Claude"] -->|stdio JSON-RPC| Server["godot-dev-mcp<br/>Python 3.11+"]
  Server -->|"AUTHOR: inspect / dry-run patch"| Project["Godot project<br/>.tscn .gd .tres"]
  Server -->|"OBSERVE: HTTP GET loopback"| Editor["Editor Observer<br/>127.0.0.1:7331"]
  Server -->|"OBSERVE: HTTP GET loopback"| Runtime["Runtime Observer<br/>127.0.0.1:7332"]
  Server -->|"VERIFY: allowlisted argv"| Checks["project checks<br/>Stagehand adapter"]
  Addon["addons/godot_dev_mcp"] --> Editor
  Addon --> Runtime

Capability boundaries

Layer

Purpose

Write behavior

AUTHOR

Inspect scenes, nodes, resources, signals, and scripts, and patch a single scene property

Mutations default to dry-run; writes only when dry-run is explicitly disabled

OBSERVE

Read the Editor or game scene tree, node properties, performance, logs, and screenshots

Read-only; loopback HTTP GET only

VERIFY

Run allowlisted test commands and parse Stagehand, JUnit, and visual-diff output

Runs explicit argument arrays only; never through a shell

Quick start

1. Install the Python package

git clone https://github.com/DLeungDL/godot-dev-mcp.git
Set-Location godot-dev-mcp
python -m pip install -e .
python -m unittest discover -s tests -v

2. Enable the Godot addon

Copy addons/godot_dev_mcp from this repository into the target Godot project's addons/ folder. In Godot, open Project Settings → Plugins and enable godot-dev-mcp Observer.

Enabling the addon also registers the GodotDevMCPRuntimeObserver autoload. Restart the Godot Editor after the first install or an addon update so Observer loads in normal editor sessions.

3. Start the MCP server

To inspect the scene tree in the Godot Editor, use the default Editor Observer:

python -m godot_dev_mcp.server --project "C:\path\to\godot-project"

To inspect a running game, start the game from Godot first, then connect Runtime Observer:

python -m godot_dev_mcp.server `
  --project "C:\path\to\godot-project" `
  --bridge-url "http://127.0.0.1:7332"

4. Connect Codex

[mcp_servers.godot_dev]
command = "python"
args = ["-m", "godot_dev_mcp.server", "--project", "C:\\path\\to\\godot-project"]
cwd = "C:\\path\\to\\godot-dev-mcp"

To connect a running game, change args to:

args = [
  "-m", "godot_dev_mcp.server",
  "--project", "C:\\path\\to\\godot-project",
  "--bridge-url", "http://127.0.0.1:7332"
]

Observer connections

Observer

Default URL

Scope

Editor Observer

http://127.0.0.1:7331

Godot Editor scene tree

Runtime Observer

http://127.0.0.1:7332

Running game scene tree

Quick health checks:

Invoke-RestMethod http://127.0.0.1:7331/health
Invoke-RestMethod http://127.0.0.1:7332/health

Runtime Observer starts in debug builds only. To enable it in a release build, set:

godot_dev_mcp/allow_release_observer=true

Change the runtime port with godot_dev_mcp/runtime_port. If you change the port, the MCP server --bridge-url must match.

Runtime Observer uses a custom Godot Logger to capture engine messages, push_warning(), push_error(), script errors, and shader errors. Logger callbacks enqueue work under a Mutex; the main thread then writes a ring buffer of at most 500 entries. Screenshots need a display server; headless mode returns 503 Service Unavailable.

Tools

Layer

Tools

AUTHOR

godot_project_info, godot_scene_inspect, godot_scene_patch, godot_resource_inspect, godot_script_diagnostics

OBSERVE

godot_runtime_snapshot, godot_runtime_property, godot_runtime_logs, godot_runtime_screenshot, godot_runtime_errors, godot_resource_leaks

VERIFY

godot_run_check, godot_stagehand_scenario, godot_validate_scene, godot_validate_autoload

godot_scene_patch defaults dry_run to true. A write happens only when you pass false, and only for a single .tscn property. Node selectors accept a name, relative path, or full scene path; ambiguous names are rejected. Replacing an existing multiline property removes the full old value. The result includes the resolved scene_path plus a before/after change summary.

godot_scene_inspect returns bounded structured_nodes with node name, type, parent, scene path, and up to 100 properties. Multiline properties keep their full serialized form. Each value is capped at 4,096 characters, each node at 32,768 characters, and the whole scene at 131,072 characters. Truncated items are listed in truncated_properties. Pass an optional node selector to get an exact selected_node by name or scene path; use the full path when the name is not unique.

godot_runtime_snapshot returns a depth-first flat nodes page with pagination:

  • Default limit=100, maximum 500

  • Use next_offset for the next page

  • max_depth maximum is 16

  • offset maximum is 100000

Project config and VERIFY

Copy examples/godot-dev-mcp.example.json to godot-dev-mcp.json at the target project root, then edit it for that project.

{
  "checks": {
    "smoke": ["godot", "--headless", "--path", ".", "--quit-after", "60"]
  },
  "stagehand": {
    "command": ["godot-stagehand", "run", "--out-dir", "stagehand-artifacts"],
    "junit": "stagehand-artifacts/junit.xml",
    "report": "stagehand-artifacts/report.json",
    "visual_diff": "stagehand-artifacts/visual-diff.json"
  }
}
  • Check names are the allowlist accepted by godot_run_check.

  • Commands must be non-empty string arrays and start with shell=false.

  • Timeouts are 1–900 seconds.

  • Stagehand stays a separate adapter; this project only passes a scenario and parses structured artifacts.

  • A Stagehand scenario example is in examples/auction-ui.stagehand.json.

Verification status

CI in this repository runs:

  • Python unit tests and MCP stdio subprocess integration tests

  • Python compileall plus wheel/sdist packaging

  • Godot 4.7.1 Mono headless Editor addon load

Runtime Observer has also been checked against the official 2d/dodge_the_creeps demo: it can read a real game scene tree, performance monitors, and structured runtime errors.

The version 2 integration roadmap is in Issue #1.

Safety boundaries

  • Project paths are resolved and path traversal is rejected.

  • The observation bridge must use HTTP loopback.

  • Runtime properties are limited to engine properties; script-defined properties are not exposed.

  • Lists, process output, tree depth, snapshot pages, and log buffers are all bounded.

  • There is no arbitrary shell command, arbitrary file-read, or runtime write interface.

  • Project-specific extensions are off by default; the generic core does not depend on game-specific code.

License and sources

This project is MIT licensed and is a clean-room implementation. Interface review and attribution for external projects are in THIRD_PARTY_NOTICES.md.

Available Tools

15 tools
godot_project_infoC

Inspect the configured Godot project.

Inputs: no named parameters.

godot_resource_inspectC

Inspect a project resource without modifying it.

Inputs: path (required).

godot_resource_leaksB

Find RID, ObjectDB, and resource teardown warnings.

Inputs: no named parameters.

godot_run_checkC

Run a command from the explicit project allowlist.

Inputs: name (required), timeout.

godot_runtime_errorsB

Return warning and error entries from the observer.

Inputs: no named parameters.

godot_runtime_logsC

Read the bounded observer log ring buffer.

Inputs: no named parameters.

godot_runtime_propertyC

Read one runtime Node property from the read-only bridge.

Inputs: node (required), property (required).

godot_runtime_screenshotA

Capture a runtime viewport PNG as base64.

Inputs: no named parameters.

godot_runtime_snapshotC

Read one bounded page of runtime nodes and selected performance monitors.

Inputs: limit, offset, monitors, max_depth.

godot_scene_inspectC

Inspect structured nodes, resources, scripts, and signals in a project scene.

Inputs: path (required), node.

godot_scene_patchB

Preview or apply one controlled scene property change; dry-run defaults to true.

Inputs: node (required), path (required), value (required), property (required), +1 more.

godot_script_diagnosticsC

Return bounded static diagnostics for a GDScript or C# file.

Inputs: path (required).

godot_stagehand_scenarioC

Run a configured Stagehand scenario and parse JUnit/visual diff outputs.

Inputs: scenario (required), timeout.

godot_validate_autoloadB

Validate project autoload paths.

Inputs: no named parameters.

godot_validate_sceneC

Validate a project scene.

Inputs: path (required).

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 15 tools

    Disambiguation4/5

    Most tools target clearly distinct scopes: project info, scene/resource inspection, runtime reads, diagnostics, validation, and controlled patching. There is some overlap among runtime diagnostics tools (logs, errors, leaks) and between scene inspection and scene validation, but the descriptions provide enough distinction for selection.

    Naming Consistency4/5

    All names use snake_case and a consistent godot_ domain prefix, making them easy to scan. Most follow a scope_action or scope_noun pattern, though a few variants like godot_run_check and godot_stagehand_scenario are slightly less predictable.

    Tool Count5/5

    Fifteen tools is well-scoped for a Godot project inspection, validation, and runtime debugging server. Each tool appears to cover a distinct operational area without obvious padding.

    Completeness4/5

    The surface covers project inspection, scene/resource inspection, validation, runtime observation, diagnostics, screenshots, allowlisted execution, and scenario testing. Minor gaps exist around broader scene/resource editing or creation, since scene_patch only previews/applies one controlled property change.

    Maintenance

    ActivityStale
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      C
      quality
      C
      maintenance
      Enables AI-driven game development by providing MCP tools to interact with the Godot editor, including scene editing, node manipulation, script attachment, and scene execution.
      28
      14 npm
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Provides AI assistants with tools to launch the Godot editor, run projects, manipulate scenes, manage scripts, and control node properties through a standardized MCP interface.
      21
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides progressive-disclosure MCP access to Godot editor development, enabling tool discovery, task execution, inspection, and status tracking for projects across Godot 4.5 to 4.8-dev.
      MIT
    • A
      license
      C
      quality
      C
      maintenance
      Enables MCP clients to inspect, validate, test, export, and query Godot projects, including live state from an open editor via a bridge addon.
      20
      19 npm
      MIT