spawn-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@spawn-mcpPush my latest changes and take a screenshot of the live game."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
spawn-mcp
Local Model Context Protocol server for the Spawn Games agent API, plus a Playwright Chromium play client so the LLM can open the live game, screenshot it, drive input, and debug without asking you to look.
New here? Read GETTING-STARTED.md instead: a plain-language walkthrough from install to your first game, no MCP experience assumed. The rest of this file is the technical reference.
Install
git clone https://github.com/wfbcargo/wfbcargo_spawn_mcp.git
cd wfbcargo_spawn_mcp
npm install
npm run build
npm run setup # one-time: downloads Chromium (~150MB) for the play clientnpm run setup is separate on purpose, so npm install never downloads a browser behind your back. The API tools work fine without it; only the spawn_play_* tools need Chromium. Equivalent: npx playwright install chromium.
Related MCP server: onyx MCP
Cursor config
{
"mcpServers": {
"spawn": {
"command": "node",
"args": ["/absolute/path/to/wfbcargo_spawn_mcp/dist/index.js"],
"env": {
"SPAWN_PROJECT_DIR": "/absolute/path/to/your-spawn-game"
}
}
}
}See mcp.example.json. On Windows use forward slashes (C:/Users/you/...).
Env var | Default | Purpose |
| process cwd | Game project holding |
|
|
|
|
| Abort API calls that hang |
| pinned in | Dev override only; must be |
| Playwright default | Override where Chromium is installed |
Loop
edit → spawn_validate → spawn_push
→ spawn_play_open (once)
→ spawn_play_screenshot / spawn_play_input
→ spawn_logs / spawn_play_console / spawn_exec if broken
→ fix → push → screenshot againSpawn is WebGPU/canvas, so accessibility snapshots won't see the world. Screenshots are the ground truth.
First connection
Spawn gear → Build with a coding agent → fresh
sbk_…key (~5 min, once).spawn_bootstrap→ token lands in project.env(masked in tool output). Use a distinctnameper agent.spawn_me, thenspawn_create_game(or list +spawn_set_variant).spawn_init, read.spawn/guide.md+.spawn/tome-api.md.spawn_play_open: agent joins as its own browser client (creator can still keep their tab open).
Multi-agent
Same creator account needs no crew setup. Each agent gets its own key (settings → build with your own agent) and can push the same game concurrently, the same model Savi's background builders use.
Publish in the Spawn UI before unleashing agents. Published (
mode=live) stays stable for players while agents mutate dev head. There is no agent publish API; agents only read live viaspawn_latest/spawn_status.One project dir (or worktree) per agent. A shared
SPAWN_PROJECT_DIRwill thrashgame.json, scripts, and.spawn/base-version. SameSPAWN_VARIANT_IDfor everyone.Start with 2 to 3 agents, partition script/area ownership, treat 409
version_conflictas normal:spawn_latest→ merge.theirs→ push.Label bootstraps (
terrain-agent, …) and callspawn_saviafter meaningful pushes.
spawn_status # head vs published, local base, .theirs
spawn_latest # pull head (conflict recovery)
spawn_latest mode=live # inspect published (no local write)
spawn_latest mode=live applyLocal=true # reset local to published snapshotTools
API
Tool | Purpose |
| Trade |
| Whoami |
| Pick a game |
| Scaffold project + docs |
| Guide, tome API, domain skills |
| Pull head / published / version / updateSlug (+ script sync) |
| Compile + schema check / live push |
| Live world inspect |
| Background context for Savi |
| Disconnect / local + head/published health |
Play browser
Tool | Purpose |
| Launch Chromium on the play URL (screenshot by default) |
| See the world after a push (jpeg by default; |
| Keys/mouse (WASD, click, drag, type) |
| Hard reload if the client didn't reshape |
| Page console / pageerror |
| Page JS (prefer |
| Session health / teardown |
Also: spawn_session prompt with the full loop (including multi-agent).
Development
npm run typecheck # tsc over src/ + test/
npm test # node:test suite (no browser needed)
npm run check # both
npm run build # emit dist/Tests cover the parts that silently corrupt a project when they regress: the spec compiler, the script path guards, and the three-way pull/merge in syncPulledScripts. CI runs them on Node 20/22 across Linux and Windows.
The
testscript lists test files explicitly rather than globbing, becausenode --testonly expands globs itself on Node 21+, and Windows shells don't expand them either. Add newtest/*.test.tsfiles to that script or they won't run.
Security
SPAWN_AGENT_KEYlives in the game project's.envonly.Tools never echo the full token;
spawn_bootstrapandspawn_statusreturn a masked prefix..envand.spawn/are gitignored by init/bootstrap.The play browser is a normal player client. It runs in a fresh, credential-free context and does not inject the agent key into the page.
Trust model
This server hands an LLM real capabilities on your machine. Worth knowing before you run it:
Filesystem writes. Every tool takes a
projectDirand writes.env,.gitignore,game.json,scripts/**, and.spawn/**under it. There is no sandbox beyond the path you pass.Code execution.
spawn_execruns JS in your live room;spawn_play_evalruns JS in the play page;spawn_play_openwill navigate to any URL it's given.Untrusted text flows back to the model.
spawn_logs,spawn_exec, andspawn_play_consolereturn server- and player-influenced content. Treat it as data, not instructions.The API origin is pinned to
https://www.spawn.coinsrc/config.ts. It is deliberately not read from the project.envand not a tool argument, so neither a cloned game repo nor the model can redirect your bearer token. Only theSPAWN_API_URLprocess env, set by whoever wrote the MCP config, can override it, and only to anhttpsorigin (or localhost).
License
MIT. See LICENSE. Unofficial community project; not affiliated with or endorsed by Spawn.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceProduction-grade MCP server that gives AI agents safe access to your local dev environment: filesystem, databases, processes, and OpenAPI specs.15323MIT
- Alicense-qualityCmaintenanceLocal MCP server that gives AI agents 44 engine tools to build, run, and debug real 2D and 3D games through conversation.MIT
- AlicenseAqualityCmaintenanceA local MCP server that delegates tasks to a subagent runtime via OpenAI-compatible interfaces, enabling file operations, command execution, and rollback of local file changes.5MIT
- Flicense-qualityBmaintenanceMCP server for the OffByOne website factory, enabling agents to generate, validate, and manage full-stack web projects through safe, deterministic tools.
Related MCP Connectors
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
An MCP server that gives your AI access to the source code and docs of all public github repos
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/wfbcargo/wfbcargo_spawn_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server