Skip to content
MCP Toolkit for Godot

Your AI can read your code.
Now it can see your game.

Theatre gives AI agents spatial awareness of running Godot games and the ability to build scenes, resources, and animations — all through the Model Context Protocol.

The Problem

AI coding agents can read your source files, set breakpoints, inspect variables — but they cannot see your game. When an enemy clips through a wall, when a patrol path overshoots, when physics bodies tunnel through geometry — your agent has no way to observe these problems.

It's like debugging a web app without being able to open the browser.

Two Tools, One Stage

How It Works

┌─────────────────────────────────────────────────────┐
│                    AI Agent                         │
│           (Claude Code, Cursor, etc.)               │
└──────┬──────────────────────┬───────────────────────┘
       │                      │
  Spectator (MCP)        Director (MCP)
  observe the game      build the game
       │                      │
  ┌────▼────────┐      ┌──────▼──────┐
  │  spectator  │      │  director   │
  │  -server    │      │   server    │
  └────┬────────┘      └──────┬──────┘
       │ TCP :9077            │ TCP :6550/:6551
  ┌────▼────────┐      ┌──────▼──────┐
  │   Godot     │      │   Godot     │
  │ GDExtension │      │ GDScript    │
  │  (running)  │      │  (editor)   │
  └─────────────┘      └─────────────┘

Theatre connects your AI agent to your Godot game through the Model Context Protocol (MCP). Spectator observes the running game via a GDExtension addon. Director modifies scenes through the editor or headless Godot. Both communicate over TCP, exposing structured tools your agent already knows how to use.

The Dashcam Moment

The killer workflow: human plays, AI analyzes.

I just recorded a clip of the bug. The player clips through the east wall around frame 340.
Let me analyze the recording around that frame.
Found it. At frame 337, the player velocity spikes to 45 units/frame — the CharacterBody3D tunnels through the wall collision shape. The move_and_slide delta is too large for the CollisionShape3D thickness (0.3 units). Two fixes: thicken the collision shape to 1.0, or enable continuous collision detection.

You press F9 to mark the bug moment (use the dock's Record button to start), and the agent scrubs through the spatial timeline to find exactly what went wrong — no screenshots, no narration, no guessing from code.

Real Debugging Scenarios

Quick Start

1. Install Theatre

bash
# Clone and build
git clone https://github.com/nklisch/theatre
cd theatre
cargo build --workspace --release

# Deploy Spectator to your Godot project
theatre-deploy --release ~/your-godot-project

2. Enable the addons

In Godot: Project → Project Settings → Plugins → Spectator → Enable

For Director, copy addons/director/ into your project and enable similarly.

3. Configure your AI agent

Add to your project's .mcp.json:

json
{
  "mcpServers": {
    "spectator": {
      "type": "stdio",
      "command": "/path/to/theatre/target/release/spectator-server"
    },
    "director": {
      "type": "stdio",
      "command": "/path/to/theatre/target/release/director",
      "args": ["serve"]
    }
  }
}

4. Run your game and ask

"Take a spatial snapshot of my scene"

Your AI agent now sees your game world.

Open source under the MIT License.