Skip to main content
Glama

godot-mcp

An MCP server that lets AI agents like Claude Code run your Godot game, look at it, and play it.

Agents can already read and write .gd and .tscn files on their own. What they can't do is see what happens when the game runs. This closes that loop: start the game, take a screenshot, inspect the live scene tree, press inputs, read the errors.

Tools

Tool

What it does

run_game

Starts the project (or a specific scene) and waits until it is connected

stop_game

Stops the game

get_logs

Latest stdout/stderr lines: print() output, script errors, crashes

screenshot_game

Screenshot of the running game

get_scene_tree

Live node tree with types, scripts, positions and hidden nodes

press_action

Presses an Input Map action for a given time

Related MCP server: Godot MCP Flash

How it works

agent  <--stdio-->  godot-mcp server  <--WebSocket-->  game (GodotMCP autoload)
                          |
                          +-- starts godot --path <project> as a child process

The server starts Godot itself and reads its output. When the game boots, the GodotMCP autoload connects back to the server over a WebSocket on 127.0.0.1 using a port and token passed on the command line. Without those arguments the autoload does nothing, and it is disabled in release builds.

Requirements

  • Godot 4 (tested on 4.7.2)

  • Node.js 20 or newer

Setup

  1. Build the server:

    git clone https://github.com/CyberIce2077/godot-mcp.git ~/projects/godot-mcp
    cd ~/projects/godot-mcp
    npm install
  2. Copy addons/godot_mcp into your game's addons/ folder, then enable Godot MCP under Project > Project Settings > Plugins. Enabling it registers the GodotMCP autoload.

  3. Add the server to Claude Code from your game's folder:

    claude mcp add godot -- node ~/projects/godot-mcp/dist/index.js

Configuration

Variable

Default

GODOT_PATH

godot

Godot executable

GODOT_PROJECT

current directory

Folder containing project.godot

For example:

claude mcp add godot -e GODOT_PROJECT=/path/to/game -e GODOT_PATH=/Applications/Godot.app/Contents/MacOS/Godot -- node ~/projects/godot-mcp/dist/index.js

Limitations

  • The game runs in a normal window. Godot's headless mode has no renderer, so screenshots would be blank.

  • Only one game at a time per server.

  • No editor integration yet: the agent edits scenes and scripts as files.

License

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    F
    maintenance
    Enables AI assistants to interact with the Godot game engine by launching the editor, running projects, capturing debug output, managing scenes and nodes, and controlling project execution through a standardized interface.
    18
    174 npm
    11
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Enables AI agents to launch and control the Godot game engine, run projects, capture debug output, and manage scenes and project configurations.
    14
    174 npm
    MIT
  • A
    license
    A
    quality
    A
    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