
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@scratchrun/mcp-server
Advanced tools
MCP server for ScratchRun — ephemeral MicroVM code execution for AI agents
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:
{
"mcpServers": {
"scratchrun": {
"command": "npx",
"args": ["-y", "@scratchrun/mcp-server"],
"env": {
"SCRATCHRUN_API_KEY": "sr_live_your_key_here"
}
}
}
}
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:
{
"runtime": "python3.12",
"code": "import matplotlib.pyplot as plt\nimport numpy as np\nx = np.linspace(0, 10, 100)\nplt.plot(x, np.sin(x))\nplt.savefig('/tmp/plot.png')",
"return_files": ["/tmp/plot.png"]
}
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
FAQs
MCP server for ScratchRun — ephemeral MicroVM code execution for AI agents
The npm package @scratchrun/mcp-server receives a total of 317 weekly downloads. As such, @scratchrun/mcp-server popularity was classified as not popular.
We found that @scratchrun/mcp-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.