Godot Stagehand

Playwright, but for game engines.
Drive your running Godot game from outside the engine. Click real buttons,
read real node state, capture real frames and diff them against saved
baselines.
One Go binary. Two frontends over the same live connection:
- MCP server. Claude or any other agent plays your game and finds the bugs
you would have found by clicking.
- CLI with a scenario runner. The same checks run in CI. JUnit output,
stable exit codes, no MCP client anywhere.
See it work: examples/minimal-game
is one command. Clone it and watch an agent click a button in a real running
Godot scene, then assert the result.
Status: beta, pre-1.0. Prebuilt binaries for Linux, macOS (Intel and Apple
Silicon) and Windows. Tool schemas and the wire protocol may still change
between minor versions.
Install
# 1. Get the binary (Linux shown; macOS and Windows builds are on the same page)
curl -fsSLo godot-stagehand \
https://github.com/mrf/godot-stagehand/releases/latest/download/godot-stagehand-linux-amd64
chmod +x godot-stagehand
# 2. Install the addon into your Godot project (idempotent)
./godot-stagehand setup /path/to/your/godot/project
# 3. Run your game with Stagehand on
godot --path /path/to/your/project --stagehand
setup prints the MCP client config snippet and the command to run your game.
Your game then prints a one-session auth token. Keep it private, and give it to
godot_connect.
Rather not use a terminal? Enable the addon in Project → Project Settings →
Plugins, then click Setup… in the editor toolbar. That wizard downloads the
binary, writes the config, and tests the connection. Either path is walked
through step by step in the Quickstart.
Claude Code
/plugin marketplace add mrf/godot-stagehand
/plugin install godot-stagehand@godot-stagehand
The plugin brings the MCP server (it downloads the matching release binary on
first start), the agent skill, and godot-stagehand on the Bash tool's PATH.
Enable it in your Godot project's .claude/settings.json rather than user-wide,
and remove any hand-written godot-stagehand MCP entry first, or every tool
appears twice.
In the terminal, /stagehand-view opens a pane with the last frame Claude
captured. kitty and Ghostty show it as a full picture. Other terminals, and
anything inside tmux, show a coarse grid of coloured blocks instead, because
Claude Code draws pictures only where the terminal supports kitty-style
images. The Desktop app shows the frame's size and capture time.
Use it
From an MCP client (Claude Code, Claude Desktop, Cursor, anything speaking MCP):
{
"mcpServers": {
"godot-stagehand": {
"command": "/absolute/path/to/godot-stagehand"
}
}
}
From a terminal or a CI job:
export STAGEHAND_AUTH_TOKEN=<the token this Godot session printed>
godot-stagehand find --port 26788 'class:Button' --properties text
godot-stagehand run scenarios/menu-smoke.json --out-dir ci-artifacts
run executes a declarative list of launch, action, wait and assertion steps
against a real Godot build and exits nonzero on failure. Exit 5 means a real
regression. --out-dir collects report.json, junit.xml, rpc-trace.json,
godot.log, screenshots and diff images.
Stagehand binds to 127.0.0.1 and rejects every command until the peer supplies
the session token, but it is a dev control plane, not a hardened endpoint.
Read the security boundary before you expose anything.
Docs