# SandboxAPI [Health: Active]

**Category:** 👨‍💻 Code Execution  
**Repository:** https://github.com/sandboxapi/sandboxapi-mcp  
**GitHub Stars:** 2  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/sandboxapi

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

## Tools
Capabilities this server exposes over MCP:

- **execute_code** — Execute code in a sandboxed container.
- **execute_batch** — Execute multiple code snippets. Each runs in its own isolated sandbox.
- **list_languages** — List all supported programming languages with versions and example code. No parameters.

## Claude Desktop Quick Installation
Remote MCP endpoint (confidence: high). Install path detected from listing signals. Add as a URL/SSE server in your client:

```json
"mcpServers": {
  "sandboxapi": {
    "url": "https://mcp.sandboxapi.dev/mcp"
  }
}
```

## Documentation

## What SandboxAPI MCP server does

SandboxAPI MCP server exposes remote code execution through the Model Context Protocol. An MCP-compatible client can submit source code, select a language, optionally provide standard input, and receive the execution result. The supported languages are Python 3.12, JavaScript on Node 22, TypeScript 5.4, Go 1.22, Java 21, C++ with GCC 14, C with GCC 14, and Bash 5.2.

The service is intended for short-lived execution rather than persistent development environments. Each run occurs in a separate container. Containers are destroyed after execution, and writes do not persist between runs.

## How it works

The client connects to the hosted MCP endpoint at `https://mcp.sandboxapi.dev/mcp`, or to a locally run instance. The server forwards execution requests to the SandboxAPI backend, which runs them in Docker containers using gVisor. A user API key is required for the backend. The MCP endpoint can also be protected with a separate optional authentication key.

Network access is disabled for executed programs. The environment applies CPU, memory, disk, and timeout restrictions, and uses a read-only filesystem. Submitted source code is limited to 1 MB. The default execution timeout is 10 seconds, with a maximum of 300 seconds.

A batch request contains multiple execution objects. SandboxAPI MCP server runs each object in its own isolated sandbox, rather than sharing state between snippets.

## Setup and configuration

The hosted option requires no local installation. Configure the client with the MCP URL and an `Authorization: Bearer ...` header containing a SandboxAPI key. The README provides configurations for Claude Desktop, Cursor, and VS Code; it also identifies Windsurf as an MCP-compatible client.

For local deployment, the project can be started with the published Docker image `sandboxapi/mcp:latest`, or compiled from the Go source repository. A local instance listens on port 8081 by default and exposes the `/mcp` path. Set `MCP_PORT` to change the port.

Required configuration includes `SANDBOXAPI_API_KEY`. `SANDBOXAPI_URL` can override the default backend URL. `MCP_API_KEY` is optional and adds authentication for the MCP endpoint; omitting it leaves that endpoint open according to the README.

## Tools and capabilities

- `execute_code` accepts a language, source code, optional timeout, and optional standard input.
- `execute_batch` accepts an array of executions, each with its own language, code, timeout, and input settings.
- `list_languages` returns supported languages, versions, aliases, and example code without requiring parameters.

Language aliases include `python`, `py`, `js`, `node`, `ts`, `golang`, `jdk`, `c++`, `gcc`, `sh`, and `shell`.

## Limitations and notes

SandboxAPI MCP server does not provide outbound network access from executed code. Files are temporary, and the filesystem is read-only, so it is not suitable for workflows that require persistent artifacts or network-dependent packages. Runtime limits also make it unsuitable for unrestricted long-running processes. API access requires a key obtained through SandboxAPI or its listed RapidAPI offering. The repository is licensed under MIT.

_Full upstream README: https://allmcps.com/mcp/sandboxapi/readme_

