The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the ScratchRun listing page.
MCP server for ScratchRun — ephemeral, MicroVM-isolated code execution for AI agents.
Each call runs in a fresh hardware-isolated MicroVM. The VM is hard-purged after execution. No state, no files, nothing persists between calls.
Add to your claude_desktop_config.json:
Get an API key at scratchrun.dev.
scratchrun_execExecutes code in an ephemeral sandbox and returns stdout, stderr, exit code, and any output files.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
runtime | python3.12 | python3.11 | node20 | bash | yes | Runtime to use |
code | string | yes | Code to execute |
timeout_ms | integer | no | Timeout in ms (default 10000, max 30000) |
memory_mb | integer | no | Memory limit in MB (default 256, max 512) |
env | object | no | Environment variables — use for secrets, not code strings |
files | object | no | Files to write before execution (path → content) |
return_files | string[] | no | File paths to capture after execution (returned as base64) |
Example — run Python and return a chart:
Output files are returned as base64. Image files (PNG, JPG, SVG) are returned as MCP image content blocks and render inline in Claude.
TerminateMicroVM called unconditionally after every run — VM destroyed, never reused169.254.x.x) always blocked at the network layer/tmp is RAM-backed and gone with the VM~400ms median (warm pool). 2–8s cold start if the pool is empty.
MIT