Ephemeral MicroVM-isolated code execution for AI agents. Fresh VM per call, hard-purged after.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
💡 Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
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
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/scratchrun)<a href="https://allmcps.com/mcp/scratchrun"><img src="https://allmcps.com/api/badge/scratchrun?style=directory" alt="ScratchRun on AllMCPs" /></a>