
How to add E2B Code Interpreter MCP to Claude Desktop
Run model-generated code in a secure, isolated E2B cloud sandbox. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.
Last updated June 15, 2026 ยท 400โ ยท stdio ยท apikey ยท official
Claude Desktop config for E2B Code Interpreter MCP
npx -y @e2b/mcp-server{
"mcpServers": {
"e2b-code-interpreter-mcp": {
"command": "npx",
"args": [
"-y",
"@e2b/mcp-server"
],
"env": {
"E2B_API_KEY": "<your-e2b-api-key>"
}
}
}
}Setup steps
- 1Open Claude Desktop โ Settings โ Developer โ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
- 2Paste the E2B Code Interpreter MCP config below under the top-level "mcpServers" key.
- 3Fill in any placeholder secrets (API keys, paths) in the snippet.
- 4Save the file, then fully quit and reopen Claude Desktop.
- 5Open a chat and confirm E2B Code Interpreter MCP's tools appear under the ๐ tools menu.
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)
What E2B Code Interpreter MCP can do in Claude Desktop
run_codeRun Python code in a secure, isolated E2B cloud sandbox and return the result/output.
Security
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 + Claude Desktop FAQ
Where is the Claude Desktop config file?
Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the E2B Code Interpreter MCP config there under the "mcpServers" key and restart the client.
Is E2B Code Interpreter MCP safe to use with Claude Desktop?
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.
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.