SuperAPIAI Directory

vmware-sandbox-mcp

github.com · AI developer platforms

vmware-sandbox-mcp is an MCP protocol-based server that lets AI agents such as Claude create disposable Linux virtual machine sandboxes on a local VMware Workstation. Through 18 tools, the agent can create virtual machines, execute commands, copy files, view the screen, click, scroll, drag, type, save and roll back snapshots, and destroy sandboxes, all without directly touching VMware. Each sandbox is a full virtual machine with its own kernel, cloned from a clean snapshot and deleted after use. The server can only operate virtual machines it created itself, and before first boot it removes shared folders, clipboard, USB, CD-ROM drive, and so on; network access must be explicitly requested, and web mode can isolate the home network. All operations are written to an audit log that the agent cannot read or modify. The project requires a Windows host, VMware Workstation Pro, Python 3.11+, and a Debian base image; the current version is 0.1, not yet published to PyPI, and it is under the MIT license.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsWindows · Linux

About this tool

vmware-sandbox-mcp is an MCP (Model Context Protocol) server whose goal is to give AI agents a disposable computer. It runs on the user's own Windows PC and uses VMware Workstation to create real Linux virtual machines, letting the agent execute installation scripts, run unknown software packages, or operate desktop programs inside them, then destroy them afterward, avoiding risk on the host machine.

Purpose and positioning This project targets scenarios where AI agents need to safely execute untrusted code or perform desktop interaction. Unlike containers, each sandbox is a full virtual machine with its own kernel, cloned from a pre-prepared clean snapshot; on the test machine creation takes about 25 seconds, and destruction leaves no trace. The agent does not touch VMware itself and only gets 18 ordinary tools, so this is not a general-purpose VMware management server.

Main capabilities Tool coverage: create a computer, run commands, copy files in and out, view the screen, click, scroll, drag, type, save checkpoints and roll back, destroy the sandbox. Keyboard- and mouse-related tools are disabled by default and must be enabled manually.

Isolation and security design The server can only operate virtual machines it created itself; this restriction is enforced in code and covered by tests; the base virtual machine can only be read and cloned, not started, modified, or deleted. Before first boot, clones have their settings rewritten to remove shared folders, clipboard, drag-and-drop, USB, CD-ROM drive, and sound; without a requested network there is no network. Web mode rejects private addresses, host addresses, and non-web ports, and can also be restricted to a specified list of sites. File copying is confined to a single transfer folder, rejecting path traversal, links, and malicious archives. Text supplied by the agent never enters the command line of the host or the sandbox. All commands, file copies, clicks, and network requests are written to an audit log that the agent cannot read or modify. There are also command timeouts, a cap on the number of sandboxes, and automatic cleanup of old and orphaned sandboxes.

Usage Environment requirements: a Windows host, VMware Workstation Pro and its vmrun command-line tool (developed and tested on Workstation 25H2 on Windows 11, vmrun 1.17.0; Linux hosts are not supported), Python 3.11 or newer, and a Linux virtual machine to use as the base image (Debian 13 was used for testing).

Step one: prepare the base virtual machine (Only once). Create a Debian virtual machine in VMware Workstation, run scripts/prepare-base-vm.sh inside it to install guest tools, sudo, and common tools, and set up automatic desktop login, then shut it down completely and create a snapshot named clean.

Step 2: Add the server to an MCP client. Taking Claude Code as an example, configure it in .mcp.json; for Claude Desktop configuration, see the setup guide. The package has not yet been published to PyPI, so you can install it directly from the repository using uvx or pip.

Step 3: Check the configuration. After setting the same environment variables in a terminal, run the check command; it verifies the setup, creates a test sandbox, executes a command, and deletes it, and prints a fix suggestion for each problem.

Step 4: Have the agent create a sandbox and execute tasks.

All configuration is done through environment variables. If they are missing or incorrect, the server will still start so that clients can list the tools, but all tool calls will be rejected with an explanation of the reason, and nothing will be created or touched; vmware-sandbox-mcp doctor can show what needs to be fixed. The clone folder, transfer folder, and base virtual machine folder must not overlap, and the server checks this at startup.

Use cases For example: put an install.sh found on a forum into a sandbox and give it network access, first observe what it actually does before deciding whether to run it in a real environment; start a sandbox, install nginx, and host a folder, and verify that the page loads; open a text editor in the sandbox, enter content, save it, and take a screenshot.

Limitations and current status The project version is 0.1; it is usable and has been tested, but it is still young. It has only been tested on one environment combination: Windows 11, VMware Workstation 25H2, and a Debian 13 guest. It has not yet been published to PyPI. The keyboard and mouse tools assume a US keyboard layout. The isolation level of the sandbox is equivalent to that of the VMware virtual machine itself; nat mode can access the local network; anything brought out of the sandbox is untrusted. Planned improvements include isolating each web sandbox from the others and publishing a PyPI version. There are more than 450 unit tests, which use fake processes in place of vmrun, can run without installing VMware, and are executed via GitHub Actions on every push; end-to-end tests require a real base virtual machine and environment variables to be set. The project uses the MIT license.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools