Skip to content
MCP server

Spawner

Per-branch preview environments on your own Spawner server, driven by coding agents

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI, self-hosted
Runs
Locally
Version
2.2.1
Listing updated
2 days ago

About Spawner

Spawner is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.

Spawner is an open-source, self-hosted preview environment manager, and its CLI doubles as this MCP server. An agent builds the app from its current worktree, uncommitted changes included, then opens the page it changed, calls the API, queries the database or reads the error. Each branch gets its own copy of the whole Docker Compose stack, with its own URLs, database and logs, so agents on different branches never compete for ports.

The agent's machine needs only Node.js 20 or later, the CLI and a token, not Docker. Tokens can be limited to one project and to scopes; without envs:exec a token cannot run commands. Commands exit with stable codes: 4 when the environment failed, 6 when quota or capacity is reached and 7 when the .spawner/ config is refused.

spawner_exec and spawner_down are marked destructive, and whether a client asks before running them depends on its own permission settings. An admin must add the project in the dashboard before the first spawner up.

Install

Run in a terminal

claude mcp add spawner --env SPAWNER_TOKEN='<SPAWNER_TOKEN>' -- npx -y spawner-cli

Add to claude_desktop_config.json

{
  "mcpServers": {
    "spawner": {
      "command": "npx",
      "args": [
        "-y",
        "spawner-cli"
      ],
      "env": {
        "SPAWNER_TOKEN": "<SPAWNER_TOKEN>"
      }
    }
  }
}

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "spawner": {
      "command": "npx",
      "args": [
        "-y",
        "spawner-cli"
      ],
      "env": {
        "SPAWNER_TOKEN": "<SPAWNER_TOKEN>"
      }
    }
  }
}

Add to .vscode/mcp.json

{
  "servers": {
    "spawner": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "spawner-cli"
      ],
      "env": {
        "SPAWNER_TOKEN": "<SPAWNER_TOKEN>"
      }
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "spawner": {
      "command": "npx",
      "args": [
        "-y",
        "spawner-cli"
      ],
      "env": {
        "SPAWNER_TOKEN": "<SPAWNER_TOKEN>"
      }
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "spawner": {
      "command": "npx",
      "args": [
        "-y",
        "spawner-cli"
      ],
      "env": {
        "SPAWNER_TOKEN": "<SPAWNER_TOKEN>"
      }
    }
  }
}

Configuration

  • SPAWNER_URLAddress of your Spawner server's dashboard, such as https://spawner.preview.example.com. Without it, the server of spawner login
  • SPAWNER_TOKENPersonal API token (spn_...), from spawner token create or the dashboard. Without it, the token of spawner login

Tools this server provides (9)

Taken from the project documentation; the running server may differ.

spawner_up
Create or update the environment of the current branch.
spawner_status
Show environment status.
spawner_list
List environments.
spawner_logs
Read environment logs.
spawner_exec
Run a command in a service.
spawner_stats
Show environment stats.
spawner_url
Get the environment URL.
spawner_share
Create a shareable link.
spawner_down
Delete an environment.

What it does

Branch preview environments
Each branch gets its own copy of the Compose stack with its own database.
Worktree builds
Builds include uncommitted changes from the agent's worktree.
Scoped tokens
Tokens can be limited to a project and to read, write, preview or exec scopes.
Actionable exit codes
Stable codes tell an agent whether to fix the build, free capacity or ask a person.
Shareable links
spawner share gives a reviewer a link without needing an account.
Error-focused logs
spawner logs --errors shows error lines with stack traces kept whole.

Good for

  • Let a coding agent verify a UI change in a running copy of the app
  • Query a branch's database from an agent
  • Give reviewers a link to a branch without an account
  • Free capacity by having an agent delete finished environments

Pricing

Open source

Free to self-host, Apache-2.0

Prices change. Check spawner.run before you buy.

Spawner FAQ

Does the agent's machine need Docker?

No. It needs Node.js 20 or later, the CLI and a token; the app runs on your Spawner server.

What licence is it?

Apache-2.0, and the server is open source and self-hosted.

How does an agent log in?

spawner login with a dashboard-approved code, or SPAWNER_URL and SPAWNER_TOKEN environment variables.

Which clients does it work with?

Claude Code, Codex, Cursor and other coding agents via the CLI or MCP server.

Is Spawner free?

Yes. Spawner is open source, so you can use and self-host it for free.

How do I add Spawner to Claude Code?

Run this command in your terminal: claude mcp add spawner --env SPAWNER_TOKEN='<SPAWNER_TOKEN>' -- npx -y spawner-cli

What are the best alternatives to Spawner?

The closest alternatives to Spawner are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

Alternatives to Spawner

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools