Code MCP Server

MCP server for E2B code sandbox - Execute code and commands in secure E2B sandboxes

Local serverstdioPython

What is the Code MCP Server?

MCP server for E2B code sandbox - Execute code and commands in secure E2B sandboxes

What you get

MCP (Model Context Protocol) server for E2B code sandbox. This server provides tools to create, manage, and execute code in secure E2B sandboxes.

  • Create Sandbox — Create new E2B sandboxes with customizable timeout and template
  • Kill Sandbox — Terminate existing sandboxes by ID
  • Run Code — Execute Python code in sandboxes using Jupyter Notebook syntax
  • Run Command — Execute shell commands in sandboxes

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

How to install the Code MCP Server

{
  "mcpServers": {
    "code-sandbox-mcp": {
      "command": "uv",
      "args": ["run", "code-sandbox-mcp"],
      "env": {
        "E2B_API_KEY": "your_api_key_here",
        "E2B_DOMAIN": "your_domain_here"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
E2B_API_KEYCredential the server authenticates with.Yes
E2B_DOMAINConfiguration value read at startup.Optional

Example prompts to try

  • “Use Code to Configuration.”

Frequently asked questions

MCP server for E2B code sandbox - Execute code and commands in secure E2B sandboxes Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.