SandboxAPI logo

SandboxAPI

Run isolated Python, JavaScript, Go, Java, C++, C, Bash, and TypeScript code through MCP.

Install SandboxAPI

Pick your client, then add it in one click or paste the config.

Streamable HTTP (Remote)
Server URL
https://mcp.sandboxapi.dev/mcp

Remote servers are added in the app, not the config file: Customize → Connectors → Add custom connector, then paste this URL.

Overview

SandboxAPI MCP server lets compatible AI clients run code in eight languages inside isolated gVisor-sandboxed containers. It provides separate tools for single executions, batches of independently sandboxed snippets, and language discovery. Executions have no network access, capped resources, ephemeral filesystems, source-size limits, and configurable timeouts. Use it when an agent needs to test or compute with code without running that code directly on the host.

Use cases

  • Run generated code for quick validation
  • Test snippets across multiple programming languages
  • Execute independent computations in batch
  • Inspect supported language versions before execution

Key features

  • Execute code in eight languages
  • Run isolated batch executions
  • Use gVisor-backed Docker sandboxes
  • Disable outbound network access
  • Apply timeouts and resource limits
  • List languages, versions, aliases, and examples

Tools3

What SandboxAPI lets your agent do. Expand a tool for its parameters.

Self-reported~59 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

24/28 checks healthy over the last 112d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars2Stargazers on the source repository.
Last commit8mo agoMost recent push to the default branch.
Tools exposed3Callable tools this server registers over MCP.
Directory activity4 viewsConfig copies, upvotes, and views on AllMCPs.

How SandboxAPI works

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.

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.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about SandboxAPI

Use the hosted endpoint without local installation, run the `sandboxapi/mcp:latest` Docker image, or build the Go repository from source. A SandboxAPI API key is required.

Yes. The README provides a Claude Desktop configuration using `https://mcp.sandboxapi.dev/mcp` and a Bearer API key.

It supports Python, JavaScript, TypeScript, Go, Java, C++, C, and Bash.

Yes. The `execute_batch` tool accepts multiple executions, and each snippet runs in its own isolated sandbox.

No. The execution environment blocks outbound network connections.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewSandboxAPI AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/sandboxapi?style=directory)](https://allmcps.com/mcp/sandboxapi)
HTML Embed
<a href="https://allmcps.com/mcp/sandboxapi"><img src="https://allmcps.com/api/badge/sandboxapi?style=directory" alt="SandboxAPI on AllMCPs" /></a>