a year ago
research-and-dataA MCP server that enables LLMs to run python code safely in isolated Docker containers.
Overview
what is Python Sandbox MCP Server?
Python Sandbox MCP Server is a secure execution environment that allows large language models (LLMs) to run Python code safely within isolated Docker containers.
how to use Python Sandbox MCP Server?
To use the server, clone the repository, install the necessary dependencies, build the Snekbox container, and configure the MCP server to point to your local build.
key features of Python Sandbox MCP Server?
- Secure execution of Python code with stdout capture
- Support for Matplotlib plotting and PNG image generation
- Real-time communication using Server-Sent Events (SSE)
- Isolated execution environment via Snekbox Docker container
use cases of Python Sandbox MCP Server?
- Running Python scripts in a secure environment for LLMs.
- Generating plots and visualizations from Python code.
- Enabling real-time data processing and communication in applications.
FAQ from Python Sandbox MCP Server?
- Is the Python Sandbox MCP Server secure?
Yes! It uses Docker containers to isolate the execution environment, ensuring security.
- Can I customize the Python environment?
Yes! You can install additional Python packages as needed within the Snekbox container.
- How do I configure the server?
Configuration can be done through environment variables or by modifying the Config class.
Server Config
{
"mcpServers": {
"python-sandbox-sse": {
"command": "mcp-proxy",
"args": [
"http://localhost:8060/eval"
],
"ssePath": "/eval"
}
}
}