Code Sandbox MCP Server

AI Security Code Execution Containers

Contact us to host your MCP Server in FlowHunt

What does “Code Sandbox” MCP Server do?

The Code Sandbox MCP (Model Context Protocol) Server is a specialized tool designed to provide AI assistants and applications with a secure, isolated environment for executing code. Using Docker containerization, it enables safe code execution by managing flexible, disposable containers that run user or AI-generated code. This sandboxed approach ensures high security, preventing code from affecting the host system or leaking sensitive data. The server facilitates various development workflows, including running shell commands, transferring files, and streaming logs, all inside custom or user-chosen Docker images. By exposing these capabilities through the MCP protocol, Code Sandbox MCP helps AI developers automate, test, and manage code securely and efficiently, unlocking advanced capabilities for AI-powered agents and developer tools.

List of Prompts

No prompt templates are explicitly mentioned in the repository or documentation.

FlowHunt Logo

Ready to grow your business?

Start your free trial today and see results within days.

List of Resources

No explicit MCP resources are described in the repository or documentation.

List of Tools

  • Flexible Container Management: Allows the creation and management of isolated Docker containers for executing code securely.
  • Custom Environment Support: Enables the use of any Docker image as the execution environment, tailoring the sandbox to specific language or project needs.
  • File Operations: Facilitates easy file and directory transfer between the host system and containers, allowing context sharing and persistent storage.
  • Command Execution: Supports running arbitrary shell commands within the containerized environment, useful for compiling, testing, or running scripts.
  • Real-time Logging: Streams container logs and command output as they happen, providing immediate feedback and debugging information.

Use Cases of this MCP Server

  • Secure Code Execution: Run untrusted or user-submitted code in a sandboxed environment to prevent system compromise and data leaks.
  • Automated Testing: Execute test suites, compile code, and check outputs in clean, disposable containers, ensuring reproducibility and isolation.
  • AI Agent Coding Tasks: Allow AI assistants to write, modify, and execute code securely as part of programming or code review tasks.
  • Education and Experimentation: Provide students or users with safe environments to experiment with code without risk to shared infrastructure.
  • Continuous Integration Pipelines: Integrate with CI systems to run build or deployment steps in secure containers managed by the MCP server.

How to set it up

Windsurf

  1. Ensure Docker is installed and running on your system.
  2. Locate your Windsurf configuration file (typically ~/.windsurf/config.json).
  3. Add the Code Sandbox MCP Server to the mcpServers section:
    {
      "mcpServers": {
        "code-sandbox": {
          "command": "npx",
          "args": ["@Automata-Labs-team/code-sandbox-mcp@latest"]
        }
      }
    }
    
  4. Save the configuration file and restart Windsurf.
  5. Verify the server is running and accessible via the Windsurf dashboard.

Securing API Keys

Use environment variables to store sensitive keys:

{
  "mcpServers": {
    "code-sandbox": {
      "command": "npx",
      "args": ["@Automata-Labs-team/code-sandbox-mcp@latest"],
      "env": {
        "API_KEY": "${API_KEY}"
      },
      "inputs": {
        "apiKey": "${API_KEY}"
      }
    }
  }
}

Claude

  1. Verify Docker is running.
  2. Open the Claude configuration file.
  3. Add the server as follows:
    {
      "mcpServers": {
        "code-sandbox": {
          "command": "npx",
          "args": ["@Automata-Labs-team/code-sandbox-mcp@latest"]
        }
      }
    }
    
  4. Restart Claude and confirm the integration.

Cursor

  1. Make sure Docker is operational.
  2. Edit the Cursor configuration file.
  3. Insert the MCP server configuration:
    {
      "mcpServers": {
        "code-sandbox": {
          "command": "npx",
          "args": ["@Automata-Labs-team/code-sandbox-mcp@latest"]
        }
      }
    }
    
  4. Save changes and restart Cursor.

Cline

  1. Confirm Docker is installed and running.
  2. Find the Cline configuration file.
  3. Add the MCP server entry:
    {
      "mcpServers": {
        "code-sandbox": {
          "command": "npx",
          "args": ["@Automata-Labs-team/code-sandbox-mcp@latest"]
        }
      }
    }
    
  4. Save and restart Cline to apply changes.

Note: Always use environment variables to manage sensitive configuration items like API keys. See the example above for how to set env and inputs in your configuration.

How to use this MCP inside flows

Using MCP in FlowHunt

To integrate MCP servers into your FlowHunt workflow, start by adding the MCP component to your flow and connecting it to your AI agent:

FlowHunt MCP flow

Click on the MCP component to open the configuration panel. In the system MCP configuration section, insert your MCP server details using this JSON format:

{
  "code-sandbox": {
    "transport": "streamable_http",
    "url": "https://yourmcpserver.example/pathtothemcp/url"
  }
}

Once configured, the AI agent is now able to use this MCP as a tool with access to all its functions and capabilities. Remember to change “code-sandbox” to whatever the actual name of your MCP server is and replace the URL with your own MCP server URL.


Overview

SectionAvailabilityDetails/Notes
Overview
List of PromptsNo prompt templates found
List of ResourcesNo explicit MCP resources found
List of ToolsContainer management, file ops, command exec, logging, etc.
Securing API KeysProvided example for using env vars in JSON config
Sampling Support (less important in evaluation)No mention of sampling support

Our opinion

This MCP server provides robust, essential functionality for secure code execution using containerization, and offers practical setup instructions. However, it lacks explicit documentation for MCP prompt templates and resource primitives, which limits its direct plug-and-play usability in some MCP contexts. The presence of a clear license, active development, and a good number of stars/forks increases its reliability. Roots and sampling are not mentioned or supported.

Rating: 7/10. Excellent for secure code execution and developer workflows, but would benefit from richer MCP-native documentation and resource/prompt definitions.

MCP Score

Has a LICENSE✅ (MIT)
Has at least one tool
Number of Forks29
Number of Stars203

Frequently asked questions

Try Code Sandbox MCP Server on FlowHunt

Experience safe, flexible, and automated code execution with FlowHunt’s Code Sandbox MCP Server. Perfect for AI agents, developers, and educational environments.

Learn more

Code Sandbox MCP
Code Sandbox MCP

Code Sandbox MCP

Integrate FlowHunt with Code Sandbox MCP to securely execute code in isolated Docker containers, manage development environments, and power AI-driven automation...

4 min read
AI Code Sandbox +4
MCP Code Executor MCP Server
MCP Code Executor MCP Server

MCP Code Executor MCP Server

The MCP Code Executor MCP Server enables FlowHunt and other LLM-driven tools to securely execute Python code in isolated environments, manage dependencies, and ...

5 min read
AI MCP +5
E2B MCP Server
E2B MCP Server

E2B MCP Server

The E2B MCP Server empowers AI assistants like Claude to securely execute code in isolated sandboxes, automate developer workflows, and enable dynamic real-worl...

4 min read
AI MCP Server +5