MCP.so
登录

MCP Sandbox

@JohanLi233

基本信息

分类

推理

许可证

Apache-2.0

传输方式

stdio

作者

JohanLi233

关于 MCP Sandbox

Python sandboxes for llms

MCP Sandbox 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "mcp-sandbox": {
      "command": "uv",
      "args": [
        "venv"
      ]
    }
  }
}

MCP Sandbox 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is MCP Sandbox?

MCP Sandbox is a Python MCP server that enables users and LLMs to safely execute Python code and install packages in isolated Docker containers. It is designed for developers who need a secure, interactive Python runtime accessible via the Model Context Protocol.

How to use MCP Sandbox?

Clone the repository, install dependencies using uv venv and uv sync, then start the server with uv run main.py. Configuration (host, port, PyPI mirror) can be customized in config.toml. The default SSE endpoint is http://127.0.0.1:8181/sse. For Claude Desktop, configure via supergateway pointing to the SSE URL, optionally including an API key if authentication is enabled.

Key features of MCP Sandbox

  • Docker isolation for secure code execution
  • Package management with custom PyPI mirrors
  • File generation with web link access
  • Optional API key authentication
  • Built-in web UI for managing sandboxes
  • SSE support for real-time MCP integration

Use cases of MCP Sandbox

  • Running untrusted Python code in a secure sandbox
  • Installing and testing Python packages interactively
  • Generating visualizations (e.g., matplotlib plots) and saving them as files
  • Creating data files (CSV, Excel) accessible via HTTP links
  • Providing a safe Python runtime for LLM agents to execute code

常见问题

1

What dependencies does MCP Sandbox require?

Python 3.12+, the uv package manager, and Docker.

2

How does MCP Sandbox communicate with clients?

It uses Server-Sent Events (SSE) for real-time communication; the default endpoint is `http://127.0.0.1:8181/sse`.

3

Where is executed code data stored?

Code runs in isolated Docker containers; generated files are stored in the `results/` directory and made accessible via direct HTTP links.

4

Is authentication supported?

Yes, optional API key-based authentication can be enabled for multi-user environments.

5

What tools does MCP Sandbox provide?

Tools include `create_sandbox`, `list_sandboxes`, `execute_python_code`, `install_package_in_sandbox`, `check_package_installation_status`, `execute_terminal_command`, and `upload_file_to_sandbox`.

评论

推理 分类下的更多 MCP 服务器