Code Sandbox MCP 🐳
An MCP server to create secure code sandbox environment for executing code within Docker containers. This MCP server provides AI applications with a safe and isolated environment for running code while maintaining security through containerization.
Overview
Code Sandbox MCP is a secure server designed to create isolated code sandbox environments for executing code within Docker containers, ensuring safety and security for AI applications.
To use Code Sandbox MCP, install it via the provided installation scripts for your operating system, and then execute code snippets or projects in isolated Docker containers using the available tools.
- Multi-language support for Python, Go, and Node.js. - Automatic dependency management for projects. - Real-time output streaming from container logs. - Background mode for long-running services. - Custom entrypoints for executing both single-file code and full projects.
- Running isolated code snippets for testing and debugging.
- Executing full projects in a secure environment.
- Supporting AI applications that require code execution without compromising security.
Add to your AI client
Use these steps to connect Code Sandbox MCP 🐳 in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"code-sandbox-mcp-nervouslimit": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-code-sandbox-mcp-nervouslimit"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"code-sandbox-mcp-nervouslimit": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-code-sandbox-mcp-nervouslimit"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"code-sandbox-mcp-nervouslimit": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-code-sandbox-mcp-nervouslimit"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"code-sandbox-mcp-nervouslimit": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-code-sandbox-mcp-nervouslimit"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"code-sandbox-mcp-nervouslimit": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-code-sandbox-mcp-nervouslimit"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"code-sandbox-mcp-nervouslimit": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-code-sandbox-mcp-nervouslimit"
]
}
}
}FAQ
**What languages does Code Sandbox MCP support?**
It supports Python, Go, and Node.js.
**Is Code Sandbox MCP free to use?**
Yes, it is open-source and free to use.
**How does Code Sandbox MCP ensure security?**
It uses Docker containers to isolate execution environments, limiting resource access and ensuring clean execution.