Python MCP Sandbox MCP Server

Python MCP Sandbox is an interactive Python code execution tool that allows users and LLMs to safely execute Python code and install packages in

Local serverstdioPython

What is the Python MCP Sandbox MCP server?

Python MCP Sandbox MCP server exists for a simple reason — assistants are far more useful when they can act on Python MCP Sandbox directly instead of describing what you should do. Python MCP Sandbox is an interactive Python code execution tool that allows users and LLMs to safely execute Python code and install packages in isolated Docker containers.

What you get

  • 🐳 Docker Isolation: Securely run Python code in isolated Docker containers
  • 📦 Package Management: Easily install and manage Python packages with support for custom PyPI mirrors
  • 📊 File Generation: Support for generating files and accessing them via web links
  • 🔐 Authentication: Optional API key-based authentication for multi-user environments
  • 🎨 Web UI: Built-in web interface for managing sandboxes and viewing execution results
  • 🌐 SSE Support: Real-time communication via Server-Sent Events for MCP integration

Setting it up

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

Configuration and credentials

You will need one environment variable: YOUR_API_KEY. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.

Before you rely on it

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • MCP clients confirm each tool call by default. Leave that on until you have watched what the python mcp sandbox mcp server does with a few real requests.

Choosing this one

This sits in the cloud and infrastructure group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. It is maintained by JohanLi233; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Python MCP Sandbox's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

How to install the Python MCP Sandbox MCP server

## MCP Example Config for Online Demo
```json
{
  "mcpServers": {
    "mcpSandbox": {
      "command": "npx",
      "args": ["-y", "supergateway", "--sse",  "http://115.190.87.78/sse?api_key=<API_KEY>"]
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
YOUR_API_KEYCredential the server authenticates with.Yes

Frequently asked questions

It connects Python MCP Sandbox to MCP-compatible AI assistants such as Claude and Cursor. Instead of copying data back and forth by hand, the assistant works with Python MCP Sandbox directly.