A MCP server that enables LLMs to run python code safely in isolated Docker containers.
A MCP server that enables LLMs to run python code safely in isolated Docker containers. That is what the python sandbox mcp server brings to an AI assistant: the same capability, reachable through the Model Context Protocol rather than a separate app or dashboard.
The server publishes 4 tools. What each one is for:
Real — time communication using Server-Sent Events (SSE)MCP_SERVER_NAME — Server identifier (default: "python-sandbox-mcp-sse")SNEKBOX_URL — Snekbox API endpoint (default: "http://localhost:8060/eval")TEMP_DIR — Directory for temporary files storageThe server ships on a container image as ghcr.io/python-discord/snekbox, so your MCP client can launch it on demand — there is no separate build step. Add the server block to your client's configuration, restart it, and the tools register themselves.
Configuration is passed through the environment: SNEKBOX_URL. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.
Among the file and storage access options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Python Sandbox's toolset — Real, MCP_SERVER_NAME, SNEKBOX_URL and 1 more — is a fair guide to whether it matches your workflow. It is maintained by cloudywu0410; worth a glance at recent repository activity before you build anything load-bearing on it.
This entry was verified against Python Sandbox's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.
| Tool | What it does |
|---|---|
| Real | time communication using Server-Sent Events (SSE) |
| MCP_SERVER_NAME | Server identifier (default: "python-sandbox-mcp-sse") |
| SNEKBOX_URL | Snekbox API endpoint (default: "http://localhost:8060/eval") |
| TEMP_DIR | Directory for temporary files storage |
{
"mcpServers": {
"python-sandbox": {
"command": "docker",
"args": ["run", "-i", "--rm", "ghcr.io/python-discord/snekbox"],
"env": {
"SNEKBOX_URL": "your-value"
}
}
}
}Add to claude_desktop_config.json, then restart Claude Desktop.
| Variable | Description | Required |
|---|---|---|
| SNEKBOX_URL | Endpoint or connection string the server talks to. | Yes |
Scoped local file access — read, write, search and reorganise files in directories you explicitly allow.
Search and read your Drive — Docs, Sheets and files become context your assistant can actually use.
Query, modify and analyse local SQLite databases in conversation — the fastest way to chat with a data file.
Build a programmable telecommunications stack for connecting telephony services with the Internet via a cloud-based utility.
Chat with your second brain — search, read and write vault notes through the Local REST API.
Connects AI models to an Obsidian knowledge base for direct access and manipulation of notes and folders.