Code Sandbox MCP
An MCP server to create secure code sandbox environment for executing code within Docker containers. This MCP server provides AI applications with a safe and isolated environment for running code while maintaining security through containerization.
What is Code Sandbox MCP?
Code Sandbox MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server to create secure code sandbox environment for executing code within docker containers. this mcp server provides ai applications with a safe and isolated environment for running code while m...
An MCP server to create secure code sandbox environment for executing code within Docker containers. This MCP server provides AI applications with a safe and isolated environment for running code while maintaining security through containerization.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- An MCP server to create secure code sandbox environment for
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx code-sandbox-mcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Code Sandbox MCP
Code Sandbox MCP provides AI assistants with a secure, Docker-based code execution environment through the Model Context Protocol. It lets Claude and other MCP clients spin up isolated containers, write files into them, execute shell commands, and retrieve output—all without touching the host system. This makes it ideal for safely running AI-generated code, testing scripts, or letting an agent experiment with libraries in a throwaway environment that is automatically cleaned up when done.
Prerequisites
- Docker Desktop (or Docker Engine on Linux) installed and running
- An MCP-compatible client such as Claude Desktop
- curl or PowerShell for running the one-line installer (or direct binary download from the releases page)
- macOS, Linux, or Windows host OS
Install Docker and confirm it is running
Code Sandbox MCP delegates all execution to Docker containers. Verify Docker is running before proceeding.
docker infoInstall the code-sandbox-mcp binary
Run the official installer script for Linux/macOS. On Windows, download and run install.ps1 from the repository instead.
curl -fsSL https://raw.githubusercontent.com/Automata-Labs-team/code-sandbox-mcp/main/install.sh | bashVerify the binary is in your PATH
After installation, confirm the binary is accessible system-wide.
code-sandbox-mcp --versionAdd the server to your MCP client config
Edit your Claude Desktop configuration file and register the server. The exact config path depends on your OS: ~/Library/Application Support/Claude/claude_desktop_config.json on macOS.
Restart Claude Desktop
Quit and reopen Claude Desktop. It will launch code-sandbox-mcp as a subprocess, and sandbox tools will be available in your session.
Code Sandbox MCP Examples
Client configuration
Minimal config that launches the installed binary. No environment variables are required.
{
"mcpServers": {
"code-sandbox": {
"command": "code-sandbox-mcp",
"args": [],
"env": {}
}
}
}Prompts to try
Ask Claude to run code safely inside a container.
- "Create a Python 3.12 sandbox, install pandas, and summarize this CSV file"
- "Run this Node.js script in a sandbox and show me the output"
- "Initialize a container with the ubuntu:22.04 image and check what Python version is available"
- "Execute this bash script in an isolated environment and return the exit code"Troubleshooting Code Sandbox MCP
sandbox_initialize fails with 'Cannot connect to the Docker daemon'
Make sure Docker Desktop is running. On Linux, ensure the Docker daemon is started with 'sudo systemctl start docker' and that your user is in the 'docker' group.
The installer script fails or the binary is not found after install
Download the pre-built binary directly from the GitHub Releases page, place it in /usr/local/bin/ (Linux/macOS), and run 'chmod +x /usr/local/bin/code-sandbox-mcp' to make it executable.
Frequently Asked Questions about Code Sandbox MCP
What is Code Sandbox MCP?
Code Sandbox MCP is a Model Context Protocol (MCP) server that mcp server to create secure code sandbox environment for executing code within docker containers. this mcp server provides ai applications with a safe and isolated environment for running code while maintaining security through containerization. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Code Sandbox MCP?
Follow the installation instructions on the Code Sandbox MCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Code Sandbox MCP?
Code Sandbox MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Code Sandbox MCP free to use?
Yes, Code Sandbox MCP is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
Code Sandbox MCP Alternatives — Similar Developer Tools Servers
Looking for alternatives to Code 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 Code 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 Code 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.