Sandbox MCP Server
About
Provides isolated Docker environments for secure code execution.
Details
- Author
- tsuchijo
- Categories
- Developer Tools, Other, Infrastructure
Jump to
Setup
Install Sandbox MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/tsuchijo/sandbox-mcp
Follow the installation instructions in the repository README, then restart your MCP client.
Provides isolated Docker environments for secure code execution.
An MCP server that provides isolated Docker environments for code execution. This server allows you to:
- Create containers with any Docker image
- Write and execute code in multiple programming languages
- Install packages and set up development environments
- Run commands in isolated containers
- Python 3.9 or higher
- Docker installed and running
- uv package manager (recommended)
- Docker MCP server (recommended)
git clone <your-repo-url> cd sandbox_server
- Create and activate a virtual environment with uv:
uv venv source .venv/bin/activate # On Unix/MacOS # Or on Windows: # .venv\Scripts\activate
- Open Claude Desktop's configuration file:
- macOS:~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:%APPDATA%\Claude\claude_desktop_config.json
{ "mcpServers": { "sandbox": { "command": "uv", "args": [ "--directory", "/absolute/path/to/sandbox_server", "run", "sandbox_server.py" ], "env": { "PYTHONPATH": "/absolute/path/to/sandbox_server" } } } }
Replace/absolute/path/to/sandbox_serverwith the actual path to your project directory.
Once connected to Claude Desktop, you can:
Could you create a Python container and write a simple hello world program?
Could you create a C program that calculates the fibonacci sequence and run it?
Could you create a Python script that uses numpy to generate and plot some random data?
The server provides several ways to save and reproduce your development environments:
When creating a container, you can make it persistent:
Could you create a persistent Python container with numpy and pandas installed?
- Stays running after Claude Desktop closes
- Can be accessed directly through Docker
- Preserves all installed packages and files
The server will provide instructions for:
- Accessing the container directly (docker exec)
- Stopping and starting the container
- Removing it when no longer needed
After setting up your environment, you can save it as a Docker image:
Could you save the current container state as an image named 'my-ds-env:v1'?
- Create a new Docker image with all your:
- Installed packages
- Created files
- Configuration changes
You can then share this image or use it as a starting point for new containers:
Could you create a new container using the my-ds-env:v1 image?
To make your environment fully reproducible, you can generate a Dockerfile:
Could you export a Dockerfile that recreates this environment?
- Base image specification
- Created files
- Template for additional setup steps
- Share your environment setup with others
- Version control your development environment
- Modify and customize the build process
- Deploy to different systems
For reproducible development environments:
Create a persistent Python container for data science work
- Install needed packages and set up the environment:
Install numpy, pandas, and scikit-learn in the container
Create and run a test script to verify the environment
Save this container as 'ds-workspace:v1'
Generate a Dockerfile for this environment
This gives you multiple options for recreating your environment:
- Use the saved Docker image directly
- Build from the Dockerfile with modifications
- Access the original container if needed
- All code executes in isolated Docker containers
- Containers are automatically removed after use
- File systems are isolated between containers
- Host system access is restricted
sandbox_server/ ├── sandbox_server.py # Main server implementation ├── pyproject.toml # Project configuration └── README.md # This file
- create_container_environment: Creates a new Docker container with specified image
- create_file_in_container: Creates a file in a container
- execute_command_in_container: Runs commands in a container
- save_container_state: Saves the container state to a persistent container
- export_dockerfile: exports a docker file to create a persistant environment
- exit_container: closes a container to cleanup environment when finished
This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.
Official Docker MCP Toolkit for discovering, configuring, and running containerized MCP servers through Docker Desktop and the Docker MCP gateway.
The Shipyard CLI provides an MCP server for agents to manage Shipyard environments directly: by pulling logs, comparing branches, running tests, and stopping/starting environments..
A secure, Docker-based server providing core execution capabilities for AI agents.
Open-source CLI for testing MCP servers and detecting schema drift
Check if a command is runnable before running it.
A secure sandbox for executing code in Docker containers, providing a safe environment for AI applications.
Hot reload remote containerized Python applications directly from your IDE.
Manage DDEV projects, enabling LLM applications to interact with local development environments through the MCP protocol.
Manage DevContainer environments using natural language prompts in any MCP-compatible editor.
Integrates with the devcontainers CLI to manage development containers. Requires Docker.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





