shanselman/sandbox-mcp
Fresh, throwaway Windows machines for testing your apps: an MCP server and CLI that automate Windows Sandbox
57db757610ccsandbox-mcp1.2.0 in package.jsonPaths from tool input into commands, SQL, files and URLs
How much power the tools give an agent over the machine
Hidden instructions and poisoning in text for the model
Known vulnerabilities in the packages the server uses
How the server reads credentials and where they can go
Whether the tools do only what their descriptions say
How far the analysis went
The scanner traces each tool from its input to the operations its code performs, and here it could not follow every path. Code Safety is shown as partly traced instead of a score: no finding there is not a clean result. The score of Capability Exposure counts only what it could follow.
- In 60 places a tool's input is handed to a function whose name matches several definitions in the code; the scanner could not tell which one runs, so it stopped there
Top risks in plain words
- HIGHTools
sandbox_exec,sandbox_install_test,sandbox_runrun programs by design: an agent steered by prompt injection can use them that way. - HIGHTools
sandbox_copy_in,sandbox_detonate,sandbox_runread or write any file path by design: an agent steered by prompt injection can use them that way.
How to use it safely
Practical steps from what we found in this server. They lower the risk; they do not replace a review of the code.
- Run it in a container or a virtual machine
sandbox_exec,sandbox_install_test,sandbox_runcan start programs or run code they are given. Keep it away from your home folder, keys and other projects. - Give it only the folder it needs
sandbox_copy_in,sandbox_detonate,sandbox_runcan read or write any file path. Mount a single project folder, read-only where you can. - Turn off the tools you do not use
Most MCP clients let you disable single tools. If you do not need
sandbox_copy_in,sandbox_detonate,sandbox_execand 2 more, switch them off. - Give it a narrowly scoped token
Its code reads credentials or environment variables. Use a key limited to what this server needs, not your main one.
- Keep confirmations on
Leave your MCP client's confirmation prompt on for tools that change files, run commands or send data.
What its tools can do on your machine
The server offers 27 tools. When an AI agent calls them, this is what their code can do on the machine where the server runs, as traced in the source. Tools that call code the scanner could not follow may do more.
sandbox_app_errors, sandbox_click, sandbox_copy_in, sandbox_copy_out, sandbox_deploy, sandbox_deps and 20 moresandbox_provision, sandbox_runsandbox_runNo tool was seen to: start other programs on the machine; read passwords, tokens or keys; touch sensitive locations.
Where its requests and secrets go
Read from the names along each tool's calls, not from a run: what the code says, not every address it may reach at run time.
The literal addresses the tools' requests name.
- None: no request names a fixed host.
Constants or settings that start an address; the value comes from configuration.
- None seen.
Credential-like environment variables. Give the server a key with the least access it needs.
- None: no credential-like variable is read by the tools.
Text it brings in from outside
Text that reaches the model from outside: an instruction hidden in it can steer the agent (prompt injection). Treat what these tools return as data, not as orders.
- files26 tools · sandbox_app_errors, sandbox_click, sandbox_copy_in +23
- web or API responses2 tools · sandbox_provision, sandbox_run
Tool annotations
No tool declares MCP annotations (readOnlyHint, destructiveHint and the rest). Clients use them to decide what to confirm; directories such as Anthropic's and OpenAI's ask for them.
Tools, prompts and resources (27: 27 tools)
Open a row for its full description. Chips show what its code can reach, and which risky capability its own description declares.
sandbox_runtool One shot: boot a fresh sandbox, copy the app folder in, run it, screenshot it, check for crashes, optionally run a PowerShell test script inside, copy files outFilesNetworkEnv varsoutside textReads/writes filesRuns programs
One shot: boot a fresh sandbox, copy the app folder in, run it, screenshot it, check for crashes, optionally run a PowerShell test script inside, copy files out, destroy the sandbox and write report.md. Use this for "does my build work on a clean Windows machine?". Fails if a sandbox is already running.
sandbox_copy_intool Copy a host file or folder (e.g. your build output) onto the sandbox local disk.Filesoutside textReads/writes files
Copy a host file or folder (e.g. your build output) onto the sandbox local disk.
sandbox_detonatetool One shot: boot a fresh sandbox (no network adapter by default), turn on Windows process, connection and DNS auditing, run the file the way a double-click would,Filesoutside textReads/writes files
One shot: boot a fresh sandbox (no network adapter by default), turn on Windows process, connection and DNS auditing, run the file the way a double-click would, watch it, then destroy the sandbox. Reports every process it started (with command lines), names it looked up, connections it tried, files/registry/autoruns/services/scheduled tasks it changed, windows and screenshots, plus plain-language findings (heuristics, not a verdict). Fails if a sandbox is already running.
sandbox_exectool Run a command in the sandbox (elevated admin user session) and wait for it. Returns stdout, stderr and exit code. Use sandbox_launch for GUI apps or anything loFilesoutside textRuns programs
Run a command in the sandbox (elevated admin user session) and wait for it. Returns stdout, stderr and exit code. Use sandbox_launch for GUI apps or anything long-running. The sandbox has Windows PowerShell 5.1 and .NET Framework 4, but no Store apps (no Notepad, Calculator, Terminal) and no winget.
sandbox_install_testtool One shot: boot a fresh sandbox, snapshot, run the installer silently, snapshot, optionally run a test script, uninstall using what the installer registered in AFilesoutside textRuns programs
One shot: boot a fresh sandbox, snapshot, run the installer silently, snapshot, optionally run a test script, uninstall using what the installer registered in Add/Remove Programs, snapshot again, destroy the sandbox. Reports exactly what the install added (files, registry, services, autoruns, scheduled tasks, processes left running) and what the uninstaller left behind. If an installer hangs (usually a dialog waiting for a click), it is screenshotted and its controls are listed. Fails if a sandbox is already running.
sandbox_app_errorstool Error and critical events from the sandbox Application event log (crashes, .NET unhandled exceptions, side-by-side errors).Filesoutside text
Error and critical events from the sandbox Application event log (crashes, .NET unhandled exceptions, side-by-side errors).
sandbox_clicktool Click at a point. By default x/y are pixel coordinates in the most recent sandbox_screenshot image. Prefer sandbox_ui_action when the target control has a name:Filesoutside text
Click at a point. By default x/y are pixel coordinates in the most recent sandbox_screenshot image. Prefer sandbox_ui_action when the target control has a name: it is more reliable than pixels.
sandbox_copy_outtool Copy a file or folder from the sandbox back to the host (into the run outDir/files). Returns the host path.Filesoutside text
Copy a file or folder from the sandbox back to the host (into the run outDir/files). Returns the host path.
sandbox_deploytool Explicit warm-sandbox inner loop: transfer only added/changed files, delete removed files, verify all destination SHA256 hashes. Requires an already running sanFilesoutside text
Explicit warm-sandbox inner loop: transfer only added/changed files, delete removed files, verify all destination SHA256 hashes. Requires an already running sandbox. Rejects links/reparse points and build output that changes while staging. copy_in still does a full replace.
sandbox_depstool Host-only static scan of PE imports, .NET runtime configs, AppxManifest and scripts. Does not boot a sandbox, execute the app or install anything. Unknown/dynamFilesoutside text
Host-only static scan of PE imports, .NET runtime configs, AppxManifest and scripts. Does not boot a sandbox, execute the app or install anything. Unknown/dynamic dependencies still require runtime observation.
sandbox_desktop_releasetool End this workflow desktop turn immediately instead of waiting for its four-second idle grace.
End this workflow desktop turn immediately instead of waiting for its four-second idle grace.
sandbox_difftool What changed between two snapshots: installed programs, services/drivers, autorun/environment values, files and registry keys added/removed/changed. New foldersFilesoutside text
What changed between two snapshots: installed programs, services/drivers, autorun/environment values, files and registry keys added/removed/changed. New folders and keys are collapsed to their topmost new parent. Markdown.
sandbox_launchtool Start a program (e.g. a GUI app) on the sandbox desktop without waiting for it to exit. Returns its pid.Filesoutside text
Start a program (e.g. a GUI app) on the sandbox desktop without waiting for it to exit. Returns its pid.
sandbox_processtool Is a process started with sandbox_launch still running? Returns hasExited, exitCode and its main window title.Filesoutside text
Is a process started with sandbox_launch still running? Returns hasExited, exitCode and its main window title.
sandbox_provisiontool OPT IN only. Host downloads official Microsoft runtime installers, verifies published hashes when available and Microsoft Authenticode signatures, then copies aFilesNetworkoutside text
OPT IN only. Host downloads official Microsoft runtime installers, verifies published hashes when available and Microsoft Authenticode signatures, then copies and silently installs in the already-started guest. Works with guest networking off. This is no longer a clean-machine test.
sandbox_record_starttool Capture bounded desktop evidence in an independent guest process, including during long exec calls. Frames and metadata stream to the host share; no guest depenFilesoutside text
Capture bounded desktop evidence in an independent guest process, including during long exec calls. Frames and metadata stream to the host share; no guest dependencies or network needed.
sandbox_record_stoptool Stop the tracked recorder and publish a self-contained HTML flipbook, plus MP4 when host ffmpeg is available. Keeps raw frames and manifest even on failure. AlsFilesoutside text
Stop the tracked recorder and publish a self-contained HTML flipbook, plus MP4 when host ffmpeg is available. Keeps raw frames and manifest even on failure. Also publishes partial evidence after a guest crash.
sandbox_screenshottool Capture the sandbox desktop, or one window by title/pid. Returns a preview image; the full-resolution PNG is saved on the host. sandbox_click coordinates refer Filesoutside text
Capture the sandbox desktop, or one window by title/pid. Returns a preview image; the full-resolution PNG is saved on the host. sandbox_click coordinates refer to this image by default.
sandbox_snapshottool Record files (Program Files, ProgramData, user profiles, drivers, scheduled tasks, top of C:\ and System32), all HKLM\SOFTWARE and HKCU\Software keys, services/Filesoutside text
Record files (Program Files, ProgramData, user profiles, drivers, scheduled tasks, top of C:\ and System32), all HKLM\SOFTWARE and HKCU\Software keys, services/drivers, autoruns, environment and Add/Remove Programs entries under a name. Known Windows background noise is filtered out. Takes ~15s. Compare two with sandbox_diff.
sandbox_starttool Boot a fresh, ephemeral Windows Sandbox (clean Windows install, elevated admin user) and connect the guest agent. Only one sandbox can exist at a time; everythiFilesoutside text
Boot a fresh, ephemeral Windows Sandbox (clean Windows install, elevated admin user) and connect the guest agent. Only one sandbox can exist at a time; everything inside is destroyed by sandbox_stop. Takes ~20-40s. Host-side artifacts (screenshots, copied-out files, audit log) stay in runDir after the sandbox is gone.
sandbox_statustool Show the current sandbox (id, boot epoch, verified agent protocol/version/SHA256, network mode, run folder) and whether the guest agent responds.Filesoutside text
Show the current sandbox (id, boot epoch, verified agent protocol/version/SHA256, network mode, run folder) and whether the guest agent responds.
sandbox_stoptool Stop and destroy the sandbox. Returns the host folder holding artifacts (screenshots, copied-out files).Filesoutside text
Stop and destroy the sandbox. Returns the host folder holding artifacts (screenshots, copied-out files).
sandbox_typetool Type text or send key chords to the focused window (or a window found by title/pid, which is focused first). With literal=false, uses SendKeys syntax: {ENTER}, Filesoutside text
Type text or send key chords to the focused window (or a window found by title/pid, which is focused first). With literal=false, uses SendKeys syntax: {ENTER}, {TAB}, ^s (Ctrl+S), %{F4} (Alt+F4).sandbox_ui_actiontool Find a control by name / automationId / controlType (any combination) and act on it through UI Automation: click (Invoke, Toggle, Select or ExpandCollapse as apFilesoutside text
Find a control by name / automationId / controlType (any combination) and act on it through UI Automation: click (Invoke, Toggle, Select or ExpandCollapse as appropriate, else a real mouse click), doubleclick, rightclick, setvalue (type into an edit box), toggle, select, expand, collapse, focus, or read (just return its state). Use sandbox_ui_tree first to see names. If a click opens a modal dialog the result is {pending:true}; that is fine.sandbox_ui_treetool Read the accessibility (UI Automation) tree of an app in the sandbox: one line per control with type, "name", #automationId, = value, [x] toggle state and {avaiFilesoutside text
Read the accessibility (UI Automation) tree of an app in the sandbox: one line per control with type, "name", #automationId, = value, [x] toggle state and {available actions}. Much cheaper and more precise than a screenshot for finding controls. Without pid/windowTitle it reads every top-level window (can be large).sandbox_ui_waittool Wait until a control matching name / automationId / controlType appears (e.g. a result label, a dialog, a finished state). Returns the element, or an error afteFilesoutside text
Wait until a control matching name / automationId / controlType appears (e.g. a result label, a dialog, a finished state). Returns the element, or an error after timeoutSec.
sandbox_windowstool List top-level windows on the sandbox desktop (pid, process, title, screen rect).Filesoutside text
List top-level windows on the sandbox desktop (pid, process, title, screen rect).
Text the model reads (27)
Every tool, prompt and resource description as written in the code: the model sees all of it, the user usually does not.
sandbox_deps tool
Host-only static scan of PE imports, .NET runtime configs, AppxManifest and scripts. Does not boot a sandbox, execute the app or install anything. Unknown/dynamic dependencies still require runtime observation.
sandbox_provision tool
OPT IN only. Host downloads official Microsoft runtime installers, verifies published hashes when available and Microsoft Authenticode signatures, then copies and silently installs in the already-started guest. Works with guest networking off. This is no longer a clean-machine test.
sandbox_start tool
Boot a fresh, ephemeral Windows Sandbox (clean Windows install, elevated admin user) and connect the guest agent. Only one sandbox can exist at a time; everything inside is destroyed by sandbox_stop. Takes ~20-40s. Host-side artifacts (screenshots, copied-out files, audit log) stay in runDir after the sandbox is gone.
sandbox_status tool
Show the current sandbox (id, boot epoch, verified agent protocol/version/SHA256, network mode, run folder) and whether the guest agent responds.
sandbox_stop tool
Stop and destroy the sandbox. Returns the host folder holding artifacts (screenshots, copied-out files).
sandbox_desktop_release tool
End this workflow desktop turn immediately instead of waiting for its four-second idle grace.
sandbox_copy_in tool
Copy a host file or folder (e.g. your build output) onto the sandbox local disk.
sandbox_deploy tool
Explicit warm-sandbox inner loop: transfer only added/changed files, delete removed files, verify all destination SHA256 hashes. Requires an already running sandbox. Rejects links/reparse points and build output that changes while staging. copy_in still does a full replace.
sandbox_copy_out tool
Copy a file or folder from the sandbox back to the host (into the run outDir/files). Returns the host path.
sandbox_exec tool
Run a command in the sandbox (elevated admin user session) and wait for it. Returns stdout, stderr and exit code. Use sandbox_launch for GUI apps or anything long-running. The sandbox has Windows PowerShell 5.1 and .NET Framework 4, but no Store apps (no Notepad, Calculator, Terminal) and no winget.
sandbox_launch tool
Start a program (e.g. a GUI app) on the sandbox desktop without waiting for it to exit. Returns its pid.
sandbox_process tool
Is a process started with sandbox_launch still running? Returns hasExited, exitCode and its main window title.
sandbox_windows tool
List top-level windows on the sandbox desktop (pid, process, title, screen rect).
sandbox_screenshot tool
Capture the sandbox desktop, or one window by title/pid. Returns a preview image; the full-resolution PNG is saved on the host. sandbox_click coordinates refer to this image by default.
sandbox_record_start tool
Capture bounded desktop evidence in an independent guest process, including during long exec calls. Frames and metadata stream to the host share; no guest dependencies or network needed.
sandbox_record_stop tool
Stop the tracked recorder and publish a self-contained HTML flipbook, plus MP4 when host ffmpeg is available. Keeps raw frames and manifest even on failure. Also publishes partial evidence after a guest crash.
sandbox_click tool
Click at a point. By default x/y are pixel coordinates in the most recent sandbox_screenshot image. Prefer sandbox_ui_action when the target control has a name: it is more reliable than pixels.
sandbox_type tool
Type text or send key chords to the focused window (or a window found by title/pid, which is focused first). With literal=false, uses SendKeys syntax: {ENTER}, {TAB}, ^s (Ctrl+S), %{F4} (Alt+F4).sandbox_ui_tree tool
Read the accessibility (UI Automation) tree of an app in the sandbox: one line per control with type, "name", #automationId, = value, [x] toggle state and {available actions}. Much cheaper and more precise than a screenshot for finding controls. Without pid/windowTitle it reads every top-level window (can be large).sandbox_ui_action tool
Find a control by name / automationId / controlType (any combination) and act on it through UI Automation: click (Invoke, Toggle, Select or ExpandCollapse as appropriate, else a real mouse click), doubleclick, rightclick, setvalue (type into an edit box), toggle, select, expand, collapse, focus, or read (just return its state). Use sandbox_ui_tree first to see names. If a click opens a modal dialog the result is {pending:true}; that is fine.sandbox_ui_wait tool
Wait until a control matching name / automationId / controlType appears (e.g. a result label, a dialog, a finished state). Returns the element, or an error after timeoutSec.
sandbox_app_errors tool
Error and critical events from the sandbox Application event log (crashes, .NET unhandled exceptions, side-by-side errors).
sandbox_run tool
One shot: boot a fresh sandbox, copy the app folder in, run it, screenshot it, check for crashes, optionally run a PowerShell test script inside, copy files out, destroy the sandbox and write report.md. Use this for "does my build work on a clean Windows machine?". Fails if a sandbox is already running.
sandbox_snapshot tool
Record files (Program Files, ProgramData, user profiles, drivers, scheduled tasks, top of C:\\ and System32), all HKLM\\SOFTWARE and HKCU\\Software keys, services/drivers, autoruns, environment and Add/Remove Programs entries under a name. Known Windows background noise is filtered out. Takes ~15s. Compare two with sandbox_diff.
sandbox_diff tool
What changed between two snapshots: installed programs, services/drivers, autorun/environment values, files and registry keys added/removed/changed. New folders and keys are collapsed to their topmost new parent. Markdown.
sandbox_install_test tool
One shot: boot a fresh sandbox, snapshot, run the installer silently, snapshot, optionally run a test script, uninstall using what the installer registered in Add/Remove Programs, snapshot again, destroy the sandbox. Reports exactly what the install added (files, registry, services, autoruns, scheduled tasks, processes left running) and what the uninstaller left behind. If an installer hangs (usually a dialog waiting for a click), it is screenshotted and its controls are listed. Fails if a sandbox is already running.
sandbox_detonate tool
One shot: boot a fresh sandbox (no network adapter by default), turn on Windows process, connection and DNS auditing, run the file the way a double-click would, watch it, then destroy the sandbox. Reports every process it started (with command lines), names it looked up, connections it tried, files/registry/autoruns/services/scheduled tasks it changed, windows and screenshots, plus plain-language findings (heuristics, not a verdict). Fails if a sandbox is already running.
What we checked
The same checks run on every server. Each line below has one of these marks:
- 8 checks: command injection, argument injection, path traversal, server-side request forgery, SQL injection, code execution, unsafe deserialization, template injectionChecked on every scan. Results in this category are published only after a person has verified them.
- Runs programs the caller chooses6 findings the scanner could not decide; see the findings below
- Executes caller-supplied codeNo tool evaluates code the caller supplies — 27 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Reads or writes any file path3 findings the scanner could not decide; see the findings below
- Requests any addressNo tool sends a request to an address the caller supplies — 27 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Runs caller-supplied SQLNo tool executes a query the caller supplies — 27 tool handlers traced. Not every path could be followed, so this is not a clean pass.
- Tools that start processesNot seen in the traced code of 27 capabilities; 27 more call code the scanner could not follow, where it may happen
- Tools that touch files26 of 27 capabilities touch files; 1 more call code the scanner could not follow, where it may happen
- Tools that call the network2 of 27 capabilities call the network; 25 more call code the scanner could not follow, where it may happen
Where the code is: 27 handlers in 1 file at commit 57db757610cc
- 5 checks: tool poisoning, instruction override, hidden content, exfiltration requests, metadata integrityChecked on every scan. Results in this category are published only after a person has verified them.
- Dependency manifests1 manifest: package.json
- Lockfiles checked against OSV1 file resolved and checked against the OSV database
- Known vulnerabilities in production dependenciesNo production dependency with a known advisory
- Known vulnerabilities in other dependenciesNo package used only for development, tests or examples has a known advisory
- MCP SDK version@modelcontextprotocol/sdk ^1.32.2
- 3 checks: credential harvesting, undeclared credential access, credentials sent over the networkChecked on every scan. Results in this category are published only after a person has verified them.
- Tools that read credentialsNot seen in the traced code of 27 capabilities; 27 more call code the scanner could not follow, where it may happen
- Environment variables1 capability reads environment variables (often API keys)
- Authentication declaredNot checked: needs the live server's tools/list (a remote server declares how clients authenticate)
- 3 checks: undeclared network access, undeclared file access, undeclared process executionChecked on every scan. Results in this category are published only after a person has verified them.
- Tool descriptions presentEvery tool has a description the model and the user can read
- Statically known namesEvery tool's name could be read from the code
- Input schemasNot checked: needs the live server's tools/list (every tool declares an input schema)
- Destructive tools annotatedNot checked: needs the live server's tools/list (tools that write, delete or run commands carry destructivehint)
Dependencies with known vulnerabilities (0 in production)
No known vulnerabilities in the production dependencies that could be checked.
Past security advisories
Vulnerabilities published for this server itself, from the GitHub Advisory Database.
No security advisories have been published for this server in the GitHub Advisory Database.
How it runs
| Where it runs | On your machine, started by your MCP client from this repository or its package |
|---|---|
| Transport | stdio |
| Sign-in | not checked needs the live server |
| MCP SDK | @modelcontextprotocol/sdk ^1.32.2 |
| Servers in the code | 1 (sandbox-mcp) |
The project's own security
| Security policy | none no SECURITY.md in the repository: report issues privately through GitHub if it is enabled |
|---|---|
| Past advisories | none in the GitHub Advisory Database |
| Last push | 2026-11-15 |
| Signed releases | not checked yet |
Where it is published
| Listed in | 3 catalogs (github_search, glama, mcp_toplist) |
|---|---|
| License | MIT |
| Created | 2026-11-06 |
| Topics | ai-agents mcp mcp-server testing ui-automation windows windows-sandbox |
Attack map
How the server is built and where its risky tools lead: servers, their tools, what the tools' code can do, and the traced route from a declared risky tool's argument to the operation it reaches. Click a node for details.