Give your assistant a real code sandbox — isolated cloud VMs for actually running the code it writes.
LLMs write code fluently but can't know whether it runs. The E2B MCP server closes that loop by giving your assistant a sandbox: an isolated cloud microVM (Firecracker-based, ~150ms startup) where it can execute Python or JavaScript, see the real output, hit real exceptions, and iterate until things actually work.
The quality difference is easy to underestimate. Ask an assistant for a data-transformation script and you get plausible code; ask it to run that script on a sample in a sandbox and you get code that has already survived contact with reality — off-by-one pagination, encoding surprises, a NaN where the docs promised a number. Verified output beats confident guessing every time.
Because the sandbox is isolated from your machine, it's also the safe way to let a model execute code at all. Nothing it runs can touch your filesystem, your credentials or your network position; the blast radius is a disposable VM that vanishes when the session ends. That's the correct architecture for agentic code execution, and E2B made it the easy default rather than an infrastructure project.
Typical uses run from "quick calculator for anything" (parsing a CSV, testing a regex against real strings, checking whether an algorithm handles the edge case) up to full analysis sessions where the assistant installs packages, processes uploaded data and returns charts. The free tier is generous enough for individual development, and the same sandboxes scale up under products via E2B's SDKs when you graduate from chat to shipping.
!pip install works inside the Python sandbox because the microVM has outbound network access — which also means it can fetch a public dataset directly instead of you uploading one.The assistant runs what it writes, hits the real errors, and hands you code that already works.
Model-generated code runs in a disposable microVM, never on your machine.
Parse files, crunch numbers and produce results inside the conversation.
| Tool | What it does |
|---|---|
| run_code | Execute Python or JavaScript in an isolated cloud sandbox and return stdout, stderr and results |
{
"mcpServers": {
"e2b": {
"command": "npx",
"args": ["-y", "@e2b/mcp-server"],
"env": { "E2B_API_KEY": "your-e2b-api-key" }
}
}
}An E2B account and API key. Free tier covers development use; Node.js 18+ for the connector.
| Variable | Description | Required |
|---|---|---|
| E2B_API_KEY | API key from the E2B dashboard (free tier available)e.g. e2b_... | Yes |
Kill hallucinated APIs — version-accurate, up-to-date library documentation injected straight into context.
Microsoft's official browser automation server — drive a real browser through the accessibility tree, no screenshots needed.
GitHub's official server — repos, issues, pull requests, Actions and code security, straight from your assistant.
Issue tracking at the speed of conversation — Linear's official hosted server with OAuth and zero install.
Local repository surgery — status, diffs, commits, branches and history for any repo on disk.
Timezone sanity for AI — current time anywhere and correct conversions, without the model doing date math.