Skip to main content
Glama
vmware-workstation
by mdaneri
README.md
# VMware Workstation Plugin

![VMware Workstation Plugin logo](vmware-workstation/assets/icon.svg)

[![CI](https://github.com/mdaneri/vmware-workstation-mcp/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/mdaneri/vmware-workstation-mcp/actions/workflows/ci.yml)
[![Version](https://img.shields.io/github/package-json/v/mdaneri/vmware-workstation-mcp?label=version)](package.json)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![M8ven Score](https://m8ven.ai/badge/mcp/mdaneri-vmware-workstation-mcp-1mvlu7?v=ec017e5ec7511db811106f366d3b9445)](https://m8ven.ai/mcp/mdaneri-vmware-workstation-mcp-1mvlu7?s=readme)

[![OpenAI Codex](https://img.shields.io/badge/OpenAI-Codex-412991)](#use-in-codex)
[![Claude Code](https://img.shields.io/badge/Claude-Code-D97757)](#use-in-claude-code)
[![Claude Desktop](https://img.shields.io/badge/Claude-Desktop-D97757)](#use-in-claude-desktop)

An independent Windows and Linux MCP plugin for VMware Workstation with **156 tools** for multi-VM labs, declarative VM templates, typed hardware, VMDK lifecycle, ISO media, background jobs, readiness diagnostics, VM management, OVF/OVA appliances, LAN segments, verified guest execution, file transfers, direct headless VNC/RFB console control, and optional serial consoles. It is not an official VMware or Broadcom product.

The plugin package lives in `vmware-workstation/`. Start with the [configuration guide](vmware-workstation/README.md), [native console setup](vmware-workstation/console.md), or [complete tool reference](vmware-workstation/reference.md).

See the [version history](VERSIONS.md) for changes by release and the [privacy policy](PRIVACY.md) for how the plugin handles data. The [published tool catalog](vmware-workstation/tool-schemas.json) is generated from MCP `tools/list` and contains all 156 tool names, input schemas, and annotations.

From a repository checkout, `node .` starts the committed MCP server over stdio. An MCP client can initialize it and request `tools/list` with Node.js 22.12 or later. The declared `vmware-workstation-mcp` CLI points to `vmware-workstation/server/server.cjs`. Discovery requires no dependency install, VMware installation, or credentials. To inspect the listing from a terminal, run `node vmware-workstation/server/inspect-catalog.cjs`.

## Use in Codex

Register this GitHub marketplace and install the plugin:

```powershell
codex plugin marketplace add mdaneri/vmware-workstation-mcp
codex plugin add vmware-workstation@vmware-local
```

For local development, clone the repository and register that directory instead:

```powershell
codex plugin marketplace add .
codex plugin add vmware-workstation@vmware-local
```

Restart the desktop app after installation and open a fresh local chat with VMware Workstation enabled. Ask: "List my VMware Workstation VMs." Native console operations require the one-time [per-VM console setup](vmware-workstation/console.md). The build itself does not install, enable, upload, or publish the plugin. These commands use the [local/Git marketplace flow](https://developers.openai.com/plugins/build/plugins).

Requires Windows or Linux, Node.js 22.12 or newer on PATH, and a separately installed native VMware Workstation. PowerShell 7 is used by the setup/validation helpers and Windows listener checks. Linux listener checks use `/proc` directly. See [Linux setup and WSL testing](vmware-workstation/linux.md) for native executable paths, XDG credentials and permissions. REST tools require vmrest and local credentials; guest OS operations require VMware Tools and guest credentials. Native console tools require neither a guest OS nor VMware Tools. A web/mobile-only chat cannot launch this local stdio process.

### Update the plugin

Let any plugin background jobs finish, then fully quit the desktop app and close other Codex sessions using this plugin. Run these commands from an external terminal:

```powershell
codex plugin marketplace upgrade vmware-local
codex plugin add vmware-workstation@vmware-local
codex plugin list --marketplace vmware-local --json
```

The first command refreshes the Git marketplace snapshot; `plugin add` installs from that snapshot. Running `plugin add` alone can therefore reinstall an older version. Check the listed `version`, reopen the desktop app, and start a fresh local chat with the plugin enabled. Ask it to call `a_vmware_catalog` with `{"tool":"vmrun_get_guest_ip_address"}`. Verify version `0.17.5`, `tool_count: 156`, the bounded `wait`/`timeout_seconds` fields, and the returned `a_vmware_query` route before calling the selected VM query. An older version directory remaining in the cache does not establish which version the chat uses. See [catalog diagnostics](vmware-workstation/catalog.md) if versions or tools still differ.

For a marketplace registered from a local directory, update that source directory and rebuild after source changes before running `plugin add`; `marketplace upgrade` refreshes Git-backed sources only. Use `codex plugin marketplace list` to check the registered source root.

On Windows, `failed to back up plugin cache entry: Access is denied` can occur while a Codex session holds the cached runtime open. Close the sessions using the plugin and retry from the external terminal. Do not manually delete the cache or terminate an active plugin job to force an update. The commands follow the [official Codex CLI reference](https://developers.openai.com/codex/cli/reference).

### Remove the plugin

Let plugin background jobs finish and fully quit Codex sessions using the plugin. From an external terminal:

```powershell
codex plugin remove vmware-workstation@vmware-local
codex plugin list --marketplace vmware-local --json
```

Verify that the plugin is absent from the `installed` list. Removal clears its Codex registration and cache; it does not uninstall VMware Workstation or delete your VMs or separately stored credentials.

If you no longer use the marketplace, optionally remove its registration too:

```powershell
codex plugin marketplace remove vmware-local
```

Reopen Codex after removal. Marketplace removal is separate from plugin removal; remove the plugin first.

## Use in Claude Code

```powershell
claude plugin marketplace add mdaneri/vmware-workstation-mcp
claude plugin install vmware-workstation@vmware-local
```

Requires Node.js 22.12+ and native VMware Workstation. The built server is included; no source build or npm dependency install is needed. Start a fresh session and ask: "List my VMware Workstation VMs. Do not change anything."

## Use in Claude Desktop

Download the versioned `.mcpb` from [GitHub Releases](https://github.com/mdaneri/vmware-workstation-mcp/releases), then open Settings > Extensions > Advanced settings > **Install Extension…**. Desktop supplies the compatible Node runtime; no configuration JSON edits are required. Optional settings preserve the existing local credential profiles and defaults.

See [Claude installation, configuration, updates and troubleshooting](vmware-workstation/claude-installation.md) and the [native validation record](docs/claude-validation.md). Windows and Linux hosts are supported; Linux Desktop is beta. Codex and Claude use independent caches and the same server implementation.

## Practical workflows

| Goal | Where to start |
| --- | --- |
| Deploy several VMs on a private LAN with startup dependencies | [Plan a lab, deploy explicitly, inspect status and tear down tracked resources](vmware-workstation/labs.md) |
| Inspect encryption/vTPM declarations and headless backend availability | [Read-only security inspection and feasibility limits](vmware-workstation/security.md) |
| Create a Linux, Windows Server or nested ESXi VM from a reusable recipe | [List templates, validate a read-only plan, then deploy explicitly](vmware-workstation/templates.md) |
| Configure multiple disks/NICs, CPU topology or nested virtualization | [Inspect capabilities and apply typed hardware changes](vmware-workstation/hardware.md) |
| Attach installer media or inspect boot support | [List optical drives and mount/eject an ISO](vmware-workstation/iso.md) |
| Convert/expand disks, clone VMs or sequence power actions in the background | [Submit, monitor and cancel jobs](vmware-workstation/jobs.md) |
| Wait for an OS agent, guest IP or service and collect diagnostics | [Readiness checks and diagnostic bundles](vmware-workstation/readiness.md) |
| Capture guest stdout/stderr and verify its exit code | [Run a program or script with guest_exec](vmware-workstation/guest-exec.md) |

## Develop

```powershell
npm ci
npm run build
npm test
npm run smoke
npm run validate
npm run package
```

`src/workstation.mjs` wraps vmrun with separate executable arguments and no shell. `src/server.mjs` registers the MCP tools using the official MCP SDK. `src/console.mjs` manages direct RFB sessions; `rfb2` has no runtime dependencies, and `pngjs` encodes only VM framebuffer pixels. `npm run build` bundles runtime dependencies into the plugin so installation requires Node but no npm download. Rebuild after changing source.

The plugin implements all **47 reference vmrun commands and 28 reference REST operations**, plus two read-only security inspection tools, six multi-VM lab tools, four declarative template tools, blank VM creation, backed-up VMX editing, six direct VNC/RFB console tools, five LAN segment tools, ten OVF/job tools, reusable job submission, nine disk tools, six optional serial tools, five readiness/diagnostics tools, verified guest execution, five ISO/boot tools, three typed hardware tools, convenience tools, and coverage discovery: **156 tools**. All 150 previous tool definitions are checked against saved baselines; `get_guest_ip` adds optional bounded-wait fields and updated guidance. Earlier `create_vm` additions remain optional. Setup, credentials, and runnable examples are in the [practical guide](vmware-workstation/README.md), the [console guide](vmware-workstation/console.md), and the [operation reference](vmware-workstation/reference.md).

Tests use a fake process runner, temporary VMX files, and a mock HTTP service. They do not change real VMs. The smoke script starts the actual bundled MCP process, discovers tools, and reads host status/inventory. If a running VM exists it reads selected hardware, snapshots, Tools state, and guest IP. It also reads host networks and checks the installed command coverage. It never powers VMs on/off or changes snapshots. `npm run smoke:rest` reads VM and network inventory from the real REST service after credentials are configured.

Packaging writes `dist/vmware-workstation-0.17.5.zip`, `dist/vmware-workstation-0.17.5.mcpb` and SHA-256 checksums, and verifies their allowlisted entries and contents on both hosts. It includes one plugin and excludes source development dependencies, test VMs/credentials, and the repo marketplace.

## Validation

Serial tests use two independent local stream test doubles through the bundled MCP server, including native Windows pipe PID checks and native Linux UNIX socket/process checks. They cover byte fidelity, endpoint rejection, bounds, cancellation and offline backups. The opt-in disposable ISO test is provided but has not been run against a VMware guest. See [serial validation and limitations](vmware-workstation/serial.md#validation).

On 2026-11-02, the [live VMDK workflow](vmware-workstation/disks.md#validation) passed on Windows/Workstation 26.0.1: create/inspect/expand, local types 0–3 and streaming type 5 conversion, backed-up attach/detach, compact and defragment. Conversion preserved the source hash and detach preserved the backing hash. Only new disposable targets were mutated; the existing running VM set was unchanged. No guest partition/filesystem resize or native Linux VMware mutation is claimed.

On 2026-11-02, Workstation 26.0.1 build 25688693 was verified to expose native per-VM RFB 3.8 with VNC password authentication and a 127.0.0.1 listener. The opt-in live console test connected to new BIOS and UEFI VMs simultaneously, captured their firmware displays, and verified RFB keys changed both displays while a non-VMware app stayed foreground in all 142 observed samples. Click/type/scroll/status calls also completed. Test VMs were stopped, VNC disabled, and temporary credentials deleted. No host screenshot, mouse/keyboard injection, or window activation was used. An actual PXE server and OS installation ISO were not part of that run.

The automated suite adds RFB 3.3/3.7/3.8 authentication, framebuffer pixels, multi-VM isolation, key modifiers, resize handling, listener/credential rejection, and file permission preparation checks to the original VM/REST tests. `npm run validate` checks the 156 tool schemas, the original 87-tool, pre-OVF 98-tool and pre-disk 108-tool and pre-serial 117-tool and pre-readiness 123-tool and pre-guest-exec 128-tool and pre-ISO 129-tool and pre-hardware 134-tool and pre-jobs 137-tool and pre-template 138-tool and pre-lab 142-tool and pre-security 148-tool and pre-catalog 150-tool baselines, and platform credential-file protection. Graphical console input/capture uses RFB; the read-only focus observer exists only in the opt-in live test.

The automated suite covers all 47 CLI argument contracts, all 28 REST request contracts, direct RFB sessions, VM configuration, Linux credential permissions and native socket ownership. CI runs tests and package validation on Windows and Ubuntu without requiring VMware or accessing a real VM. Linux integration tests use the bundled MCP process, actual Linux subprocesses and authenticated RFB test doubles; a native Linux VMware hypervisor has not been live-validated.

Live validation also exercised blank VM creation with a real sparse disk, memory/CPU/display-name edits, and snapshot create/revert/delete on an isolated powered-off VM. The opt-in scripts save machine-specific evidence under ignored `test-vms/`; local credentials, VM files, and screenshots are not published in this repository.

The real REST service and authenticated guest execution/file transfers still require configured credentials and a guest with running VMware Tools. Their request/execution contracts were tested with mocks, not claimed as live end-to-end validation. The blank test VM has no installed OS. The new guest execution runner also has native Windows/Linux tests and an [opt-in disposable clone harness](vmware-workstation/guest-exec.md#validation); this feature has not been live-validated against VMware guests.

## Contributing and license

See [CONTRIBUTING.md](CONTRIBUTING.md) for development and testing and [SECURITY.md](SECURITY.md) for private vulnerability reporting.

Original project code is available under the [MIT license](LICENSE). Bundled dependencies retain their own [third-party licenses](vmware-workstation/THIRD-PARTY-NOTICES.md). VMware executables, VM images, and installation media are not included; see [NOTICE.md](NOTICE.md).