E2B MCP
Giving Claude ability to run code with E2B via MCP (Model Context Protocol)
What is E2B MCP?
E2B MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to giving claude ability to run code with e2b via mcp (model context protocol)
Giving Claude ability to run code with E2B via MCP (Model Context Protocol)
This server falls under the Cloud Services category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Giving Claude ability to run code with E2B via MCP (Model Co
Use Cases
Maintainer
Works with
Installation
NPM
npx -y e2b-mcp-serverManual Installation
npx -y e2b-mcp-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use E2B MCP
The E2B MCP Server integrates the E2B cloud sandbox environment with MCP-compatible AI clients, giving Claude and other AI assistants the ability to execute code safely in isolated cloud environments. It acts as a bridge between the AI model and E2B's sandboxed code interpreter, supporting arbitrary code execution in Python and other languages without risking the host system. Note: this project was archived in April 2026 and is no longer actively maintained — it may not receive further updates or bug fixes.
Prerequisites
- Node.js 18+ installed (for the JavaScript edition) or Python 3.8+ (for the Python edition)
- An E2B account and API key — sign up at e2b.dev to get your E2B_API_KEY
- An MCP-compatible client such as Claude Desktop
- npx (comes with Node.js) for running the server without a permanent install
Get Your E2B API Key
Sign up at e2b.dev and navigate to your dashboard to generate an API key. This key is required to authenticate with the E2B sandbox service.
# Visit https://e2b.dev and create an account
# Copy your API key from the dashboard
# It will look like: e2b_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxInstall via Smithery (Recommended)
The easiest installation method uses the Smithery CLI, which configures Claude Desktop automatically.
npx @smithery/cli install e2b --client claudeOr Configure Manually
Add the E2B MCP server to your Claude Desktop configuration file manually, providing your E2B API key as an environment variable.
{
"mcpServers": {
"e2b": {
"command": "npx",
"args": ["-y", "e2b-mcp-server"],
"env": {
"E2B_API_KEY": "e2b_your_api_key_here"
}
}
}
}Restart Claude Desktop
After saving the configuration, fully quit and relaunch Claude Desktop. The E2B code execution tool will appear in the connected tools list.
Test Code Execution
Ask Claude to run code using the E2B sandbox. The server will create an isolated cloud environment, execute the code, and return the output.
# In Claude Desktop, try:
"Run this Python code: print('Hello from E2B sandbox!')"E2B MCP Examples
Client configuration
Claude Desktop configuration for the E2B MCP server with your API key.
{
"mcpServers": {
"e2b": {
"command": "npx",
"args": ["-y", "e2b-mcp-server"],
"env": {
"E2B_API_KEY": "e2b_your_api_key_here"
}
}
}
}Prompts to try
Example prompts for using E2B's sandboxed code execution through Claude.
- "Run this Python snippet and show me the output: import math; print(math.pi)"
- "Execute a pandas script to compute the mean of [1, 2, 3, 4, 5]"
- "Write and run a Python function that generates the Fibonacci sequence up to 100"
- "Test this code in a sandbox: import requests; r = requests.get('https://httpbin.org/get'); print(r.status_code)"Troubleshooting E2B MCP
Authentication error: invalid or missing E2B_API_KEY
Verify that E2B_API_KEY is set correctly in the env block of your MCP configuration. The key should start with 'e2b_'. Log into your e2b.dev dashboard to confirm the key is active and has not been rotated.
npx e2b-mcp-server fails with package not found
The e2b-mcp-server package is on npm. Ensure Node.js 18+ is installed and npm registry is accessible. Try running 'npm install -g e2b-mcp-server' to install globally, then use 'e2b-mcp-server' as the command instead of 'npx -y e2b-mcp-server'.
Sandbox creation times out or code execution is slow
E2B sandbox cold starts can take a few seconds. If you consistently see timeouts, check your E2B dashboard for quota limits or service status. The project is archived so support options are limited — consider migrating to an actively maintained alternative.
Frequently Asked Questions about E2B MCP
What is E2B MCP?
E2B MCP is a Model Context Protocol (MCP) server that giving claude ability to run code with e2b via mcp (model context protocol) It connects AI assistants to external tools and data sources through a standardized interface.
How do I install E2B MCP?
Install via npm with the command: npx -y e2b-mcp-server. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).
Which AI clients work with E2B MCP?
E2B MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is E2B MCP free to use?
Yes, E2B MCP is open source and available under the Apache 2.0 license. You can use it freely in both personal and commercial projects.
E2B MCP Alternatives — Similar Cloud Services Servers
Looking for alternatives to E2B MCP? Here are other popular cloud services servers you can use with Claude, Cursor, and VS Code.
Open WebUI
★ 138.2kUser-friendly AI Interface (Supports Ollama, OpenAI API, ...)
Anything LLM
★ 60.4kThe all-in-one AI productivity accelerator. On device and privacy first with no annoying setup or configuration.
LocalAI
★ 46.4kLocalAI is the open-source AI engine. Run any model - LLMs, vision, voice, image, video - on any hardware. No GPU required.
Nacos
★ 33.0kan easy-to-use dynamic service discovery, configuration and service management platform for building AI cloud native applications.
Xiaozhi ESP32
★ 26.7k本项目为xiaozhi-esp32提供后端服务,帮助您快速搭建ESP32设备控制服务器。Backend service for xiaozhi-esp32, helps you quickly build an ESP32 device control server.
Gateway
★ 11.8kA blazing fast AI Gateway with integrated guardrails. Route to 1,600+ LLMs, 50+ AI Guardrails with 1 fast & friendly API.
Browse More Cloud Services MCP Servers
Explore all cloud services servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up E2B MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use E2B MCP?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.