Execute code in 8 languages (Python, JS, TS, Go, Java, C++, C, Bash) in gVisor sandboxes.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
💡 Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
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.
Connect directly to the hosted endpoint. No local installation required.
Claude Desktop (claude_desktop_config.json):
VS Code (.vscode/mcp.json):
Cursor (~/.cursor/mcp.json):
Then point your client to http://localhost:8081/mcp.
execute_codeExecute 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_batchExecute 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_languagesList all supported programming languages with versions and example code. No parameters.
| 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 |
| 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) |
Every code execution is isolated with defense-in-depth:
Get your API key at sandboxapi.dev or through RapidAPI.
MIT
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/sandboxapi)<a href="https://allmcps.com/mcp/sandboxapi"><img src="https://allmcps.com/api/badge/sandboxapi?style=directory" alt="SandboxAPI on AllMCPs" /></a>