Skip to main content
Glama
yeahdongcn

VMware Fusion MCP Server

by yeahdongcn

list_vms

Retrieve a list of all virtual machines in VMware Fusion to monitor and manage your virtualization environment.

Instructions

List all VMs in VMware Fusion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler for 'list_vms', registered via @mcp.tool decorator. It calls the internal _list_vms_impl function to perform the listing.
    @mcp.tool async def list_vms() -> Dict[str, Any]: """List all VMs in VMware Fusion.""" return await _list_vms_impl()
  • Helper function that creates a VMwareClient instance and calls list_vms() on it, wrapping the result in a dict.
    async def _list_vms_impl() -> Dict[str, Any]: """List all VMs in VMware Fusion.""" async with VMwareClient(username=VMREST_USER, password=VMREST_PASS) as client: vms = await client.list_vms() return {"vms": vms} # type: ignore[no-any-return]
  • Core implementation in VMwareClient that makes an HTTP GET request to /api/vms endpoint to fetch the list of VMs from Fusion REST API.
    async def list_vms(self) -> List[Dict[str, Any]]: """List all VMs. Returns: List of VM dictionaries with basic information """ try: response = await self._client.get( f"{self.base_url}/api/vms", headers=self._auth_header, ) response.raise_for_status() result: List[Dict[str, Any]] = response.json() return result except httpx.RequestError as e: raise Exception(f"Failed to connect to VMware Fusion API: {e}") except httpx.HTTPStatusError as e: raise Exception( f"VMware Fusion API error: {e.response.status_code} - " f"{e.response.text}" )

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yeahdongcn/vmware-fusion-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server