drio
Open app

Code Sandbox MCP 🐳

Source

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.

Catalog onlyCatalog onlySTDIO

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 run your code snippets or projects in isolated Docker containers using the available tools.

  • Multi-language support for Python, Go, and Node.js. - Built-in TypeScript support. - Automatic dependency management for various programming languages. - Flexible execution options for both single-file code and full projects. - Real-time output streaming from container logs.
  1. Running isolated code snippets for testing and debugging.
  2. Executing full projects in a secure environment.
  3. Supporting AI applications that require safe code execution.

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-insecurepla": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-code-sandbox-mcp-insecurepla"
      ]
    }
  }
}

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-insecurepla": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-code-sandbox-mcp-insecurepla"
      ]
    }
  }
}

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-insecurepla": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-code-sandbox-mcp-insecurepla"
      ]
    }
  }
}

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-insecurepla": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-code-sandbox-mcp-insecurepla"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "code-sandbox-mcp-insecurepla": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-code-sandbox-mcp-insecurepla"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "code-sandbox-mcp-insecurepla": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-code-sandbox-mcp-insecurepla"
      ]
    }
  }
}

FAQ

**What languages does Code Sandbox MCP support?**

It supports Python, Go, and Node.js.

**Is Docker required to use Code Sandbox MCP?**

Yes, Docker must be installed and running to use this tool.

**Can I run long-running services?**

Yes, Code Sandbox MCP allows running long-running services in the background.