Sandbox MCP
Production-ready MCP server for secure Python code execution with artifact capture, virtual environment support, and LM Studio integration.
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
Maintainer
Works with
Installation
Manual Installation
npx sandbox-mcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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)
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-mcpPull 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 --pullBuild 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 --buildAdd 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"]
}
}
}(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.
Sandbox MCP Alternatives — Similar Developer Tools Servers
Looking for alternatives to Sandbox MCP? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
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.
Set Up Sandbox MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.