Developer Tools

E2B MCP Server

Use Studio chat to drive this server — credentials stay in your workspace.

E2B provides cloud sandboxes for AI-generated code execution. Create, manage, pause, resume, and snapshot isolated virtual machines with full filesystem, process, and network access. Manage sandbox templates for reproducible environments.

12 tools
Agent guide included
API Key
Start Chatting

Opens MCPBundles Studio with this server selected. After sign-in, chat and run tools from the same thread.

Browse all tools

AI Skill
SKILL.md

Domain knowledge for E2B — workflow patterns, data models, and gotchas for your AI agent.

E2B

E2B provides cloud-based sandboxes (ephemeral virtual machines) for AI-generated code execution. This bundle manages sandbox lifecycle, templates, and snapshots through the platform REST API. Code execution inside sandboxes happens via the sandbox-side envd API (Connect RPC), not through these tools — these tools manage the infrastructure.

Entity Hierarchy

  • Templates define sandbox environments (OS, packages, config). Create sandboxes from templates.
  • Sandboxes are running VM instances created from a template. They have a lifecycle: running → paused → resumed → killed.
  • Snapshots capture a sandbox's state for later restoration. Created from running sandboxes.
  • Metrics track CPU, memory, and network usage per sandbox or per team.

CRUD Capabilities

Full CRUD (create, read, list, delete/kill):

  • Sandboxes — create from template, list with state/metadata filters, get details by ID, kill by ID.

Lifecycle operations (state transitions):

  • Pause — freeze a running sandbox (no billing while paused).
  • Resume — wake a paused sandbox and extend its timeout.
  • Timeout — set or extend the TTL (time-to-live) before auto-kill.

Create + Read:

  • Snapshots — capture sandbox state, list all snapshots.

Read + Delete:

  • Templates — list available templates, get template details, delete templates.

Read-only:

  • Logs — sandbox stdout/stderr with cursor pagination, level filtering, and text search.
  • Metrics — per-sandbox CPU/memory/network time series.

Workflows

Run ephemeral code: Create a sandbox from the default template (or a custom one). The sandbox gets an ID you can use to connect via SDK for code execution. Set timeout to auto-kill after your job finishes. Kill explicitly when done to avoid charges.

Pause/resume long-running environments: Pause a sandbox to stop billing, resume later with a new timeout. State is preserved across pause/resume cycles.

Snapshot and restore: Create a snapshot of a configured sandbox to save its state. Use the snapshot's template ID to create identical sandboxes later.

Monitor sandbox health: Pull metrics (CPU, memory) and logs for running sandboxes. Use log search to find errors. Filter by level (error, warn, info).

Manage templates: List templates to see available environments. Delete unused templates to clean up.

Gotchas

  • Template ID required for creation: You must specify a template_id when creating a sandbox. List available templates to find IDs, or use "base" for the default Ubuntu template.
  • Timeout is from NOW: Setting a sandbox timeout resets the TTL to N seconds from the current time, not from creation.
  • Pause stops billing: Paused sandboxes are not billed, but they still consume snapshot storage.
  • Max session length varies by plan: Hobby = 1 hour max, Pro = 24 hours. Exceeding the limit auto-kills the sandbox.
  • Concurrent limits: Hobby = 20 sandboxes, Pro = 100 (up to 1,100 with add-on).
  • Rate limits: 20,000 API calls per 30 seconds. Sandbox creation rate: 1/sec (Hobby) or 5/sec (Pro). Exceeding returns HTTP 429.
  • No code execution through these tools: These tools manage sandbox lifecycle only. To run code inside a sandbox, use the E2B SDK or connect to the sandbox's envd endpoint directly.

Tools in this Server (12)

E2B Create Sandbox

Create a new cloud sandbox from a template. Returns sandbox ID and connection details. Use template_id "base" for default Ubuntu environment, or get c...

E2B Create Snapshot

Create a persistent snapshot of a running sandbox. The snapshot captures the full VM state and can be used as a template to create identical sandboxes...

E2B Delete Template

Permanently delete a sandbox template. Sandboxes already running from this template are not affected, but no new ones can be created.

E2B Get Sandboxes

Get sandboxes. Pass sandbox_id for a single sandbox with full details, or omit to list all. Filter by state (running/paused) when listing.

E2B Get Sandbox Logs

Get logs from a sandbox. Filter by level (error, warn, info, debug) or search text. Paginate with cursor for large log sets.

E2B Get Sandbox Metrics

Get CPU, memory, and network metrics time series for a sandbox. Specify time range with Unix timestamps.

E2B Get Snapshots

List all snapshots. Optionally filter by source sandbox ID.

E2B Get Templates

Get sandbox templates. Pass template_id for a single template with build history, or omit to list all available templates. Templates define the sandbo...

E2B Kill Sandbox

Permanently kill a sandbox. The VM is destroyed and cannot be recovered. Use snapshots to preserve state before killing.

E2B Pause Sandbox

Pause a running sandbox. State is preserved and billing stops. Resume later with e2b_resume_sandbox.

E2B Resume Sandbox

Resume a paused sandbox and set its new timeout. The sandbox returns to running state with billing resumed.

E2B Set Sandbox Timeout

Set or extend a sandbox's TTL. The timeout is reset to N seconds from now — each call overwrites the previous timeout.

Frequently Asked Questions

What is the E2B MCP server?

E2B provides cloud sandboxes for AI-generated code execution. Create, manage, pause, resume, and snapshot isolated virtual machines with full filesystem, process, and network access. Manage sandbox templates for reproducible environments. It provides 12 tools that AI agents can use through the Model Context Protocol (MCP).

How do I connect E2B to my AI agent?

Add the MCPBundles server URL to your MCP client configuration (Claude Desktop, Cursor, VS Code, etc.). The URL format is: https://mcp.mcpbundles.com/bundle/e2b. Authentication is handled automatically.

How many tools does E2B provide?

E2B provides 12 tools that can be called by AI agents, along with a SKILL.md that gives your AI agent domain knowledge about when and how to use them.

What authentication does E2B require?

E2B uses API Key. E2B requires credentials. Connect via MCPBundles and authentication is handled automatically.

Setup Instructions

Connect E2B to any MCP client in minutes

https://mcp.mcpbundles.com/bundle/e2b

What is MCP?

Model Context Protocol lets AI tools call external capabilities securely through a single URL. This bundle groups tools behind an MCP endpoint that many clients can use.

Use this bundle in 3 steps

  1. Copy the MCP URL above
  2. Open your AI tool and add a new MCP/connector
  3. Paste the URL and follow any auth prompts

Claude Desktop Users

Skip the manual setup! Use the .mcpb file format for one-click installation. Check the Claude Desktop tab for setup instructions.

Pick your tool tab for exact steps

Select ChatGPT, Cursor, Claude Code, or another tab for copy-paste config.

Ready to chat with E2B?

Same flow: Studio opens on this server after sign-in. Keep chatting to call tools from the conversation.

E2B MCP Server & Skill — 12 Tools