sandbox-mcp

MCP.Pizza Chef: pottekkat

Eight walled-off environments come ready to use — Python, JavaScript, Go, Java, Rust, a plain shell, network diagnostic tools and a small web gateway — each in a throwaway container that is deleted the moment it finishes. The limits are genuinely applied rather than merely described: 64 to 256 MB of memory, a 60-second cap, all special privileges stripped, and no internet at all for the programming ones. Docker has to be installed and running. Nothing has changed in the project since May 2025.

Unmaintained · No commits in 16 months.
Coding

Use This MCP server To

Run a snippet of Python and see the real output Check a piece of code works before I trust it Test a small script without installing anything myself Diagnose a network problem from an isolated environment Compare how the same task works in two languages

README

Sandbox MCP Logo

GitHub Actions Workflow Status GitHub Release GitHub commits since latest release GitHub License

Sandbox MCP is a Model Context Protocol (MCP) server that enables LLMs (MCP hosts/clients) to run code in secure, isolated Docker containers.

While LLMs are really good at generating code, most can't run the code they generate. You end up running this untested code directly on your machine, which could have drastic unintended consequences.

Giving LLMs the tools to test the code safely prevents such issues and helps you generate more accurate code in fewer iterations.

Sandbox MCP gives the LLMs an easy-to-use execution environment that anyone can create and configure through a simple, AI-native MCP server that runs locally.

Inspired by Codapi. Some sandboxes are the same as Codapi sandboxes.

Use Cases

Sandbox MCP can be used for many different tasks, including but not limited to:

  • Secure code execution: Run any code generated by an LLM in a secure, isolated environment, protecting your system from untrusted or potentially harmful code.
  • Code testing: Automatically test and validate code in various languages and or configurations in various environments before integrating it into larger projects or production systems.
  • User code validation: Safely execute and check user-submitted code or scripts, ensuring they behave as expected and do not perform malicious actions.
  • Network troubleshooting: Diagnose connectivity issues, test endpoints, and analyze network performance using isolated network tools, all without exposing your system.
  • Educational and interview coding: Instantly compile and run code snippets for learning, teaching, or technical interviews, providing immediate feedback in a safe, temporary environment.
  • Automated code review and feedback: Enable LLMs to execute, test, and review code automatically, offering actionable feedback or suggestions before code is merged or deployed.

Demo

This demo shows how Sandbox MCP works with Claude Desktop.

Sandbox MCP demo GIF

Try the video if the GIF isn't clear.

sandbox-mcp FAQ

Is it still being worked on?
The last change landed in May 2025, so it has been quiet for over a year. It is not archived and no replacement is named.
Is it really safe to let an assistant run code?
The protections here are actually wired in, not just advertised. Each run gets its own container with all special permissions removed, a memory cap, a limit on how many processes it can start, a 60-second time limit and, for the programming environments, no internet. The container is force-deleted afterwards. That said, this kind of isolation is not a perfect wall, so do not use it to run something you already suspect is malicious.
Can it read or change my own files?
No. Each run gets a fresh empty temporary folder, and only that folder is visible inside. Your documents are never handed over.
Do I need a key or account?
No. It is entirely local and free, with no sign-up of any kind.
What do I need installed first?
Docker, installed and running. You then install the program and build the eight environments once with a single command.
Which environments can reach the internet?
Only the network diagnostics one and the small web gateway. Note that the documentation claims the Go environment has internet access, but its actual settings switch networking off.
How many tools does it add?
Eight, one per environment.
Can I use this to test my own idea in a language not listed?
Yes. You can add your own environment by dropping a container recipe and a short settings file into its config folder.
Can I use it at work?
Yes. It is MIT licensed, which permits commercial use.