E2B Sandbox MCP Server is an MCP (Model Context Protocol) server used to connect Claude Code with E2B cloud sandboxes, providing isolated Linux virtual machines to handle arbitrary GitHub repositories, with all operations completed inside the cloud sandbox without touching the local machine.
Use cases and scenarios: remotely handle arbitrary GitHub repositories (clone, build, test, modify, push, without local installation); safely experiment with dependency upgrades, refactoring, or migration scripts in a disposable environment; persistent development sessions (pause and resume the next day, with files and state preserved); preview development servers (get a public URL without port forwarding or tunneling); work on multiple repositories in parallel (each sandbox is completely isolated); CI-like testing in a fresh Linux environment; open source contributions (fork, clone, commit, and push to the fork); code review in a live environment (clone the PR branch, run tests, inspect changes).
Main capabilities: provides 29 tools covering sandbox lifecycle, network and file transfer, command execution, file operations, and environment variable management. Tool output is structured and truncated (100KB per stream, 200KB total), background processes return only the process ID, and directory listings are capped at 1000 entries, thereby reducing context tokens consumed. The server maintains a registry of active sandboxes, each tool references sandboxes by ID, and concurrent isolated environments are supported.
How to use: requires the Claude Code CLI installed, an E2B API key (with a free tier), and an optional GitHub Personal Access Token (for private repositories and pushing). No separate installation is required; you can directly use npx to point Claude Code at the npm package, restart Claude Code, and it is ready; global installation is also optional. After that, Claude Code can automatically invoke the relevant tools, for example: "Create a sandbox, clone https://github.com/expressjs/express, and run the test suite".
Limitations: the sandbox is a real VM, and commands are executed on an actual Linux machine in the E2B cloud; git push is real and will push to the actual remote repository; the sandbox has a default 5-minute timeout, which can be extended with sandbox_keep_alive; using E2B has costs, so check its pricing, and a free tier is available; the sandbox is isolated from the local machine, but it is not isolated from the internet, and network requests, git pushes, and npm publishes are all real.