Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Execute code in 8 languages (Python, JS, TS, Go, Java, C++, C, Bash) in gVisor sandboxes.

README.md

SandboxAPI MCP Server

![MCP](https://modelcontextprotocol.io) ![Languages](https://sandboxapi.dev) ![License](LICENSE)

Give your AI agent the ability to execute code in 8 programming languages, safely.

SandboxAPI MCP Server connects any MCP-compatible AI client (Claude, Cursor, VS Code, Windsurf, etc.) to secure code execution. Every execution runs inside a gVisor-sandboxed Docker container with no network access, strict resource limits, and ephemeral filesystems.

Quick Start

Option 1: Remote Server (No Setup)

Connect directly to the hosted endpoint. No local installation required.

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "sandboxapi": {
      "url": "https://mcp.sandboxapi.dev/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

VS Code (.vscode/mcp.json):

{
  "servers": {
    "sandboxapi": {
      "url": "https://mcp.sandboxapi.dev/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

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

{
  "mcpServers": {
    "sandboxapi": {
      "url": "https://mcp.sandboxapi.dev/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}

Option 2: Docker

docker run -d \
  -p 8081:8081 \
  -e SANDBOXAPI_API_KEY=your_sandboxapi_key \
  -e MCP_API_KEY=your_mcp_auth_key \
  sandboxapi/mcp:latest

Then point your client to http://localhost:8081/mcp.

Option 3: Build from Source

git clone https://github.com/sandboxapi/sandboxapi-mcp.git
cd sandboxapi-mcp
go build -o sandboxapi-mcp .

export SANDBOXAPI_API_KEY=your_key
export MCP_API_KEY=optional_auth_key
./sandboxapi-mcp

Available Tools

execute_code

Execute code in a sandboxed container.

| Parameter | Type | Required | Description | |------------|--------|----------|-------------| | language | string | Yes | python3, javascript, typescript, bash, java, cpp, c, go | | code | string | Yes | Source code to execute (max 1MB) | | timeout | number | No | Timeout in seconds (default: 10, max: 300) | | stdin | string | No | Standard input to pass to the program |

execute_batch

Execute multiple code snippets. Each runs in its own isolated sandbox.

| Parameter | Type | Required | Description | |--------------|-------|----------|-------------| | executions | array | Yes | Array of {language, code, timeout?, stdin?} objects |

list_languages

List all supported programming languages with versions and example code. No parameters.

Supported Languages

| Language | Version | Aliases | |------------|----------|---------| | Python | 3.12 | python3, python, py | | JavaScript | Node 22 | javascript, js, node | | TypeScript | 5.4 | typescript, ts | | Go | 1.22 | go, golang | | Java | 21 | java, jdk | | C++ | GCC 14 | cpp, c++ | | C | GCC 14 | c, gcc | | Bash | 5.2 | bash, sh, shell |

Environment Variables

| Variable | Required | Description | |---------------------|----------|-------------| | SANDBOXAPI_API_KEY | Yes | API key for the SandboxAPI backend | | MCP_API_KEY | No | Auth key for the MCP endpoint (omit for open access) | | MCP_PORT | No | Port to listen on (default: 8081) | | SANDBOXAPI_URL | No | API base URL (default: https://api.sandboxapi.dev) |

Security

Every code execution is isolated with defense-in-depth:

  • gVisor (runsc) — User-space kernel intercepts all syscalls
  • Network isolation — Executed code cannot make outbound connections
  • Resource limits — CPU, memory, and disk usage are capped
  • Ephemeral containers — Destroyed immediately after execution
  • Read-only filesystem — No persistent writes between executions
  • Code size limits — Source code capped at 1MB
  • Timeout enforcement — Hard kill after configured timeout

API Key

Get your API key at sandboxapi.dev or through RapidAPI.

Links

License

MIT

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Developer Tools servers.