
pottekkat/sandbox-mcp 是从 https://github.com/pottekkat/sandbox-mcp. 导入的 MCP 服务器候选
概览
pottekkat/sandbox-mcp 是从 https://github.com/pottekkat/sandbox-mcp. 导入的 MCP 服务器候选
概述(AI 翻译)
沙箱MCP是一种模型上下文协议(MCP)服务器,使LLM(MCP主机/客户端)能够在安全、隔离的Docker容器中运行代码。
虽然LLM在生成代码方面非常出色,但大多数无法运行它们生成的代码。你最终会直接在机器上运行这些未经测试的代码,这可能会带来严重的意想不到的后果。
为大型语言模型提供安全测试代码的工具,可以防止此类问题,帮助你在更少的迭代中生成更准确的代码。
沙盒MCP为LLM提供了一个易用的执行环境,任何人都可以通过本地运行的简单、AI原生的MCP服务器创建和配置。
Inspired由Codapi制作。有些沙盒和Codapi是一样的sandboxes.
使用场景
沙箱MCP可用于许多不同的任务,包括但不限于:
- 安全代码执行:在安全、隔离的环境中运行由LLM生成的任何代码,保护系统免受不可信或潜在有害代码的侵害。
- 代码测试:在集成到更大项目或生产系统之前,自动测试和验证不同语言和配置中的代码。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Sandbox MCP is a Model Context Protocol (MCP) server that enables LLMs (MCP hosts/clients) to run code in secure, isolated Docker containers.
While LLMs are really good at generating code, most can’t run the code they generate. You end up running this untested code directly on your machine, which could have drastic unintended consequences.
Giving LLMs the tools to test the code safely prevents such issues and helps you generate more accurate code in fewer iterations.
Sandbox MCP gives the LLMs an easy-to-use execution environment that anyone can create and configure through a simple, AI-native MCP server that runs locally.
Inspired by Codapi. Some sandboxes are the same as Codapi sandboxes.
Use Cases
Sandbox MCP can be used for many different tasks, including but not limited to:
- Secure code execution: Run any code generated by an LLM in a secure, isolated environment, protecting your system from untrusted or potentially harmful code.
- Code testing: Automatically test and validate code in various languages and or configurations in various environments before integrating it into larger projects or production systems.
- User code validation: Safely execute and check user-submitted code or scripts, ensuring they behave as expected and do not perform malicious actions.
- Network troubleshooting: Diagnose connectivity issues, test endpoints, and analyze network performance using isolated network tools, all without exposing your system.
- Educational and interview coding: Instantly compile and run code snippets for learning, teaching, or technical interviews, providing immediate feedback in a safe, temporary environment.
- Automated code review and feedback: Enable LLMs to execute, test, and review code automatically, offering actionable feedback or suggestions before code is merged or deployed.
Demo
This demo shows how Sandbox MCP works with Claude Desktop.
Try the video if the GIF isn’t clear.
Installation
Download Binary
You can download the appropriate binary for your operating system (for example, Darwin) and processor architecture (arm64) from the Releases page (sandbox-mcp_Darwin_arm64.tar.gz).
Install via Go
Prerequisites:
- Go 1.24 or higher
go install github.com/pottekkat/sandbox-mcp/cmd/sandbox-mcp@latest
Get the path to the sandbox-mcp binary:
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"sandbox-mcp": {
"command": "path/to/sandbox-mcp",
"args": [
"--stdio"
]
}
}
}