
How to add E2B Code Interpreter MCP to Cursor
Run model-generated code in a secure, isolated E2B cloud sandbox. Paste the config into ~/.cursor/mcp.json and restart Cursor.
Last updated June 15, 2026 · 400★ · stdio · apikey · official
Cursor 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 Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
- 2Paste the E2B Code Interpreter MCP config below into the "mcpServers" object.
- 3Fill in placeholder secrets, then save.
- 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
- 5Ask Cursor to use one of E2B Code Interpreter MCP's tools to confirm it's connected.
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 Cursor
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 + Cursor FAQ
Where is the Cursor config file?
Cursor reads MCP servers from ~/.cursor/mcp.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 Cursor?
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.