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 沙盒
欢迎在mcp 沙盒上尝试
中文文档| English
演示
Python MCP Sandbox 是一个交互式 Python 代码执行工具,允许用户和 LLM 安全地执行 Python 代码并在隔离的 Docker 容器中安装程序包。
特征
- 🐳 Docker 隔离:在隔离的 Docker 容器中安全地运行 Python 代码
- 📦软件包管理:轻松安装和管理 Python 软件包
- 📊文件生成:支持生成文件并通过网络链接访问
安装
默认的 SSE 端点是http://localhost:8000/sse ,您可以通过 SSE 或任何其他支持 SSE 连接的客户端通过 MCP Inspector 与其进行交互。
可用工具
- create_sandbox :创建一个新的 Python Docker 沙盒并返回其 ID,用于后续代码执行和包安装
- list_sandboxes :列出所有现有沙盒(Docker 容器)以供重复使用
- execute_python_code :在指定的 Docker 沙箱中执行 Python 代码
- install_package_in_sandbox :在指定的 Docker 沙箱中安装 Python 包
- check_package_installation_status :检查 Docker 沙箱中软件包是否已安装或安装状态
- execute_terminal_command :在指定的 Docker 沙盒中执行终端命令。参数:
sandbox_id
(字符串),command
(字符串)。返回stdout
、stderr
、exit_code
。 - upload_file_to_sandbox :将本地文件上传到指定的 Docker 沙盒。参数:
sandbox_id
(字符串)、local_file_path
(字符串)、dest_path
(字符串,可选,默认值:/app/results
)。
项目结构
示例提示
MCP 示例配置
以下是 claude 的示例配置:
MCP 在线演示示例配置
根据您的环境需要修改serverUrl
。
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
一个交互式 Python 代码执行工具,允许用户和 LLM 安全地执行 Python 代码并在隔离的 Docker 容器中安装程序包。
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