Sandbox MCP

v1.0.0Developer Toolsstable

Production-ready MCP server for secure Python code execution with artifact capture, virtual environment support, and LM Studio integration.

dockergogolangmcpmcp-server
Share:
110
Stars
0
Downloads
0
Weekly
0/5

What is Sandbox MCP?

Sandbox MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to production-ready mcp server for secure python code execution with artifact capture, virtual environment support, and lm studio integration.

Production-ready MCP server for secure Python code execution with artifact capture, virtual environment support, and LM Studio integration.

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Production-ready MCP server for secure Python code execution

Use Cases

Secure Python code execution
Virtual environment isolation
Artifact capture and logging
pottekkat

Maintainer

LicenseMIT License
Languagego
Versionv1.0.0
UpdatedMay 16, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx sandbox-mcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Sandbox MCP

Sandbox MCP is a Go-based MCP server that gives AI clients a secure, Docker-isolated code execution environment across multiple programming languages. Instead of running LLM-generated code directly on your host machine, Sandbox MCP spins up isolated Docker containers for each execution, preventing untrusted code from affecting your system. It ships with built-in sandboxes for Python, Rust, Go, JavaScript, Java, shell, and network tools, and allows you to define custom sandboxes using a Dockerfile and JSON configuration. This dramatically reduces the iteration cycle when an AI is generating and testing code, because the model can safely run what it writes.

Prerequisites

  • Go 1.24 or higher (if installing via go install) or a pre-built binary from the Releases page
  • Docker Desktop or Docker Engine installed and running on your machine
  • An MCP-compatible client: Claude Desktop, Cursor, or any client that supports stdio MCP servers
  • Sufficient disk space for Docker images (each sandbox pulls a base image on first build)
1

Install the sandbox-mcp binary

Install via Go or download a pre-built binary for your OS and architecture from the GitHub Releases page. For Go install, make sure $GOPATH/bin is on your PATH.

go install github.com/pottekkat/sandbox-mcp/cmd/sandbox-mcp@latest
# Then verify: which sandbox-mcp
2

Pull the default sandbox configurations

Run sandbox-mcp with the --pull flag to download the default sandbox Dockerfiles and configurations into $XDG_CONFIG_HOME/sandbox-mcp. This creates the configuration directory and populates it with the built-in sandboxes.

sandbox-mcp --pull
3

Build Docker images for all sandboxes

Build the Docker images for the downloaded sandboxes. This step requires Docker to be running. Image builds may take a few minutes on first run as base images are pulled.

sandbox-mcp --build
4

Add Sandbox MCP to your client configuration

Register the server in your MCP client config file. Replace path/to/sandbox-mcp with the actual binary path from the which sandbox-mcp output.

{
  "mcpServers": {
    "sandbox-mcp": {
      "command": "/path/to/sandbox-mcp",
      "args": ["--stdio"]
    }
  }
}
5

(Optional) Create a custom sandbox

To add your own language or environment, create a directory under $XDG_CONFIG_HOME/sandbox-mcp/sandboxes/ containing a Dockerfile and a JSON configuration file, then re-run sandbox-mcp --build.

Sandbox MCP Examples

Client configuration (Claude Desktop)

Add this to ~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%/Claude/claude_desktop_config.json on Windows. Adjust the binary path to match your installation.

{
  "mcpServers": {
    "sandbox-mcp": {
      "command": "/usr/local/bin/sandbox-mcp",
      "args": ["--stdio"]
    }
  }
}

Prompts to try

Use these prompts after connecting Sandbox MCP to have the AI generate and safely run code in an isolated container.

- "Write a Python script that fetches the current Bitcoin price and displays it, then run it in the sandbox"
- "Write and execute a Go program that calculates the first 20 Fibonacci numbers"
- "Run a shell command to check network connectivity to google.com using the network-tools sandbox"
- "Write a Java program that sorts a list of strings alphabetically and test it"
- "Generate and run a Rust program that reads a CSV from stdin and outputs the sum of the second column"

Troubleshooting Sandbox MCP

sandbox-mcp --build fails with 'Cannot connect to the Docker daemon'

Docker must be running before you build images. Start Docker Desktop (or run sudo systemctl start docker on Linux) and then retry sandbox-mcp --build.

The MCP client cannot find the sandbox-mcp binary

Use the absolute path to the binary in the command field of your config — not a relative path or shell alias. Run which sandbox-mcp to get the absolute path, then paste that value directly into the config JSON.

Code execution times out or the container does not start

Sandbox containers need to be built before use. If you skipped sandbox-mcp --build or a specific sandbox image is missing, run sandbox-mcp --build again. Also check that Docker has enough memory allocated in Docker Desktop settings.

Frequently Asked Questions about Sandbox MCP

What is Sandbox MCP?

Sandbox MCP is a Model Context Protocol (MCP) server that production-ready mcp server for secure python code execution with artifact capture, virtual environment support, and lm studio integration. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Sandbox MCP?

Follow the installation instructions on the Sandbox MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Sandbox MCP?

Sandbox MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Sandbox MCP free to use?

Yes, Sandbox MCP is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "sandbox-mcp": { "command": "npx", "args": ["-y", "sandbox-mcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Sandbox MCP?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides