MCP Directory

E2B Code Interpreter MCP

Official

Run model-generated code in a secure, isolated E2B cloud sandbox.

Verified
stdio (local)
API key
TypeScript

Add to your client

Copy the config for your MCP client and paste it into its config file.

Install / run
npx -y @e2b/mcp-server

Paste into ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "e2b-code-interpreter-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@e2b/mcp-server"
      ],
      "env": {
        "E2B_API_KEY": "<your-e2b-api-key>"
      }
    }
  }
}

Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf

Before you start

  • Node.js with npx available (the server is launched via npx -y @e2b/mcp-server)
  • An E2B account and API key from e2b.dev (set via the E2B_API_KEY environment variable)
  • An MCP client such as Claude Desktop (config in claude_desktop_config.json)

About E2B Code Interpreter MCP

The E2B MCP Server gives an LLM the ability to execute model-generated code inside a secure, isolated E2B cloud sandbox via the Model Context Protocol. It exposes a single run_code tool that runs Python in an ephemeral E2B Sandbox and returns the output, so the assistant can do real computation, data analysis, and scripting instead of just describing code.

It is published as @e2b/mcp-server and runs locally over stdio (typically launched with npx by Claude Desktop). The repo ships both JavaScript and Python editions of the server, and it can also be installed via Smithery.

Important: this standalone MCP server repository is archived and no longer actively maintained. E2B's current, supported guidance for connecting agents to sandboxes lives in their MCP docs and SDKs (e2b.dev/docs/mcp); use this package mainly for quick local experiments or as a reference implementation.

Tools & capabilities (1)

run_code

Run Python code in a secure, isolated E2B cloud sandbox and return the result/output.

When to use it

  • Use it when you want the assistant to actually execute generated code rather than just print it.
  • Use it when you need a throwaway, isolated environment to run untrusted or experimental code.
  • Use it when doing quick data crunching, calculations, or plotting from a chat.
  • Use it when prototyping a code-interpreter style workflow in Claude Desktop.
  • Use it when you want code execution kept off your local machine for safety.

Quick setup

  1. 1Sign up at e2b.dev and copy your E2B API key.
  2. 2Open your Claude Desktop config (claude_desktop_config.json) on macOS or Windows.
  3. 3Add an mcpServers entry with command npx, args ["-y", "@e2b/mcp-server"], and env E2B_API_KEY set to your key.
  4. 4Restart Claude Desktop.
  5. 5Verify by asking the assistant to run a small snippet of Python and confirm the sandbox returns output.

Security notes

Code runs in E2B's remote sandbox rather than locally, which limits host exposure, but the E2B_API_KEY bills against your account and sandboxes can make outbound network calls. Keep the key secret and watch usage.

E2B Code Interpreter MCP FAQ

What language does run_code execute?

It runs Python inside the E2B Sandbox and returns the output, even though the package itself ships JavaScript and Python server editions.

Where do I get the API key?

Sign up at e2b.dev and create an API key, then set it as the E2B_API_KEY environment variable in your MCP client config.

Is this project maintained?

No. The mcp-server repository is archived and no longer actively maintained; refer to E2B's current MCP docs at e2b.dev/docs/mcp for supported integrations.

How is this safer than running code locally?

Code executes in an isolated, ephemeral E2B cloud sandbox rather than on your own machine, so it cannot touch your local filesystem or environment.

Can I install it without editing JSON by hand?

Yes. It can be installed via Smithery with npx @smithery/cli install e2b --client claude.

Alternatives to E2B Code Interpreter MCP

Compare all alternatives →

Microsoft's official browser-automation MCP using Playwright's accessibility tree (no vision model).

Featured
Verified
stdio (local)
No auth
TypeScript
12 tools
Updated 9 days agoRepo

Up-to-date, version-specific library documentation injected into your coding agent.

Verified
stdio (local)
API key
TypeScript
2 tools
Updated 13 days agoRepo

LSP-powered coding agent toolkit: semantic symbol search, references and structural edits.

Verified
stdio (local)
No auth
Python
11 tools
Updated 11 days agoRepo