E2

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.

Quick Install
npx -y @e2b-dev/mcp-server

Overview

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

EditionLanguageLocation
JavaScriptNode.jspackages/js
PythonCPythonpackages/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.

  1. Clone the repository
git clone https://github.com/e2b-dev/mcp-server.git
cd mcp-server
  1. Quick start — JavaScript edition
cd packages/js
npm install
# Start with the package start script. Optionally pass --port.
npm run start -- --port=3000
  1. Quick start — Python edition
cd packages/python
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
# Run the server using the package-provided entrypoint (see packages/python/README.md)
python -m e2b_mcp_server --port 3000
  1. Install for Claude Desktop automatically (Smithery)
npx @smithery/cli install e2b --client claude

Configuration notes

  • The server accepts configuration via environment variables and CLI flags. Typical