Integrations
Securely runs Python code in isolated Docker containers for safe execution of user and LLM-provided code.
References GitHub for repository access and project management, including compatibility with mission-control-link.
Supports installation and usage of NumPy for scientific computing within the sandbox environments.
MCP Sandbox
Feel free to try on mcp sandbox
中文文档 | English
Demo
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.
Features
- 🐳 Docker Isolation: Securely run Python code in isolated Docker containers
- 📦 Package Management: Easily install and manage Python packages
- 📊 File Generation: Support for generating files and accessing them via web links
Installation
The default SSE endpoint is http://localhost:8000/sse, and you can interact with it via the MCP Inspector through SSE or any other client that supports SSE connections.
Available Tools
- create_sandbox: Creates a new Python Docker sandbox and returns its ID for subsequent code execution and package installation
- list_sandboxes: Lists all existing sandboxes (Docker containers) for reuse
- execute_python_code: Executes Python code in a specified Docker sandbox
- install_package_in_sandbox: Installs Python packages in a specified Docker sandbox
- check_package_installation_status: Checks if a package is installed or installation status in a Docker sandbox
- execute_terminal_command: Executes a terminal command in the specified Docker sandbox. Parameters:
sandbox_id
(string),command
(string). Returnsstdout
,stderr
,exit_code
. - upload_file_to_sandbox: Uploads a local file to the specified Docker sandbox. Parameters:
sandbox_id
(string),local_file_path
(string),dest_path
(string, optional, default:/app/results
).
Project Structure
Example Prompt
MCP Example Config
Below is an example config for claude:
MCP Example Config for Online Demo
Modify the serverUrl
as needed for your environment.
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
An interactive Python code execution tool that allows users and LLMs to safely execute Python code and install packages in isolated Docker containers.
Related MCP Servers
- -securityFlicense-qualityProvides isolated Docker environments for code execution, enabling users to create and manage containers, execute multi-language code, save and reproduce development environments, ensuring security and isolation.Last updated -6Python
- -securityAlicense-qualityAn MCP server to create secure code sandbox environment for executing code within Docker containers.Last updated -69GoMIT License
- AsecurityAlicenseAqualityAllows LLMs to execute Python code in a specified Conda environment, enabling access to necessary libraries and dependencies for efficient code execution.Last updated -129JavaScriptMIT License
- -securityAlicense-qualityFacilitates isolated code execution within Docker containers, enabling secure multi-language script execution and integration with language models like Claude via the Model Context Protocol.Last updated -PythonMIT License