# sandboxrouting

> sandboxrouting is an open-source MCP server for agent sandbox. One router across 108 cloud sandbox providers, using free tiers before paid ones. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, Self-hosted
- **Website:** https://sandboxrouting.com
- **Repository:** https://github.com/jccorzo/sandboxrouting
- **MCP Registry name:** com.sandboxrouting/sandboxrouting
- **Categories:** [agent sandbox](https://ai-powered.com/categories/agent-sandbox)
- **Listing updated:** 2026-11-23

## About

Instead of signing up for a single sandbox vendor, you send one request and the router picks a provider that still has free usage left, then fails over to the next when one refuses. It tracks spend locally in a shared ledger, since none of the providers expose remaining free credit through an API.

Beyond single sandboxes, it offers jobs: ordered setup and run steps with a working directory that is checkpointed after each step. If a box disappears or a provider cuts it off, the job resumes on another box from the last checkpoint. Steps with external side effects can be flagged so they never run twice.

It ships as an npm package with an SDK, a CLI, a REST server and an MCP server that all share the same ledger. Paid usage is off by default, and a monthly budget can be set as a hard cap. It suits developers and agent builders who run code in throwaway environments and want to stretch free allowances across several vendors.

## Features

- **Free-first provider routing:** Ranks providers so monthly free usage and one-time credits are consumed before any paid tier is considered.
- **Automatic failover:** Moves to the next provider when one returns quota, auth, rate-limit or network errors, with cooldowns per refusal type.
- **Checkpointed jobs:** Runs ordered steps in a working directory and resumes on a new box from the last checkpoint after a loss.
- **Local spend metering:** Records running time in a ledger and prices it at each provider's rates, with optional usage carried in from elsewhere.
- **Isolation filtering:** Lets requests set a minimum isolation level so weaker or unpublished isolation providers are skipped.
- **Shared SDK, CLI, REST and MCP:** All four surfaces read and write the same ledger, so they agree on which sandboxes are live and what has been spent.

## Good for

- Running untrusted or generated code in short-lived sandboxes without committing to one vendor
- Stretching free sandbox allowances across several providers for prototyping or testing
- Running multi-step build or analysis jobs that survive a sandbox being killed mid-run
- Giving an AI agent a sandbox tool through MCP while keeping spend under a monthly cap

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add sandboxrouting -- npx -y sandboxrouting
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "sandboxrouting": {
      "command": "npx",
      "args": [
        "-y",
        "sandboxrouting"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "sandboxrouting": {
      "command": "npx",
      "args": [
        "-y",
        "sandboxrouting"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

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

```json
{
  "mcpServers": {
    "sandboxrouting": {
      "command": "npx",
      "args": [
        "-y",
        "sandboxrouting"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "sandboxrouting": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "sandboxrouting"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add sandboxrouting -- npx -y sandboxrouting
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.sandboxrouting]
command = "npx"
args = ["-y", "sandboxrouting"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "sandboxrouting": {
      "command": "npx",
      "args": [
        "-y",
        "sandboxrouting"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user sandboxrouting npx -- -y sandboxrouting

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "sandboxrouting": {
      "command": "npx",
      "args": [
        "-y",
        "sandboxrouting"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "sandboxrouting": {
      "command": "npx",
      "args": [
        "-y",
        "sandboxrouting"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "sandboxrouting": {
      "command": "npx",
      "args": [
        "-y",
        "sandboxrouting"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "sandboxrouting": {
      "command": "npx",
      "args": [
        "-y",
        "sandboxrouting"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "sandboxrouting": {
      "command": "npx",
      "args": [
        "-y",
        "sandboxrouting"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "sandboxrouting": {
      "command": "npx",
      "args": [
        "-y",
        "sandboxrouting"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "sandboxrouting": {
      "command": "npx",
      "args": [
        "-y",
        "sandboxrouting"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

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

```json
{
  "mcpServers": {
    "sandboxrouting": {
      "command": "npx",
      "args": [
        "-y",
        "sandboxrouting"
      ]
    }
  }
}
```

## FAQ

### Will sandboxrouting bill me without my permission?

No. Paid usage is off by default (allowPaid is false), and a request that no free tier can cover fails with each provider's reason. Paid usage can be enabled globally or per provider, and maxPaidUsdPerMonth sets a hard monthly cap.

### How does sandboxrouting know how much free usage is left?

It meters locally. Each sandbox's running time is recorded in a ledger and priced at the provider's rates, because no provider exposes remaining free credit through an API.

### What happens when a provider refuses a request?

The router tries the next provider in the plan and marks the refusing one. A 429 is skipped for a minute, a 401 or 403 for 10 minutes, and a 402 until the monthly reset or a backoff schedule, while network errors and 5xx responses feed a circuit breaker.

### Can I choose how providers are ordered?

Yes. The default is free-first, and there are four other built-in strategies: cheapest, balanced, fastest and spread. You can set one in config or per request, or register your own.

### Where is the state kept?

In a single ledger file at ~/.sandboxrouting/ledger.json by default, locked on every update. The SDK, CLI, REST server and MCP server all use it.

### How do I add sandboxrouting to Claude Code?

Run this command in your terminal: claude mcp add sandboxrouting -- npx -y sandboxrouting

### What are the best alternatives to sandboxrouting?

The closest alternatives to sandboxrouting are Sandbox as a Service, LumiCloud Sandboxes, Sandbox Env MCP and MCP Sandbox Computer VM for AI.

## Where this comes from

- Description: written from the project's README, the project's website and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Sandbox as a Service](https://ai-powered.com/mcp/sandbox-as-a-service): Sandbox as a Service is an MCP server for developer tools.
- [LumiCloud Sandboxes](https://ai-powered.com/mcp/lumicloud-sandboxes): LumiCloud Sandboxes is an MCP server for agent sandbox.
- [Sandbox Env MCP](https://ai-powered.com/mcp/sandbox-env-mcp): Sandbox Env MCP is an open-source MCP server for developer tools.
- [MCP Sandbox Computer VM for AI](https://ai-powered.com/mcp/mcp-sandbox-computer-vm-for-ai): MCP Sandbox Computer VM for AI is an MCP server for developer tools.

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