11 tools · 12 languages · MCP-native

Code execution for any MCP-compatible AI agent

SandboxAPI ships an MCP server at https://mcp.sandboxapi.dev/mcp. Drop the JSON config below into Claude Desktop, Cursor, VS Code, or any other MCP-compatible client. Your AI can now run code in 12 languages, install packages, and keep state across calls.

11 tools, all the surface area you need

Every endpoint in the SandboxAPI HTTP API has a matching MCP tool. The agent can pick the mode that fits the moment.

execute_codeOne-shot synchronous execution
execute_batchRun up to 200 snippets in a single call
list_languagesDiscover available runtimes & versions
create_sessionOpen a stateful sandbox
session_executeExecute inside an open session
session_closeTear down a session early
session_install_packagespip / npm / gem / cargo
execute_asyncSubmit long jobs, get a token
get_executionPoll an async job's status
execute_with_expectedAuto-grade against expected output
get_capabilitiesRuntime feature discovery

Set up in 30 seconds

Pick your client, paste the JSON, replace YOUR_API_KEY with your RapidAPI or direct API key. Done.

Claude Desktop macOS / Win

Edit the Claude Desktop config and restart the app.

{
  "mcpServers": {
    "sandboxapi": {
      "url": "https://mcp.sandboxapi.dev/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
~/Library/Application Support/Claude/claude_desktop_config.json

Cursor All platforms

Add to your Cursor MCP config (Settings → MCP).

{
  "mcpServers": {
    "sandboxapi": {
      "url": "https://mcp.sandboxapi.dev/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
Settings → MCP → Add server

VS Code Continue / Cline

Compatible with the Continue and Cline MCP integrations.

{
  "mcpServers": {
    "sandboxapi": {
      "url": "https://mcp.sandboxapi.dev/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
~/.continue/config.json or via the extension UI

30-second demo

An agent in Claude Desktop creates a session, installs pandas, parses a CSV, and reports findings — all without leaving the chat.

Demo GIF coming soon — the visual assets team is producing it.
img/mcp-demo.gif (1280×720, ~10s loop)

What you can build

The MCP integration is the fastest way to ship one of these primitives in your AI agent product.

Code interpreter

Give your AI a persistent Python sandbox. Variables and DataFrames live across turns. Files persist. The agent can pip install what it needs and keep working.

create_session, session_install_packages, session_execute

Autonomous debugger

Failing test? The agent runs the code, sees the traceback, edits the file, runs again. Tight loops via stateful sessions instead of restart-and-pray.

create_session, session_execute, get_capabilities

REPL agent

Build the next "ChatGPT advanced data analysis" but on your own stack and your own model. 12 languages, gVisor isolation, and you're out in days.

create_session, session_execute, session_install_packages

Ready to give your AI a code interpreter?

Get an API key, paste the JSON config, and your AI is running code in 30 seconds.

Get an API key Read MCP docs