Skip to content
MCP server

sandboxrouting

One router across 108 cloud sandbox providers, using free tiers before paid ones

Runs locally

sandboxrouting is an open-source MCP server for agent sandbox. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, API, Self-hosted
Runs
Locally
Version
0.3.1
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

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.

Or share it with your project

Add to .mcp.json

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

Claude Code setup guide

Add to claude_desktop_config.json

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

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

Claude Desktop setup guide

Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

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

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

Cursor setup guide

Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to ~/.copilot/mcp-config.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.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add sandboxrouting -- npx -y sandboxrouting

Or add to config.toml

Add to ~/.codex/config.toml

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

Codex setup guide

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

{
  "mcpServers": {
    "sandboxrouting": {
      "command": "npx",
      "args": [
        "-y",
        "sandboxrouting"
      ]
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

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

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

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

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

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

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.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.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

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

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

    Cline setup guide

  • Zed

    Add to Zed settings.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.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

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

    Junie

    Add to ~/.junie/mcp/mcp.json

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

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

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

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

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

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • SBR_HOMEWhere the router keeps its ledger (default ~/.sandboxrouting). Provider keys are read from each provider's usual variables, e.g. E2B_API_KEY, MODAL_TOKEN_ID.

About sandboxrouting

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.

What it does

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

Pricing

Open source

Prices change. Check sandboxrouting.com before you buy.

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.

How AIPoweredBot checks servers