Skip to content
E2B

E2BMCP Server

by E2B
Added to Onei
6 views
v0.2.3

Summary

Run AI-generated code safely in an isolated cloud sandbox, with results returned as data rather than text.

Features

  • Run code in an isolated cloud sandbox
  • Stateful sessions across multiple executions
  • Returns charts, tables, and files as structured results

Installation

Set up this MCP server in your favorite AI agent — copy a ready-made configuration below.

Any MCP-compatible agent

Most agents (Claude, Cursor, Windsurf, VS Code, and more) read a standard mcpServers configuration.

  1. Open your agent's MCP configuration file.
  2. Merge the snippet below into it, filling in the environment variables with your own values.
  3. Restart the agent — the "E2B" tools will be available.
{
  "mcpServers": {
    "e2b-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@e2b/mcp-server"
      ],
      "env": {
        "E2B_API_KEY": "your-api-key"
      }
    }
  }
}

Description

The E2B MCP server gives an assistant a real computer to run code on — isolated, disposable, and started in well under a second.

What it enables
  • Code execution in a sandboxed cloud VM with a Python runtime and internet access
  • Stateful sessions. Variables and imports persist between executions, so an assistant can build up an analysis step by step the way a person would in a notebook.
  • Rich results. Charts come back as images, DataFrames as structured tables — not as text descriptions of what the output would have looked like.
  • File handling for uploading data and retrieving generated artefacts
Why the isolation matters

Any assistant that writes code will eventually want to run it, and running model-generated code on your own machine is a category of risk not worth taking. The sandbox contains mistakes and prompt injection alike, and it is destroyed when the task ends.

Common uses

Data analysis over an uploaded file, verifying that generated code actually works before handing it over, mathematical computation, and any task where executing is more reliable than reasoning.

Requires an E2B API key; runs with npx @e2b/mcp-server. Free tier available.

Related MCP Servers

MCP: Headroom

by Headroom Labs

New

Context-compression MCP server that shrinks tool outputs, logs, files and RAG chunks before they reach the model, cutting 60-95% of tokens on JSON payloads.

MCP: Engram

by Gentleman Programming

New

Persistent memory for coding agents as a single Go binary — SQLite and FTS5 behind MCP, an HTTP API, a CLI and a TUI, with no Node, Python or Docker required.

MCP: agent-device

by Callstack

New

Give a coding agent a live feedback loop on real mobile, TV and desktop apps — inspect, tap, type and capture evidence on iOS, Android and HarmonyOS over MCP or a CLI.

Browse all MCP servers →