python-sandbox-mcp-server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@python-sandbox-mcp-serverplot a sine wave with matplotlib"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Python Sandbox MCP Server
A secure Python code execution server that enables LLMs to run Python code safely in isolated Docker containers. The server supports:
Regular Python code execution with stdout capture
Matplotlib plotting with PNG image generation
Secure sandboxing via Snekbox Docker container
Real-time communication using Server-Sent Events (SSE)
Development
To get started with development, follow these steps:
Step 1: Clone the Repository
Fork and clone the repository:
git clone https://github.com/username/python_sandbox_mcp_server.gitNavigate into the project directory:
cd python_sandbox_mcp_serverStep 2: Install Dependencies
Install the required dependencies:
uv add -r requirements.txtStep 3: Build the Python Sandbox
Pull the Snekbox Container Image:
docker pull ghcr.io/python-discord/snekbox:latestStart the Container with Security Parameters:
docker run -d --ipc=none --privileged -p 8060:8060 ghcr.io/python-discord/snekboxInstall Additional Dependencies (Optional):
If additional Python packages are required, you can install them as follows:
docker exec <container_id> /bin/sh -c \
'PYTHONUSERBASE=/snekbox/user_base /snekbox/python/default/bin/python -m pip install --user <package_name>'Replace with the ID of your running Snekbox container and with the desired package.
Step 4: Update MCP Server Configuration
Update your MCP server configuration to point to the local build:
{
"mcpServers": {
"python-sandbox-sse": {
"command": "mcp-proxy",
"args": [
"http://localhost:8060/eval"
],
"ssePath": "/eval"
}
}
}Related MCP server: Python MCP Sandbox
Configuration
The server can be configured through the following environment variables or by modifying the Config class:
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
License
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityFmaintenanceA Pyodide server for executing Python code by Large Language Models (LLMs) via the Model Context Protocol (MCP).Last updated51719MIT
- Alicense-qualityDmaintenanceAn interactive Python code execution environment that allows users and LLMs to safely execute Python code and install packages in isolated Docker containers.Last updated40Apache 2.0
- Alicense-qualityDmaintenanceAn interactive Python code execution tool that allows users and LLMs to safely execute Python code and install packages in isolated Docker containers.Last updated40Apache 2.0
- Flicense-quality-maintenanceA secure server that enables code execution in isolated Docker environments, supporting Python with strict security constraints including network isolation, limited filesystem access, and resource limitations.Last updated
Related MCP Connectors
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
Hosted MCP server for LLM cost estimation, model comparison, and budget-aware routing.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cloudywu0410/python_sandbox_mcp_server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server