E2B Code Sandbox MCP Server
Run code in secure, isolated cloud sandboxes from Claude Code. Execute untrusted code, test scripts, run data analysis, and prototype without risking your local environment. Supports Python, JavaScript, and other languages.
MCP Server Configuration
{ "mcpServers": { "e2b": { "command": "npx", "args": ["-y", "@e2b/mcp-server"], "env": { "E2B_API_KEY": "<your-api-key>" } } } }
Available Tools
| Tool | Description |
|---|---|
run_code | Execute code in a sandboxed environment |
install_packages | Install pip/npm packages in the sandbox |
upload_file | Upload a file to the sandbox filesystem |
download_file | Download a file from the sandbox |
list_sandboxes | List active sandbox instances |
create_sandbox | Create a new sandbox with specific configuration |
kill_sandbox | Terminate a running sandbox |
Use Cases
- Safe code execution: Run LLM-generated code without local risk
- Data analysis: Process datasets in isolated Python environments
- Package testing: Test npm/pip packages before adding to your project
- Prototyping: Quickly test algorithms or API integrations
- CI/CD validation: Run build scripts in clean environments
Supported Environments
- Python 3.11+ with pip
- Node.js 20+ with npm
- Custom Docker templates for specialized environments
- Pre-installed: pandas, numpy, requests, and common libraries
Setup
- Sign up at https://e2b.dev
- Get your API key from the dashboard
- Replace
<your-api-key>with your actual key - Free tier includes 100 sandbox hours/month
Security Notes
- Code runs in isolated microVMs - no access to your local filesystem
- Each sandbox is ephemeral and destroyed after use
- Network access is available within sandboxes - be aware of outbound calls
- API key controls sandbox creation and execution
- Sandbox timeout defaults to 5 minutes (configurable)
- Review code before execution, especially network-accessing scripts
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Database MCP Integration
MCP server configuration for connecting Claude Code to PostgreSQL, MySQL, and MongoDB databases. Enables schema inspection, query building, and migration generation.
Elevenlabs Server
Streamline your workflow with this official, elevenlabs, text, speech. Includes structured workflows, validation checks, and reusable patterns for audio.
Browser Use Portal
Powerful mcp for server, enables, agents, control. Includes structured workflows, validation checks, and reusable patterns for browser_automation.