Sandboxrun

io.github.CloudCorpRecordsPublished by GitHub account CloudCorpRecordsv0.1.0Updated Nov 1, 2026

Run code in a secure E2B sandbox from the CLI or a stdio MCP server.

VerifiedSTDIODesktop onlyCloud & InfrastructureDeveloper Tools

Overview

AI-generated overview

Runs Python code in a short-lived E2B cloud sandbox and returns its output, results and errors, so an assistant can test snippets off your machine.

What you can do
  • Run a Python snippet in a fresh E2B sandbox and get back the sandbox id, printed output, structured results, log lines and any error raised.
  • Code is written in Jupyter notebook syntax, so expressions and cells behave as in a notebook.
  • Each call spins up a new sandbox from the code-interpreter template, so runs do not share state.
When to use it
Useful when an assistant writes Python and should check that it actually runs, or when you want code executed somewhere other than your own machine. It is a single-purpose tool, so it fits quick verification rather than long-lived sessions.
Requirements
Runs locally over stdio via npx (Node.js) or the Docker image. Needs an E2B account and an API key supplied in the E2B_API_KEY environment variable; without it every run fails. Network access to the E2B API is required.
Before you install
The E2B_API_KEY is a billable third-party credential sent to the E2B API as the X-API-Key header; keep it out of shared configs. Code and its output leave your machine for E2B's cloud sandboxes, so avoid pasting secrets or private data into snippets. Sandboxes are short-lived, so nothing persists between calls.

Installation

In SourceWeft

  1. Open Sandboxrun in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

sandboxrun

sandboxrun gives an agent a safe place to run code it just wrote. Hand it a snippet and it comes back with what the snippet printed, the values it produced, and any error it hit — all executed inside a short-lived E2B sandbox, never on your own machine. It runs from the command line or as an MCP server for agents.

An E2B API key is required. Put it in the E2B_API_KEY environment variable; the key is sent to the API as the X-API-Key header and never appears in output. When the variable is missing, every run fails with an error that names it.

Install

bash
npx @reneturcios/sandboxrun run "print(6 * 7)"

Or run the container image:

bash
docker run -i -e E2B_API_KEY ghcr.io/cloudcorprecords/sandboxrun

The container defaults to the MCP server (see below). Pass CLI arguments to use it as a CLI instead.

CLI

bash
export E2B_API_KEY="your E2B API key"
# Run a snippet inlinesandboxrun run "print('hello from the sandbox')"
# Run a file's contentssandboxrun run --file analysis.py
# Machine-readable outputsandboxrun run "import math; print(math.pi)" --json
sandboxrun --version

Exit codes: 0 on success, 1 when a run fails (including a missing E2B_API_KEY, an API error, or an error raised by the code itself), 2 for usage errors.

MCP server

One bin serves both faces. The mcp subcommand starts a stdio MCP server:

bash
npx -y @reneturcios/sandboxrun mcp

MCP client configuration:

json
{  "mcpServers": {    "sandboxrun": {      "command": "npx",      "args": ["-y", "@reneturcios/sandboxrun", "mcp"],      "env": { "E2B_API_KEY": "your E2B API key" }    }  }}

Tools

ToolInputWhat it returns
run_codecode (string, required)The execution as a text block: the sandbox id, printed output, structured results, log lines, and any error the code raised. Code uses Jupyter notebook syntax.

The documented E2B MCP server exposes this single tool, and sandboxrun exposes exactly that tool — nothing extra.

Under the hood each call creates a fresh sandbox from the code-interpreter template (POST https://api.e2b.app/sandboxes) and then executes the code in it. The upstream SDK talks to the sandbox's Jupyter kernel over a websocket channel; this rebuild shapes the execution as a REST request behind the same seam and records that transport simplification in its build report.

Development

bash
npm installnpm run build   # tsc -> dist/npm test        # node test runner over test/*.test.ts, no network (fake fetch fixtures)npm run dev     # run the CLI from source via tsx

License

MIT — see LICENSE.

Source: README.md at commit 226de0e

Tools

1

run_code

Run python code in a secure sandbox by E2B. Using the Jupyter Notebook syntax.

Parameterscoderequired

Version history

1
  1. v0.1.0LatestNov 1, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts
  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts