一个基于Docker容器的安全沙盒环境,用于在AI应用程序中执行代码。此MCP服务器借助容器化技术,提供安全且隔离的环境,保障代码运行时的安全性。
代码沙盒MCP是一个基于Docker容器的安全沙盒环境,可用于在AI应用程序中执行代码。你可以按照以下步骤快速安装和使用它。
curl -fsSL https://raw.githubusercontent.com/Automata-Labs/code-sandbox-mcp/main/install.sh | bash
iwr https://raw.githubusercontent.com/Automata-Labs/code-sandbox-mcp/main/install.ps1 -UseBasicParsing | invoke-Expression
将code-sandbox-mcp可执行文件下载到目标目录,并确保其具有可执行权限(对于Unix系统)。
code-sandbox-mcp initialize --config ./config.json
code-sandbox-mcp start --bind 0.0.0.0:8080
code-sandbox-mcp stop
code-sandbox-mcp ps
安装程序会自动创建配置文件。如需手动配置,请参考以下示例:
// ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"code-sandbox-mcp": {
"command": "/path/to/code-sandbox-mcp",
"args": [],
"env": {}
}
}
}
// ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"code-sandbox-mcp": {
"command": "/path/to/code-sandbox-mcp",
"args": [],
"env": {}
}
}
}
// %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"code-sandbox-mcp": {
"command": "C:\\path\\to\\code-sandbox-mcp.exe",
"args": [],
"env": {}
}
}
}
对于支持MCP服务器的其他AI应用程序,只需将其代码执行后端设置为code-sandbox-mcp即可。
如需本地构建项目或参与开发,请参阅DEVELOPMENT.md。
本项目采用MIT License协议。详细信息请参考LICENSE文件。