An extensible Message Communication Protocol (MCP) server that provides secure code execution capabilities in isolated sandbox environments. This
An extensible Message Communication Protocol (MCP) server that provides secure code execution capabilities in isolated sandbox environments. This server follows the MCP standard, making it compatible with Claude for Desktop and other MCP. Exposed over MCP by the mcp code sandbox mcp server, that capability becomes something an assistant can invoke while it works, not something you go and do afterwards.
Everything the assistant can do here goes through one of these:
sandbox_tools.py — Tools for sandbox administrationcode_execution_tools.py — Tools for code executionfile_tools.py — Tools for file operationsInstallation goes through your MCP client rather than a global install: point it at fastmcp on PyPI and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.
You will need one environment variable: E2B_API_KEY. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.
Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. MCP Code Sandbox's toolset — sandbox_tools.py, code_execution_tools.py, file_tools.py — is a fair guide to whether it matches your workflow. It is maintained by chrishayuk; worth a glance at recent repository activity before you build anything load-bearing on it.
This entry was verified against MCP Code Sandbox's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.
| Tool | What it does |
|---|---|
| sandbox_tools.py | Tools for sandbox administration |
| code_execution_tools.py | Tools for code execution |
| file_tools.py | Tools for file operations |
Or if you're using `uv`:
```json
{
"mcpServers": {
"code-sandbox": {
"command": "uv",
"args": [
"--directory",
"/ABSOLUTE/PATH/TO/PROJECT_DIRECTORY",
"run",
"main.py"
]
}
}
}Configuration as documented by the project. Restart the client after saving.
| Variable | Description | Required |
|---|---|---|
| E2B_API_KEY | Credential the server authenticates with. | 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.