# Spawner

> Spawner is an open-source MCP server for developer tools. Per-branch preview environments on your own Spawner server, driven by coding agents. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, self-hosted
- **Website:** https://spawner.run/docs/agents/
- **Repository:** https://github.com/flosk6/spawner/tree/HEAD/apps/cli
- **MCP Registry name:** io.github.Flosk6/spawner
- **Categories:** developer tools, cloud and infrastructure
- **Listing updated:** 2026-11-15

## About

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.

## Features

- **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

## Install

### Claude Code (Terminal)

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

### Claude Desktop (claude_desktop_config.json)

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

### Cursor (~/.cursor/mcp.json)

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

### VS Code (.vscode/mcp.json)

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

### Windsurf (~/.codeium/windsurf/mcp_config.json)

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

### Other clients (your client's MCP settings (most use this shape))

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

## Tools

- `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.

## 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

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github-2): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.
- [Ouroboros](https://ai-powered.com/mcp/ouroboros): Ouroboros is an open-source MCP server for developer tools.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Concord MCP](https://ai-powered.com/mcp/concord-mcp): Concord MCP is a freemium MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/spawner
