MCP server overview
what is this project?
E2B MCP Server (Python) is a Model Context Protocol (MCP) server that gives Claude the ability to run code in a secure sandbox. It’s maintained by e2b-dev and designed to integrate with Claude Desktop so the Claude model can execute user code via MCP.
how to use the project?
- Clone the repository and install dependencies (project uses a
uvtool):uv install
- Configure Claude Desktop to point to the MCP server by editing the Claude Desktop config:
- MacOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%/Claude/claude_desktop_config.json - Example server config snippet: { “mcpServers”: { “e2b-mcp-server”: { “command”: “uvx”, “args”: [“e2b-mcp-server”], “env”: { “E2B_API_KEY”: “${e2bApiKey}” } } } }
- MacOS:
- Set required environment variables (e.g., E2B_API_KEY) and run the server via the provided command.
- For debugging, run the MCP Inspector tool to proxy stdio and open debugging UI:
npx @modelcontextprotocol/inspector uv --directory . run e2b-mcp-server
key features
- Secure sandboxed code execution for models
- Implements Model Context Protocol (MCP) for Claude integration
- Easy integration with Claude Desktop via config
- Cross-platform guidance (macOS and Windows paths shown)
- Debugging support via MCP Inspector for visualizing MCP/stdIO messages
use cases
- Allowing Claude to execute and test code snippets during conversations.
- Local development and prototyping of model-driven code execution workflows.
- Automating tasks or scripts triggered by model outputs in a sandbox.
- Educational demos where a model runs example code safely.
- Extending Claude with custom tool integrations that require executing code.
FAQ
- Is running code safe?
The server runs code in a sandboxed environment to reduce risk, but you should still follow best practices: limit privileges, secure environment variables (API keys), and run on trusted machines.
- How do I configure Claude Desktop to use this server?
Add an entry under
mcpServersinclaude_desktop_config.jsonpointing to the server command and pass any needed env vars (example provided above).
- What dependencies are required?
The repository uses the
uvtool for development and server execution. Install project dependencies withuv install(see repo README for full instructions).
- How can I debug MCP/stdio communication?
Use the MCP Inspector (
npx @modelcontextprotocol/inspector ...) which proxies stdio and gives a browser UI for inspecting messages.
- Which Claude/model versions are supported?
The project is aimed at Claude/MCP-enabled clients (tags reference Anthropic/Claude). Verify compatibility with your Claude Desktop/MCP implementation; the repo targets MCP-capable Claude builds.
- Where can I find the source and license?
Source is on the GitHub repo (https://github.com/e2b-dev/mcp-server/tree/HEAD/packages/python). Check the repository for license details.