
sandbox-mcp
by pottekkat·★ 110·综合分 41
Sandbox MCP 通过 MCP 协议在隔离的 Docker 容器中实现安全代码执行。
概述
Sandbox MCP 是一个模型上下文协议服务器,允许 LLM 在隔离的 Docker 环境中安全执行代码。它提供了一个安全的沙箱环境,可以在不危及主机系统的情况下测试代码,支持多种编程语言和专用环境。项目积极维护各种预配置的沙箱,包括 Python、Rust、Go、JavaScript 和网络工具,使其具有很高的多功能性。
试试问 AI
装完之后,这里有 7 个你可以让 AI 做的事:
什么时候选它
当您需要安全地在隔离环境中执行 LLM 生成的代码,特别是用于测试或教育目的时,选择 Sandbox MCP。
什么时候不要选它
如果您需要执行需要持久存储或超出沙箱提供的网络访问权限的代码,或者您的环境中没有 Docker,请避免使用 Sandbox MCP。
此 server 暴露的工具
从 README 抽取出 8 个工具run_shellExecute commands in a secure, isolated Linux environment
run_pythonExecute Python code in a secure, isolated environment
run_rustCompile and run Rust code in an isolated environment
run_network_toolsUse various network utilities in an isolated Linux sandbox
run_goRun Go code securely in an isolated environment with network access
run_javascriptRun JavaScript code in an isolated environment using Node.js
run_apisixRun a lightweight instance of Apache APISIX with network access
run_javaCompile and run Java code in an isolated sandbox
说明:Inferred tool names from the 'Available Sandboxes' section. The README shows sandbox types but doesn't explicitly list MCP tool names. Each tool is named 'run_<language>' based on the sandbox names.
可对比工具
安装
安装
下载二进制文件
从 [发布页面](https://github.com/pottekkat/sandbox-mcp/releases) 下载适合您操作系统的二进制文件。
通过 Go 安装
go install github.com/pottekkat/sandbox-mcp/cmd/sandbox-mcp@latest从源代码构建
git clone https://github.com/pottekkat/sandbox-mcp.git
cd sandbox-mcp
make deps
make build配置
{
"mcpServers": {
"sandbox-mcp": {
"command": "path/to/sandbox-mcp",
"args": [
"--stdio"
]
}
}
}FAQ
- 支持哪些编程语言?
- Sandbox MCP 支持 Python、Rust、Go、JavaScript、Java 和 shell 环境,以及网络工具。您也可以创建自定义沙箱。
- 代码执行有多安全?
- 代码在不会影响您主机的隔离 Docker 容器中运行。每个沙箱都专门为其目的进行配置。
- 是否需要安装 Docker?
- 是的,运行沙箱容器需要 Docker。在使用 Sandbox MCP 之前,请确保已安装并运行 Docker。
sandbox-mcp 对比
最后更新于 · 由 README + GitHub 公开数据自动生成。