sandboxapi-mcp
OfficialProvides secure sandboxed execution environment for C++ code (GCC 14) with network isolation, resource limits, stdin support, and ephemeral filesystems.
Provides secure sandboxed execution environment for JavaScript/Node.js code (Node 22) with gVisor isolation, strict resource controls, and timeout enforcement.
Provides secure sandboxed execution environment for Python code (Python 3.12) with network isolation, resource limits, and support for stdin input.
Provides secure sandboxed execution environment for TypeScript code (v5.4) with gVisor sandboxing, resource limits, and ephemeral containers.
SandboxAPI MCP Server
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:latestThen 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-mcpRelated MCP server: Isolator MCP Server
Available Tools
execute_code
Execute code in a sandboxed container.
Parameter | Type | Required | Description |
| string | Yes |
|
| string | Yes | Source code to execute (max 1MB) |
| number | No | Timeout in seconds (default: 10, max: 300) |
| 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 |
| array | Yes | Array of |
list_languages
List all supported programming languages with versions and example code. No parameters.
Supported Languages
Language | Version | Aliases |
Python | 3.12 |
|
JavaScript | Node 22 |
|
TypeScript | 5.4 |
|
Go | 1.22 |
|
Java | 21 |
|
C++ | GCC 14 |
|
C | GCC 14 |
|
Bash | 5.2 |
|
Environment Variables
Variable | Required | Description |
| Yes | API key for the SandboxAPI backend |
| No | Auth key for the MCP endpoint (omit for open access) |
| No | Port to listen on (default: |
| No | API base URL (default: |
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
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityCmaintenanceProvides isolated Docker environments for code execution, enabling users to create and manage containers, execute multi-language code, save and reproduce development environments, ensuring security and isolation.17
- AlicenseBqualityDmaintenanceA TypeScript server implementing the Model Context Protocol that provides secure code execution in isolated Docker containers, allowing LLM applications to safely run Python, Go, or JavaScript code snippets.12Apache 2.0
- Alicense-qualityDmaintenanceEnables secure cloud-based execution of code across 14+ programming languages within a sandboxed environment. It supports file management, standard input/output handling, and automatic generation of visual artifacts like plots and charts.MIT
- AlicenseAqualityAmaintenanceEnables AI assistants to securely execute Python and C++ code snippets inside disposable, isolated Docker containers and receive structured results.23MIT
Related MCP Connectors
Host static HTML pages, generate PDFs, screenshots, scrape JS sites, run sandboxed JavaScript.
A paid remote MCP for OpenAI Codex context compressor, built to return verdicts, receipts, usage log
Proves AI-generated Python does what you asked: lint, types, security, sandbox run, exact fixes.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/sandboxapi/sandboxapi-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server