vmware-fusion-mcp-server


Namevmware-fusion-mcp-server JSON
Version 0.1.5 PyPI version JSON
download
home_pageNone
SummaryA MCP server for managing VMware Fusion VMs via REST API
upload_time2025-07-09 10:47:02
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords agents ai automation fusion mcp model-context-protocol vmware
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # VMware Fusion MCP Server

<p align="center">
<a href="https://pypi.org/project/vmware-fusion-mcp-server/"><img src="https://img.shields.io/pypi/v/vmware-fusion-mcp-server?color=%2334D058&label=pypi" alt="PyPI version" /></a>
<a href="https://pypi.org/project/vmware-fusion-mcp-server/"><img src="https://img.shields.io/pypi/pyversions/vmware-fusion-mcp-server.svg?color=brightgreen" alt="Python versions" /></a>
<a href="https://github.com/yeahdongcn/vmware-fusion-mcp-server/issues"><img src="https://img.shields.io/github/issues-raw/yeahdongcn/vmware-fusion-mcp-server" alt="GitHub Issues" /></a>
<a href="https://pepy.tech/projects/vmware-fusion-mcp-server"><img alt="Pepy Total Downloads" src="https://img.shields.io/pepy/dt/vmware-fusion-mcp-server?label=pypi%20%7C%20downloads&color=brightgreen"/></a>
<a href="https://github.com/yeahdongcn/vmware-fusion-mcp-server/blob/main/LICENSE"><img src="https://img.shields.io/pypi/l/vmware-fusion-mcp-server?color=brightgreen" alt="License" /></a>
</p>

A Model Context Protocol (MCP) server for managing VMware Fusion virtual machines via the Fusion REST API, built with [FastMCP](https://github.com/jlowin/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](https://github.com/astral-sh/uv)** (recommended) or pip
- **[uvx](https://github.com/modelcontextprotocol/uvx)** (for VS Code/LLM integration)

---

## Installation

1. **Clone the repository:**
   ```bash
   git clone https://github.com/yeahdongcn/vmware-fusion-mcp-server.git
   cd vmware-fusion-mcp-server
   ```

2. **Set up the environment and install dependencies:**
   ```bash
   make env
   ```

---

## VMware Fusion Setup

1. **Enable the REST API:**
   - Open VMware Fusion > Preferences > Advanced
   - Check "Enable REST API"
   - Note the API port (default: 8697)

2. **Start the REST API service:**
   ```bash
   vmrest
   ```
   The API will be available at `http://localhost:8697` by 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

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

- Set `VMREST_USER` and `VMREST_PASS` to your vmrest credentials.

---

## Usage

### Run the MCP Server

#### With Make

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

#### With uvx (recommended for VS Code/LLM)

```bash
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):

1. **Install [uvx](https://github.com/modelcontextprotocol/uvx):**
   ```bash
   uv pip install uvx
   ```

2. **Add to your MCP server config (e.g., `.vscode/mcp.json`):**
   ```json
   {
     "mcpServers": {
       "vmware-fusion": {
         "command": "uvx",
         "args": ["vmware-fusion-mcp-server"],
         "env": {
           "VMREST_USER": "your-username",
           "VMREST_PASS": "your-password"
         }
       }
     }
   }
   ```
   - Set `VMREST_USER` and `VMREST_PASS` to your vmrest credentials.
   - You can now use the VMware Fusion tools in any MCP-enabled LLM or agent in VS Code.

---

## 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 VM
  - `action` (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

```bash
make test
```

### Format Code

```bash
make fmt
```

### Lint

```bash
make lint
```

---

## Project Structure

- `vmware_fusion_mcp/server.py` - Main FastMCP server implementation
- `vmware_fusion_mcp/vmware_client.py` - VMware Fusion REST API client
- `tests/` - Unit and integration tests

---

## License

MIT License - see [LICENSE](LICENSE) for details.

---

## Contributing

1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Run tests and linting: `make test && make lint`
5. Submit a pull request

---

## References

- [FastMCP Documentation](https://gofastmcp.com/)
- [Model Context Protocol](https://modelcontextprotocol.io/)
- [uvx](https://github.com/modelcontextprotocol/uvx)
- [fetch server example](https://github.com/modelcontextprotocol/servers/tree/main/src/fetch)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "vmware-fusion-mcp-server",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "Xiaodong Ye <yeahdongcn@gmail.com>",
    "keywords": "agents, ai, automation, fusion, mcp, model-context-protocol, vmware",
    "author": null,
    "author_email": "Xiaodong Ye <yeahdongcn@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/fe/8e/00da750b7aac8624fa74cc177b67f49f4bf8add17486f1b107884928efdc/vmware_fusion_mcp_server-0.1.5.tar.gz",
    "platform": null,
    "description": "# VMware Fusion MCP Server\n\n<p align=\"center\">\n<a href=\"https://pypi.org/project/vmware-fusion-mcp-server/\"><img src=\"https://img.shields.io/pypi/v/vmware-fusion-mcp-server?color=%2334D058&label=pypi\" alt=\"PyPI version\" /></a>\n<a href=\"https://pypi.org/project/vmware-fusion-mcp-server/\"><img src=\"https://img.shields.io/pypi/pyversions/vmware-fusion-mcp-server.svg?color=brightgreen\" alt=\"Python versions\" /></a>\n<a href=\"https://github.com/yeahdongcn/vmware-fusion-mcp-server/issues\"><img src=\"https://img.shields.io/github/issues-raw/yeahdongcn/vmware-fusion-mcp-server\" alt=\"GitHub Issues\" /></a>\n<a href=\"https://pepy.tech/projects/vmware-fusion-mcp-server\"><img alt=\"Pepy Total Downloads\" src=\"https://img.shields.io/pepy/dt/vmware-fusion-mcp-server?label=pypi%20%7C%20downloads&color=brightgreen\"/></a>\n<a href=\"https://github.com/yeahdongcn/vmware-fusion-mcp-server/blob/main/LICENSE\"><img src=\"https://img.shields.io/pypi/l/vmware-fusion-mcp-server?color=brightgreen\" alt=\"License\" /></a>\n</p>\n\nA Model Context Protocol (MCP) server for managing VMware Fusion virtual machines via the Fusion REST API, built with [FastMCP](https://github.com/jlowin/fastmcp).\n\n---\n\n## Features\n\n- **List VMs**: View all VMs registered in VMware Fusion.\n- **Get VM Info**: Retrieve detailed information about a specific VM.\n- **Power Operations**: Perform power actions (on, off, suspend, pause, unpause, reset) on a VM.\n- **Get Power State**: Query the current power state of a VM.\n- **Modern MCP/LLM Integration**: Exposes all features as MCP tools for LLMs and agent frameworks.\n\n---\n\n## Prerequisites\n\n- **VMware Fusion Pro** (with REST API enabled)\n- **Python 3.10+**\n- **[uv](https://github.com/astral-sh/uv)** (recommended) or pip\n- **[uvx](https://github.com/modelcontextprotocol/uvx)** (for VS Code/LLM integration)\n\n---\n\n## Installation\n\n1. **Clone the repository:**\n   ```bash\n   git clone https://github.com/yeahdongcn/vmware-fusion-mcp-server.git\n   cd vmware-fusion-mcp-server\n   ```\n\n2. **Set up the environment and install dependencies:**\n   ```bash\n   make env\n   ```\n\n---\n\n## VMware Fusion Setup\n\n1. **Enable the REST API:**\n   - Open VMware Fusion > Preferences > Advanced\n   - Check \"Enable REST API\"\n   - Note the API port (default: 8697)\n\n2. **Start the REST API service:**\n   ```bash\n   vmrest\n   ```\n   The API will be available at `http://localhost:8697` by default.\n\n---\n\n## Configuration\n\nThe 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:\n\n- `VMREST_USER`: Username for the vmrest API (required if authentication is enabled)\n- `VMREST_PASS`: Password for the vmrest API (required if authentication is enabled)\n\nThese must be set in your shell, in your VS Code MCP config, or in your deployment environment.\n\n### Example: MCP server config for VS Code with credentials\n\n```json\n{\n  \"mcpServers\": {\n    \"vmware-fusion\": {\n      \"command\": \"uvx\",\n      \"args\": [\"vmware-fusion-mcp-server\"],\n      \"env\": {\n        \"VMREST_USER\": \"your-username\",\n        \"VMREST_PASS\": \"your-password\"\n      }\n    }\n  }\n}\n```\n\n- Set `VMREST_USER` and `VMREST_PASS` to your vmrest credentials.\n\n---\n\n## Usage\n\n### Run the MCP Server\n\n#### With Make\n\n```bash\nVMREST_USER=your-username VMREST_PASS=your-password make run\n```\n\n#### With uvx (recommended for VS Code/LLM)\n\n```bash\nVMREST_USER=your-username VMREST_PASS=your-password uvx vmware-fusion-mcp-server\n```\n\n---\n\n## VS Code / LLM Integration\n\nTo use this server as a tool provider in VS Code (or any MCP-compatible client):\n\n1. **Install [uvx](https://github.com/modelcontextprotocol/uvx):**\n   ```bash\n   uv pip install uvx\n   ```\n\n2. **Add to your MCP server config (e.g., `.vscode/mcp.json`):**\n   ```json\n   {\n     \"mcpServers\": {\n       \"vmware-fusion\": {\n         \"command\": \"uvx\",\n         \"args\": [\"vmware-fusion-mcp-server\"],\n         \"env\": {\n           \"VMREST_USER\": \"your-username\",\n           \"VMREST_PASS\": \"your-password\"\n         }\n       }\n     }\n   }\n   ```\n   - Set `VMREST_USER` and `VMREST_PASS` to your vmrest credentials.\n   - You can now use the VMware Fusion tools in any MCP-enabled LLM or agent in VS Code.\n\n---\n\n## MCP Tools\n\n### list_vms\n\n- **Description:** List all VMs in VMware Fusion.\n- **Parameters:** None\n\n### get_vm_info\n\n- **Description:** Get detailed information about a specific VM.\n- **Parameters:**\n  - `vm_id` (string): The ID of the VM\n\n### power_vm\n\n- **Description:** Perform a power action on a VM.\n- **Parameters:**\n  - `vm_id` (string): The ID of the VM\n  - `action` (string): One of: \"on\", \"off\", \"suspend\", \"pause\", \"unpause\", \"reset\"\n\n### get_vm_power_state\n\n- **Description:** Get the power state of a specific VM.\n- **Parameters:**\n  - `vm_id` (string): The ID of the VM\n\n---\n\n## Development\n\n### Run Tests\n\n```bash\nmake test\n```\n\n### Format Code\n\n```bash\nmake fmt\n```\n\n### Lint\n\n```bash\nmake lint\n```\n\n---\n\n## Project Structure\n\n- `vmware_fusion_mcp/server.py` - Main FastMCP server implementation\n- `vmware_fusion_mcp/vmware_client.py` - VMware Fusion REST API client\n- `tests/` - Unit and integration tests\n\n---\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n\n---\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Run tests and linting: `make test && make lint`\n5. Submit a pull request\n\n---\n\n## References\n\n- [FastMCP Documentation](https://gofastmcp.com/)\n- [Model Context Protocol](https://modelcontextprotocol.io/)\n- [uvx](https://github.com/modelcontextprotocol/uvx)\n- [fetch server example](https://github.com/modelcontextprotocol/servers/tree/main/src/fetch)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A MCP server for managing VMware Fusion VMs via REST API",
    "version": "0.1.5",
    "project_urls": {
        "Changelog": "https://github.com/yeahdongcn/vmware-fusion-mcp-server/releases",
        "Documentation": "https://github.com/yeahdongcn/vmware-fusion-mcp-server#readme",
        "Homepage": "https://github.com/yeahdongcn/vmware-fusion-mcp-server",
        "Issues": "https://github.com/yeahdongcn/vmware-fusion-mcp-server/issues",
        "Repository": "https://github.com/yeahdongcn/vmware-fusion-mcp-server.git"
    },
    "split_keywords": [
        "agents",
        " ai",
        " automation",
        " fusion",
        " mcp",
        " model-context-protocol",
        " vmware"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f38f944f4032b04e7b73713bf9fea241b8fcd5113bac7b1aa6f3a485c39009fa",
                "md5": "97795164f28caf8aadc4834c65a2b82f",
                "sha256": "c0c78b55d37d0a1baa403977c84232ec32821e6f464d6413ec3ae2b9307fb53e"
            },
            "downloads": -1,
            "filename": "vmware_fusion_mcp_server-0.1.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "97795164f28caf8aadc4834c65a2b82f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 7166,
            "upload_time": "2025-07-09T10:47:00",
            "upload_time_iso_8601": "2025-07-09T10:47:00.433369Z",
            "url": "https://files.pythonhosted.org/packages/f3/8f/944f4032b04e7b73713bf9fea241b8fcd5113bac7b1aa6f3a485c39009fa/vmware_fusion_mcp_server-0.1.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "fe8e00da750b7aac8624fa74cc177b67f49f4bf8add17486f1b107884928efdc",
                "md5": "74b4d13991e3cfc8b814307f840de441",
                "sha256": "c24b54266af311cc69fa8645012ef4bac868232b8c95a268c04eae8a97fb9903"
            },
            "downloads": -1,
            "filename": "vmware_fusion_mcp_server-0.1.5.tar.gz",
            "has_sig": false,
            "md5_digest": "74b4d13991e3cfc8b814307f840de441",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 60098,
            "upload_time": "2025-07-09T10:47:02",
            "upload_time_iso_8601": "2025-07-09T10:47:02.005662Z",
            "url": "https://files.pythonhosted.org/packages/fe/8e/00da750b7aac8624fa74cc177b67f49f4bf8add17486f1b107884928efdc/vmware_fusion_mcp_server-0.1.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-09 10:47:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "yeahdongcn",
    "github_project": "vmware-fusion-mcp-server",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "vmware-fusion-mcp-server"
}
        
Elapsed time: 1.40513s