vmware-workstation-mcp
Provides tools to control VMware Workstation Pro/Player and VMware Fusion through vmrun, including VM discovery, power lifecycle, snapshots, cloning, guest OS operations, screen capture, host networking, and shared folder management.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@vmware-workstation-mcp start my ubuntu-lab VM and tell me its IP address"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
vmware-workstation-mcp
English | 简体中文
Note: This repository (
vmware-workstation-mcp-test) is a public experimental release for testing and community feedback.
A lightweight, zero-daemon Model Context Protocol (MCP) server that lets AI agents (Antigravity, Claude Desktop, Cursor, Windsurf, etc.) control VMware Workstation Pro / Player / Fusion through VMware's native vmrun utility.
Why This Server?
Zero Daemon & Minimal Dependency: Talks directly to
vmrunover local Stdio JSON-RPC. Novmrestbackground service, no plaintext.vmrestCfgcredentials, and only a single Python dependency (mcp>=1.2.0).Windows CJK / Non-UTF-8 Safe: Automatically decodes
inventory.vmls,.vmx, andvmrunoutput with UTF-8 → GB18030/CP936 fallback, preventingUnicodeDecodeErrorand mojibake on Chinese/CJK Windows hosts.Fuzzy VM Name Resolution: Pass a short name, display name, folder name, or unique keyword (e.g.
"ubuntu-lab") instead of typing full.vmxpaths with spaces or Unicode characters.Strict Stdio Isolation: All diagnostic logs go exclusively to
sys.stderr, keepingsys.stdoutspotless for MCP JSON-RPC framing.Built-in Safety Guardrails: Intentionally omits
deleteVM, masks-gp/-vppasswords in logs/errors, usesshell=Falsesubprocess lists, and requires explicitconfirm=Truefor destructive or state-discarding actions.
Related MCP server: VMware Workstation MCP
Architecture
flowchart LR
CLIENT["MCP Client (Antigravity / Claude / Cursor)"] <-->|"Stdio JSON-RPC"| SERVER["vmware-mcp (FastMCP)"]
SERVER -->|"Logs only"| STDERR["sys.stderr"]
SERVER -->|"Read-only UTF-8/GB18030 Parse"| META["inventory.vmls & *.vmx"]
SERVER -->|"subprocess (shell=False)"| VMRUN["vmrun / vmrun.exe"]
VMRUN -->|"VIX Control"| VM["VMware Workstation / Fusion"]
VM -->|"VMware Tools"| GUEST["Guest OS (Linux / Windows)"]Requirements
Python: 3.10 or newer
Hypervisor: VMware Workstation Pro / Player (Windows/Linux) or VMware Fusion (macOS) with
vmruninstalledVMware Tools (optional): Required inside guest VMs only for guest-level tools (
get_guest_ip,run_command_in_guest,run_script_in_guest,copy_file_*,list_processes_in_guest)
Installation
Option 1: Install from GitHub
pip install git+https://github.com/0D0-1yp0/vmware-workstation-mcp-test.gitOption 2: Clone and Install Locally (Editable)
git clone https://github.com/0D0-1yp0/vmware-workstation-mcp-test.git
cd vmware-workstation-mcp-test
pip install -e .Verify the installation:
python -m unittest discover -s tests -vMCP Client Configuration
Antigravity / Claude Desktop / Cursor (mcp_config.json)
Using the installed console script (vmware-mcp) or module invocation (python -m vmware_mcp):
{
"mcpServers": {
"vmware-mcp": {
"command": "python",
"args": ["-u", "-m", "vmware_mcp"],
"env": {
"PYTHONUTF8": "1",
"PYTHONIOENCODING": "utf-8"
}
}
}
}Windows Tip: If
vmrun.exeis installed in a non-standard directory or you have multiple Python environments, pass the absolute Python executable path (e.g.C:\\Python312\\python.exe) and optionally setVMWARE_VMRUN_PATHinenv.
Environment Variables (All Optional)
Variable | Description | Default |
| Explicit path to | Auto-detected via |
| Value passed to |
|
| Extra VM directories to scan (separated by | Standard VMware VM folders + |
Available Tools (22)
1. Asset Discovery & Status (4)
Tool | Description |
| List all discovered VMs (inventory + folders + running state) with optional |
| List currently running VMs via |
| Get |
| Query the guest OS IP address (supports |
2. Power Lifecycle (4)
Tool | Description | Safety Guardrail |
| Start a VM in | — |
| Power off a VM ( |
|
| Reboot a VM ( |
|
|
| — |
3. Snapshot Management (4)
Tool | Description | Safety Guardrail |
| List snapshots (flat or | — |
| Create a named snapshot | — |
| Revert a VM back to a named snapshot | Requires |
| Delete a snapshot (optional | Requires |
4. Guest OS Operations & Diagnostics (6)
Tool | Description |
| Execute a binary inside the guest OS ( |
| Run inline script text inside the guest OS ( |
| List running processes inside the guest OS |
| Copy a file from host to guest |
| Copy a file from guest to host |
| Capture the live VM display to a PNG file on the host (great for multimodal agents) |
5. Host Networks & Shared Folders (3)
Tool | Description |
| List |
| Add/update ( |
|
|
6. Cloning (1)
Tool | Description |
| Create a |
Testing
# Default offline test suite (unit tests + real MCP stdio protocol handshake, no VMware required)
python -m unittest discover -s tests -v
# Optional read-only live tests against a local VMware installation
RUN_LIVE_VMWARE_TESTS=1 python -m unittest discover -s tests -vSecurity
See SECURITY.md for guardrail details, credential handling, and vulnerability reporting.
License
Released under the MIT License.
Available Tools
22 toolscapture_vm_screenA
Capture the current display of a running VM to a local PNG file (captureScreen).
Args: vm: VM name, substring, or full .vmx path. output_path: Optional host PNG file path. Defaults to /vmware-mcp-screens/_.png.
Inputs: vm (required), output_path. Returns: object
clone_vmA
Create a linked or full clone of a VM (vmrun clone).
Args: vm: Source VM name, substring, or full .vmx path. dest_vmx_path: Destination .vmx file path for the cloned VM. clone_type: 'linked' (fast, shares base disk) or 'full' (independent copy). snapshot_name: Optional source snapshot name to clone from. clone_name: Optional display name for the new clone.
Inputs: vm (required), dest_vmx_path (required), clone_name, clone_type, +1 more. Returns: object
copy_file_guest_to_hostB
Copy a file from the guest OS to the host (CopyFileFromGuestToHost).
Args: vm: VM name, substring, or full .vmx path. guest_path: Source file path inside the guest OS. host_path: Destination file path on the host (parent dirs created automatically). guest_user: Guest OS username. guest_password: Guest OS password (masked in logs/responses).
Inputs: vm (required), host_path (required), guest_path (required), guest_user, +1 more. Returns: object
copy_file_host_to_guestA
Copy a file from the host to the guest OS (CopyFileFromHostToGuest).
Args: vm: VM name, substring, or full .vmx path. host_path: Existing source file path on the host. guest_path: Destination file path inside the guest OS. guest_user: Guest OS username. guest_password: Guest OS password (masked in logs/responses).
Inputs: vm (required), host_path (required), guest_path (required), guest_user, +1 more. Returns: object
create_snapshotC
Create a named snapshot of a VM.
Args: vm: VM name, substring, or full .vmx path. name: Snapshot name.
Inputs: vm (required), name (required). Returns: object
delete_snapshotA
Delete a named snapshot from a VM.
Args: vm: VM name, substring, or full .vmx path. name: Exact snapshot name to remove. delete_children: Also delete child snapshots when True. confirm: Must be True to confirm permanent snapshot deletion.
Inputs: vm (required), name (required), confirm, delete_children. Returns: object
get_guest_ipA
Query the guest OS IP address of a running VM (requires VMware Tools).
Args: vm: VM display name, folder name, unique substring, or full .vmx path. wait: If True, wait until an IP address becomes available (up to 60s).
Inputs: vm (required), wait. Returns: object
get_vm_infoA
Get detailed info for a VM: .vmx specs, running status, VMware Tools state, and guest IP.
Args: vm: VM display name, folder name, unique substring, or full .vmx path.
Inputs: vm (required). Returns: object
list_host_networksA
List VMware host virtual networks (vmnet*) and their NAT port forwarding rules.
Inputs: no named parameters. Returns: object
list_processes_in_guestB
List running processes inside the guest OS (listProcessesInGuest).
Args: vm: VM name, substring, or full .vmx path. guest_user: Guest OS username. guest_password: Guest OS password (masked in logs/responses).
Inputs: vm (required), guest_user, guest_password. Returns: object
list_running_vmsA
List all currently running VMware VMs via vmrun list.
Inputs: no named parameters. Returns: object
list_snapshotsA
List snapshots for a VM.
Args: vm: VM name, substring, or full .vmx path. show_tree: Return indented snapshot hierarchy when True.
Inputs: vm (required), show_tree. Returns: object
list_vmsB
List all discovered VMware VMs (from inventory, VM folders, and running state).
Args: include_specs: Include parsed .vmx specs (guest OS, vCPUs, memory MB, NICs).
Inputs: include_specs. Returns: object
manage_port_forwardingB
Add/update or delete a NAT port forwarding rule on a VMware host network (e.g. vmnet8).
Args: network: Host network name (e.g. 'vmnet8'). action: 'set' to add/update, 'delete' to remove. protocol: 'tcp' or 'udp'. host_port: Host TCP/UDP port number (1-65535). guest_ip: Guest IP address (required when action='set'). guest_port: Guest port number 1-65535 (required when action='set'). description: Optional rule description (only for action='set').
Inputs: action (required), network (required), protocol (required), host_port (required), +3 more. Returns: object
power_state_vmB
Suspend, pause, or unpause a VM.
Args: vm: VM name, substring, or full .vmx path. action: One of 'suspend', 'pause', or 'unpause'.
Inputs: vm (required), action (required). Returns: object
reset_vmA
Reset (reboot) a running VM.
Args: vm: VM name, substring, or full .vmx path. hard: False for graceful guest reboot; True for immediate hard reset. confirm: Must be True when hard=True (safety guardrail).
Inputs: vm (required), hard, confirm. Returns: object
revert_to_snapshotA
Revert a VM back to a named snapshot (discards unsaved current state).
Args: vm: VM name, substring, or full .vmx path. name: Exact snapshot name to revert to. confirm: Must be True to confirm discarding current VM state.
Inputs: vm (required), name (required), confirm. Returns: object
run_command_in_guestA
Run an executable inside the guest OS via VMware Tools (runProgramInGuest).
Args: vm: VM name, substring, or full .vmx path. program_path: Absolute path to the executable inside the guest OS. args: Optional list of program arguments. guest_user: Guest OS username. guest_password: Guest OS password (masked in logs/responses). no_wait: Return immediately without waiting for the program to exit. interactive: Launch in the interactive desktop session. timeout: Subprocess timeout in seconds.
Inputs: vm (required), program_path (required), args, no_wait, +4 more. Returns: object
run_script_in_guestA
Execute inline script text inside the guest OS (runScriptInGuest).
Note: vmrun itself does not stream guest stdout back to the host; redirect
output to a file inside the guest and retrieve it with copy_file_guest_to_host
if you need full stdout capture.
Args: vm: VM name, substring, or full .vmx path. interpreter: Interpreter absolute path in guest (e.g. '/bin/bash' or 'C:\Windows\System32\cmd.exe'). script_text: Script body to execute. guest_user: Guest OS username. guest_password: Guest OS password (masked in logs/responses). no_wait: Return immediately without waiting for completion. timeout: Subprocess timeout in seconds.
Inputs: vm (required), interpreter (required), script_text (required), no_wait, +3 more. Returns: object
start_vmA
Start a VM in GUI or headless (nogui) mode.
Args: vm: VM name, substring, or full .vmx path. gui: True to open the VMware window; False for background headless mode.
Inputs: vm (required), gui. Returns: object
stop_vmA
Stop (power off) a running VM.
Args: vm: VM name, substring, or full .vmx path. hard: False for graceful soft shutdown; True for immediate hard power-off. confirm: Must be True when hard=True (safety guardrail against data loss).
Inputs: vm (required), hard, confirm. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 22 tools
Most tools target a distinct resource+action (snapshots, guest file copy, guest command execution, networking). The only mild overlaps are list_vms vs list_running_vms and reset_vm vs stop_vm/start_vm, but descriptions clearly differentiate them (all discovered vs running only; reboot vs power cycle).
Strong verb_noun convention throughout (list_snapshots, create_snapshot, copy_file_host_to_guest, run_command_in_guest). The lone deviation is power_state_vm, which uses a noun phrase instead of a verb, but the rest are highly predictable.
22 tools is on the heavier side but the domain is genuinely broad: VM lifecycle, snapshots, guest operations, file transfer, networking, shared folders, and cloning. Each tool earns its place, though a few could theoretically be collapsed (e.g. power_state_vm into stop/start).
Lifecycle, snapshots, guest ops, networking, and cloning are covered well. However, there is no delete_vm or unregister tool and no create-from-scratch tool (only clone_vm), leaving dead ends for VM removal and fresh VM creation.
Maintenance
Related MCP Connectors
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
MCP server for AI dialogue using various LLM models via AceDataCloud
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Related MCP Servers
- AlicenseBqualityDmaintenanceMCP server for controlling VMware Fusion/Workstation virtual machines via vmrun CLI, providing 32 tools for VM lifecycle, guest execution, and file operations without requiring a REST API daemon.3265 npm7MIT
- AlicenseBqualityDmaintenanceA stdio MCP server that controls VMware Workstation via vmrun, enabling VM lifecycle management and snapshot operations.14MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that gives an LLM full control over a VMware-hosted Windows VM: lifecycle, snapshots, remote execution, file transfer, and kernel debugging.MIT
- FlicenseNot gradedqualityBmaintenanceEnables management of VMware Workstation virtual machines, including lifecycle and snapshot operations, through MCP tools accessible by AI assistants.-