
ScratchRun
dev.scratchrunPublished by scratchrun.devv0.1.1Updated Oct 24, 2026
Ephemeral MicroVM-isolated code execution for AI agents. Fresh VM per call, hard-purged after.
Overview
Runs short Python, Node, or Bash snippets in a disposable isolated MicroVM and returns stdout, stderr, exit code, and output files.
- What you can do
- ScratchRun exposes a single tool, scratchrun_exec, that executes code in a fresh hardware-isolated MicroVM and returns stdout, stderr, the exit code, and any requested output files. Callers choose a runtime (python3.12, python3.11, node20, or bash), can set a timeout and memory limit, pass environment variables, write input files before the run, and capture files afterward as base64. Image outputs are returned as MCP image content blocks. Each VM is destroyed after the call, so nothing persists between runs.
- When to use it
- Useful when an assistant needs to actually run code — quick calculations, data transforms, generating a chart, or testing a snippet — without touching the user's own machine or leaving state behind. It fits one-off, stateless execution rather than long-running jobs or work that must persist files between calls.
- Requirements
- A local Node.js runtime to run the npm package @scratchrun/mcp-server via npx, plus a ScratchRun API key supplied in the SCRATCHRUN_API_KEY environment variable. Network access to the ScratchRun service is required. Desktop client only; no web execution.
Installation
In SourceWeft
- Open ScratchRun in the dashboard and add it to a workspace.
- 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
@scratchrun/mcp-server
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.
Install
Add to your claude_desktop_config.json:
Get an API key at scratchrun.dev.
Tool: scratchrun_exec
Executes code in an ephemeral sandbox and returns stdout, stderr, exit code, and any output files.
Parameters:
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.
Isolation
- Hardware-virtualized MicroVM per execution (own kernel, not a shared-kernel container)
TerminateMicroVMcalled unconditionally after every run — VM destroyed, never reused- RFC 1918 + cloud metadata (
169.254.x.x) always blocked at the network layer - Read-only system filesystem via OverlayFS;
/tmpis RAM-backed and gone with the VM
Latency
~400ms median (warm pool). 2–8s cold start if the pool is empty.
License
MIT
Source: README.md at commit 2d8ebee
Tools
0Version history
1- v0.1.1LatestSep 16, 2026
Score
40% 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
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- 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 listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
Declare a license in the repository or the registry entry.