E2B MCP Server for Claude Code Execution
Enable Claude to run and test code via E2B using an MCP server for secure, low-latency model-driven code execution and context management.
npx -y @e2b-dev/mcp-serverOverview
The E2B MCP Server implements a Model Context Protocol (MCP) backend that lets Claude (Anthropic models) drive secure, low-latency code execution and context management through the E2B Sandbox. By running a lightweight MCP-compatible server next to your Claude client (for example, Claude Desktop), you can expose safe, auditable code-interpreter capabilities to the model: run snippets, execute tests, collect artifacts and logs, and feed execution context back into the LLM session.
This server is designed for developer workflows where tight feedback loops and privacy matter—local or private-cloud deployments keep code and data inside your environment while giving the model supervised access to execute and inspect runtime state. The project ships in two editions (JavaScript and Python) so you can choose the runtime that best fits your infra and tooling.
Features
- MCP-compatible server to enable model-driven code execution and context management
- Two editions: JavaScript and Python (separate packages)
- Sandboxed code execution via E2B Sandbox integration (isolated file system, artifact capture)
- Low-latency local/edge deployment for responsive model interactions
- Integration-friendly: can be installed via Smithery for Claude Desktop or integrated directly into tooling
- Audit trails: execution logs and artifacts available for model and developer inspection
- Designed for secure, private deployments (local host, VPCs, or private containers)
Editions
| Edition | Language | Location |
|---|---|---|
| JavaScript | Node.js | packages/js |
| Python | CPython | packages/python |
Each edition contains implementation details and run scripts suited for that runtime. See each package README for edition-specific configuration and runtime flags.
Installation / Configuration
Prerequisites: Git, Node.js (for JS edition) or Python 3.8+ (for Python edition), and a working shell.
- Clone the repository
- Quick start — JavaScript edition
# Start with the package start script. Optionally pass --port.
- Quick start — Python edition
# Run the server using the package-provided entrypoint (see packages/python/README.md)
- Install for Claude Desktop automatically (Smithery)
Configuration notes
- The server accepts configuration via environment variables and CLI flags. Typical