Skip to main content
Glama
yeahdongcn

VMware Fusion MCP Server

by yeahdongcn

list_vms

Retrieve a list of all virtual machines in VMware Fusion using the MCP server, enabling users to efficiently manage and monitor their VM inventory.

Instructions

List all VMs in VMware Fusion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'list_vms', registered with @mcp.tool decorator. Delegates to internal helper.
    @mcp.tool async def list_vms() -> Dict[str, Any]: """List all VMs in VMware Fusion.""" return await _list_vms_impl()
  • Helper function that instantiates VMwareClient and calls its list_vms method, wrapping result.
    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 performs HTTP GET to /api/vms endpoint to fetch VM list.
    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}" )

Other Tools

Related Tools

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