run_code
Run python code in a secure sandbox by E2B. Using the Jupyter Notebook syntax.
code必填
io.github.CloudCorpRecords由 GitHub 帳號 CloudCorpRecords 發布v0.1.0更新於 Nov 1, 2026
Run code in a secure E2B sandbox from the CLI or a stdio MCP server.
在短暫存在的 E2B 雲端沙箱中執行 Python 程式碼,回傳輸出、結果與錯誤,讓助理不必在你的電腦上執行程式。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
參照 儲存庫 中的啟動說明。
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.
Or run the container image:
The container defaults to the MCP server (see below). Pass CLI arguments to use it as a CLI instead.
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.
One bin serves both faces. The mcp subcommand starts a stdio MCP
server:
MCP client configuration:
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.
MIT — see LICENSE.
來源:README.md,提交 226de0e
Run python code in a secure sandbox by E2B. Using the Jupyter Notebook syntax.
code必填已滿足適用檢查項的 90%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
npx @reneturcios/sandboxrun run "print(6 * 7)"docker run -i -e E2B_API_KEY ghcr.io/cloudcorprecords/sandboxrunexport 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 --versionnpx -y @reneturcios/sandboxrun mcp{ "mcpServers": { "sandboxrun": { "command": "npx", "args": ["-y", "@reneturcios/sandboxrun", "mcp"], "env": { "E2B_API_KEY": "your E2B API key" } } }}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