Skip to content

sandbox-mcp Gives AI Agents Throwaway Windows Sandboxes

A CLI plus optional MCP server that boots a fresh Windows Sandbox, deploys an app, drives its UI and keeps the evidence.

Draftship Editorial3 min read

A throwaway Windows 11 machine for your agent

The shanselman/sandbox-mcp project is a Windows Sandbox MCP server and CLI that boots a fresh Windows 11 guest for an AI agent, deploys an app into it, drives the controls, keeps the screenshots and logs, then deletes the machine. The sbx command line tool and the optional MCP adapter share one engine. As of 2026-11-14 the repository had 426 stars and 21 forks, gathered since it was created on 2026-11-06. It is written in JavaScript under the MIT licence, and version 1.2.0 ships as a Windows x64 portable ZIP with bundled Node.js, so no Node or npm install is needed.

The premise is that a developer's machine carries every runtime, font and PATH entry its owner ever installed, while a customer's PC does not. Windows Sandbox boots a clean Windows that is deleted on close, which the project treats as a stand-in for a brand-new customer machine.

How a run works

The source says the CLI works alone; the MCP adapter is for agents that want that interface. The tools mirror the CLI: sandbox_deps for sbx deps, sandbox_run for sbx run, plus sandbox_provision and sandbox_status.

sbx deps reads an executable on the host without running it: PE architecture and imports, app-local VC++ DLLs, .NET runtime configs, package dependencies and script interpreters. sbx run deploys the app and includes that diagnosis, naming likely missing runtimes after a failed launch. sbx install-test setup.msi installs on a clean guest, uninstalls, and diffs the files, registry keys, services, scheduled tasks and autoruns added against what was removed. sbx detonate invoice.js runs an untrusted file with no network and reports the processes it started, the names it resolved, the addresses it tried and what it planted.

UI work goes through UI Automation rather than pixel matching: read the control tree, set text, click, toggle, select, wait for a result. Screenshots, mouse and keyboard are the fallback. Networking can be off, firewall or on; with it off, control traffic still crosses a shared folder.

Dependency installation is off by default. Opting into --provision auto, or naming components such as dotnet, desktop, vcredist or windows-app-runtime with an architecture, downloads installers on the host, caches them under cache\redistributables, verifies SHA-512 hashes for .NET and a Microsoft Authenticode signature for every installer, then copies them in and installs silently. Reports label the result PROVISIONED (not a clean-machine test), and a reboot-required installer fails the run.

The source gives one worked example. A sample executable failed on a fresh, network-off sandbox in 29.8s with exit code -1073741515, a missing VC++ redistributable. With provisioning explicitly enabled it passed in 30.9s using a Microsoft-signed 14.51.36247.0 installer, while guest networking stayed off. Sandbox startup is put at about 15 seconds, and measured GUI samples at roughly 40 to 50 seconds end to end.

Limits the source states

Only one sandbox runs at a time; for persistent environments, Linux or many machines the source points to a Hyper-V or VMware VM or a cloud dev VM. Windows Sandbox is described as free with Windows Pro or Enterprise. sbx deps is called a conservative static scan, not proof that every dynamic dependency is present, and optional guest components such as WebView2 must be checked inside the guest. Java and Python need application-specific setup. The source declines to promise that every Windows app or hardware-dependent workload works in Sandbox, and records the optional-component baseline for build 26100.9882 as evidence for that build only.

What it changes for people building apps

An agent that can deploy into a clean guest, look at a screenshot and read a report can close its own loop: build, test on a clean machine, see the failure, fix it, repeat, without touching the developer's desktop.

A note on scope for AI-built apps

The tool targets Windows executables and packages, including Win32, WinForms, WPF, WinUI, console, PyInstaller and Electron builds; the source says nothing about hosted web apps. That is a different workflow from publishing a web app, which Draftship handles in its draft and publish flow. Draftship is not affiliated with this project and does not support Windows Sandbox testing.

Primary sources

This article was drafted with AI assistance from the primary sources listed below and checked automatically against them. An editor hasn't reviewed it yet.