VM

VMware Fusion MCP Server REST API Management

Manage VMware Fusion virtual machines with the MCP server REST API to automate provisioning, control, and monitoring.

Quick Install
npx -y @yeahdongcn/vmware-fusion-mcp-server

Overview

The VMware Fusion MCP Server is a Model Context Protocol (MCP) adapter that exposes VMware Fusion virtual machine operations as MCP tools. It runs alongside VMware Fusion’s vmrest REST API and is implemented using FastMCP, providing an easy way for developer tools, LLMs and agent frameworks to list, inspect, control and monitor Fusion VMs programmatically.

For teams automating local VM workflows, test environments, or integrating virtual machine controls into conversational agents, the MCP server consolidates common Fusion operations into a standard toolset. Use it to automate provisioning workflows, perform lifecycle operations from within editors or agents, or surface VM state to higher‑level automation systems.

Features

  • List all registered VMware Fusion virtual machines.
  • Retrieve detailed VM metadata and configuration.
  • Query current power state of a VM.
  • Perform VM power actions: on, off, suspend, pause, unpause, reset.
  • Exposes every function as MCP/LLM tools compatible with FastMCP/uvx.
  • Simple environment‑based configuration for vmrest credentials.
  • Development helpers: tests, formatting and lint targets.

Installation / Configuration

Prerequisites:

  • VMware Fusion Pro with the REST API (vmrest) enabled and running.
  • Python 3.10+
  • Recommended: uv (for running CLI tooling) and uvx (for MCP/VS Code integration).

Clone and install:

git clone https://github.com/yeahdongcn/vmware-fusion-mcp-server.git
cd vmware-fusion-mcp-server

# create environment and install dependencies (Makefile target)
make env

Start VMware Fusion REST API (vmrest). By default vmrest listens on http://localhost:8697:

# launch vmrest on the Fusion host
vmrest

Environment variables (used by the MCP server to connect to vmrest):

VariableRequiredDescription
VMREST_USERif enabledUsername for vmrest authentication
VMREST_PASSif enabledPassword for vmrest authentication
VMREST_HOSToptionalHost/URL for vmrest (default: http://localhost:8697)

Run the MCP server:

With Make:

VMREST_USER=your-username VMREST_PASS=your-password make run

With uvx (recommended for VS Code / MCP clients):

VMREST_USER=your-username VMREST_PASS=your-password uvx vmware-fusion-mcp-server

VS Code / MCP client example (.vscode/mcp.json):

{
  "mcpServers": {
    "vmware-fusion": {
      "command": "uvx",
      "args": ["vmware-fusion-mcp-server"],
      "env": {
        "VMREST_USER": "your-username",
        "VMREST_PASS": "your-password"
      }
    }
  }
}

Available Tools

The server exposes the following MCP tools (name, description, parameters):

Tool nameDescriptionParameters
list_vmsReturns a list of all Fusion VMsnone
get_vm_infoReturns detailed metadata for a VMvm_id (string)
get_vm_power_stateReturns the VM’s current power statevm_id (string)
power_vmPerform a power operation on a VMvm_id (string), action (string: on

Example tool payload (JSON) for get_vm_info:

{
  "tool": "get_vm_info",
  "params": { "vm_id": "c6f2a9b2-..." }
}

Use Cases

  • Automated test labs: programmatically start, reset and snapshot sets of Fusion VMs as part of CI job setup.
  • Local development environments: bring up and tear down VM-based services from within an editor or agent.
  • Training/demo environments: orchestrate VM state transitions for classroom or demo scenarios.
  • LLM / agent assistants: enable an assistant to inspect VM state and perform power operations through MCP tools (safer and auditable than exposing raw vmrest credentials to agents).
  • Monitoring and reporting: periodically query VM metadata and power state for dashboards or alerts.

Examples

  1. Run the MCP server and expose tools to an MCP client (uvx/VS Code):
VMREST_USER=admin VMREST_PASS=secret uvx vmware-fusion-mcp-server
  1. Example JSON invocation (MCP client) to power on a VM:
{
  "tool": "power_vm",
  "params": {
    "vm_id": "c6f2a9b2-...",
    "action": "on"
  }
}
  1. Direct vmrest (Fusion) note:
  • The MCP server wraps the vmrest endpoints. If you need to debug at the REST level, vmrest is usually available at http://localhost:8697 and you can exercise its HTTP API with curl or requests while developing.

Development & Project Structure

Common targets:

make test    # run unit/integration tests
make fmt     # format code
make lint    # lint code

Key files:

  • vmware_fusion_mcp/server.py — MCP server implementation (FastMCP)
  • vmware_fusion_mcp/vmware_client.py — vmrest REST API client
  • tests/ — unit and integration tests

License: MIT.

Notes & Troubleshooting

  • Ensure VMware Fusion’s REST API (vmrest) is enabled in Fusion Preferences > Advanced and the vmrest process is running.
  • If vmrest requires authentication, set VMREST_USER and VMREST_PASS before starting the MCP server.
  • When integrating with MCP‑aware editors or agents, run the server via uvx so it appears as an MCP server/tool provider.