Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
SPAWN_API_URLNoDev override only; must be https (or localhost)
SPAWN_PLAY_HEADEDNoSet to 0 to force headless play sessions1
SPAWN_PROJECT_DIRNoGame project holding game.json / .envprocess cwd
SPAWN_HTTP_TIMEOUT_MSNoAbort API calls that hang60000
PLAYWRIGHT_BROWSERS_PATHNoOverride where Chromium is installed

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
spawn_bootstrapA

Trade a one-time setup bootstrap key (sbk_…) for a durable agent token. Writes SPAWN_AGENT_KEY to the project .env. The full token is NEVER returned — only a masked prefix. Bootstrap keys expire in ~5 minutes and work once.

spawn_meA

Whoami — returns { userId, username } for the connected Spawn agent token.

spawn_list_gamesA

List games this token can push to: { games: [{ appId, variantId, name, playUrl }] }. Ask the creator which one by name.

spawn_create_gameA

Create a new game in the creator's account. Optionally writes SPAWN_VARIANT_ID to .env. Creator should open the play URL and keep it open.

spawn_set_variantA

Set SPAWN_VARIANT_ID in the project .env (join an existing game from spawn_list_games).

spawn_initA

Scaffold a Spawn game project: gitignore secrets, world/ + scripts/, pull current spec → game.json, materialize scripts, fetch docs into .spawn/ (guide.md, tome-api.md, skills.json).

spawn_docsA

Fetch engine guide, tome API reference, and skills index. Optionally save under .spawn/.

spawn_skillA

Fetch one skill's markdown (terrain, structures, combat, cameras, …). Call before entering a new domain.

spawn_latestA

Pull a saved spec: head (mode=dev, default), published live (mode=live), an exact version, or a published updateSlug. Head pulls sync scripts (untouched fast-forward; both-changed → .theirs) and update the base-version rail — use after version_conflict. Non-head pulls are read-only unless applyLocal:true (resets local rail to that snapshot). version and updateSlug are mutually exclusive.

spawn_validateA

Compile the project (game.json + world/*.json + scripts/**) and run authoritative server-side schema validation.

spawn_pushA

Compile + push the project live (~1s in the creator's browser). Every push rebuilds the live room. On 409 version_conflict, call spawn_latest then merge .theirs receipts and push again.

spawn_execA

Run a read-only JavaScript snippet against the live room (e.g. query objects). Pushing is the only write path.

spawn_logsB

Variant logs + live room script logs. Use when behavior doesn't match what you pushed.

spawn_roomsC

Active rooms + player counts for the current variant.

spawn_saviA

Leave background context for Savi (the creator's in-game AI companion) after meaningful pushes so you don't fight over the world.

spawn_revokeA

Revoke the durable agent token (disconnect). Removes SPAWN_AGENT_KEY from project .env after success.

spawn_statusB

Local project status plus optional remote head/published versions: env (masked), base version, conflict receipts, docs present, headVersion vs publishedVersion when credentials allow.

spawn_play_openA

Open the live Spawn play URL in a local Chromium (Playwright). Headed by default so you can watch. Use this as the agent's eyes/hands on the game — Spawn is WebGPU/canvas, so screenshot + input beat accessibility trees. Resolves play URL from the variant if omitted.

spawn_play_screenshotA

Screenshot the open play session. Primary visual check after spawn_push — look at the image before calling the change done. Optionally save under the project.

spawn_play_inputA

Send keyboard/mouse actions to the play session (WASD, jump, click UI, etc.). Clicks the canvas center ONCE per session to give it keyboard focus — later batches send only the actions you list, so no stray clicks fire your weapon or dismiss UI. After acting, call spawn_play_screenshot to see the result.

spawn_play_reloadA

Reload the play tab (e.g. if a push didn't hot-apply to this client). Prefer waiting ~1s after spawn_push first — rooms usually reshape in place.

spawn_play_consoleA

Return recent browser console / pageerror messages from the play session. Pair with spawn_logs for server-side script errors.

spawn_play_evalA

Evaluate JavaScript in the play page (browser context — not the Spawn room api). Prefer spawn_exec for live world queries. Use this for DOM/WebGPU diagnostics.

spawn_play_closeA

Close the Playwright Chromium session.

spawn_play_statusB

Whether a play browser session is open, its URL, headed mode, recent error count.

Prompts

Interactive templates invoked by user choice

NameDescription
spawn_sessionHow to work on a Spawn game via this MCP: bootstrap → game → init → edit → push → play/screenshot → fix (includes multi-agent).

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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