A MCP server for managing VMware Fusion VMs via REST API
Project description
VMware Fusion MCP Server
A Model Context Protocol (MCP) server for managing VMware Fusion virtual machines via the Fusion REST API, built with FastMCP.
Features
- List VMs: View all VMs registered in VMware Fusion.
- Get VM Info: Retrieve detailed information about a specific VM.
- Power Operations: Perform power actions (on, off, suspend, pause, unpause, reset) on a VM.
- Get Power State: Query the current power state of a VM.
- Modern MCP/LLM Integration: Exposes all features as MCP tools for LLMs and agent frameworks.
Prerequisites
- VMware Fusion Pro (with REST API enabled)
- Python 3.10+
- uv (recommended) or pip
- uvx (for VS Code/LLM integration)
Installation
-
Clone the repository:
git clone https://github.com/yeahdongcn/vmware-fusion-mcp-server.git cd vmware-fusion-mcp-server
-
Set up the environment and install dependencies:
make env
VMware Fusion Setup
-
Enable the REST API:
- Open VMware Fusion > Preferences > Advanced
- Check "Enable REST API"
- Note the API port (default: 8697)
-
Start the REST API service:
vmrest
The API will be available at
http://localhost:8697by default.
Configuration
The server connects to VMware Fusion's REST API at http://localhost:8697 by default. You must configure authentication for the vmrest API using environment variables:
VMREST_USER: Username for the vmrest API (required if authentication is enabled)VMREST_PASS: Password for the vmrest API (required if authentication is enabled)
These must be set in your shell, in your VS Code MCP config, or in your deployment environment.
Example: MCP server config for VS Code with credentials
{
"mcpServers": {
"vmware-fusion": {
"command": "uvx",
"args": ["vmware-fusion-mcp-server"],
"env": {
"VMREST_USER": "your-username",
"VMREST_PASS": "your-password"
}
}
}
}
- Set
VMREST_USERandVMREST_PASSto your vmrest credentials.
Usage
Run the MCP Server
With Make
VMREST_USER=your-username VMREST_PASS=your-password make run
With uvx (recommended for VS Code/LLM)
VMREST_USER=your-username VMREST_PASS=your-password uvx vmware-fusion-mcp-server
VS Code / LLM Integration
To use this server as a tool provider in VS Code (or any MCP-compatible client):
-
Install uvx:
uv pip install uvx
-
Add to your MCP server config (e.g.,
.vscode/mcp.json):{ "mcpServers": { "vmware-fusion": { "command": "uvx", "args": ["vmware-fusion-mcp-server"], "env": { "VMREST_USER": "your-username", "VMREST_PASS": "your-password" } } } }
- Set
VMREST_USERandVMREST_PASSto your vmrest credentials. - You can now use the VMware Fusion tools in any MCP-enabled LLM or agent in VS Code.
- Set
MCP Tools
list_vms
- Description: List all VMs in VMware Fusion.
- Parameters: None
get_vm_info
- Description: Get detailed information about a specific VM.
- Parameters:
vm_id(string): The ID of the VM
power_vm
- Description: Perform a power action on a VM.
- Parameters:
vm_id(string): The ID of the VMaction(string): One of: "on", "off", "suspend", "pause", "unpause", "reset"
get_vm_power_state
- Description: Get the power state of a specific VM.
- Parameters:
vm_id(string): The ID of the VM
Development
Run Tests
make test
Format Code
make fmt
Lint
make lint
Project Structure
vmware_fusion_mcp/server.py- Main FastMCP server implementationvmware_fusion_mcp/vmware_client.py- VMware Fusion REST API clienttests/- Unit and integration tests
License
MIT License - see LICENSE for details.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests and linting:
make test && make lint - Submit a pull request
References
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vmware_fusion_mcp_server-0.1.5.tar.gz.
File metadata
- Download URL: vmware_fusion_mcp_server-0.1.5.tar.gz
- Upload date:
- Size: 60.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c24b54266af311cc69fa8645012ef4bac868232b8c95a268c04eae8a97fb9903
|
|
| MD5 |
74b4d13991e3cfc8b814307f840de441
|
|
| BLAKE2b-256 |
fe8e00da750b7aac8624fa74cc177b67f49f4bf8add17486f1b107884928efdc
|
File details
Details for the file vmware_fusion_mcp_server-0.1.5-py3-none-any.whl.
File metadata
- Download URL: vmware_fusion_mcp_server-0.1.5-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0c78b55d37d0a1baa403977c84232ec32821e6f464d6413ec3ae2b9307fb53e
|
|
| MD5 |
97795164f28caf8aadc4834c65a2b82f
|
|
| BLAKE2b-256 |
f38f944f4032b04e7b73713bf9fea241b8fcd5113bac7b1aa6f3a485c39009fa
|