UTM MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
UTM MCP Server
An MCP (Model Context Protocol) server that provides tools for managing UTM virtual machines via the utmctl CLI.
Prerequisites
macOS with UTM installed at
/Applications/UTM.appPython 3.10+
UTM must be running in the current user session (
utmctluses Apple Events)
Related MCP server: mcp-utm
Setup
git clone https://github.com/michaelbarry/utm_mcp.git
cd utm_mcp
uv syncRunning
uv run utm-mcpThe server uses stdio transport by default, suitable for use with Claude Code and other MCP clients.
Claude Desktop Configuration
Run the helper script to automatically add the server to your Claude Desktop config:
uv run python add_to_claude_desktop.py
# Or specify the path to your utm_mcp checkout
uv run python add_to_claude_desktop.py /path/to/utm_mcpOr manually add to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"utm": {
"command": "uv",
"args": ["--directory", "/path/to/utm_mcp", "run", "utm-mcp"]
}
}
}Claude Code Configuration
claude mcp add -s user utm -- uv --directory /path/to/utm_mcp run utm-mcpTools
VM Lifecycle
Tool | Description |
| List all registered virtual machines |
| Query the status of a VM |
| Start or resume a VM (supports disposable and recovery mode) |
| Suspend a running VM to memory (optionally save state to disk) |
| Shut down a VM (force, kill, or graceful request) |
| Clone an existing VM (with disk space checks and warnings) |
| Permanently delete a VM (irreversible) |
| List IP addresses on the guest |
Guest Operations
Require the QEMU guest agent running inside the VM. See Installing the QEMU Guest Agent below.
Tool | Description |
| Execute a command inside the guest |
| Push and execute a multi-line script on the guest |
| Fetch a file from the guest |
| Upload text content to a file on the guest |
USB
Tool | Description |
| List connected USB devices |
| Connect a USB device to a VM |
| Disconnect a USB device from a VM |
Installing the QEMU Guest Agent
The guest agent is required for guest operations (utm_exec_command, utm_exec_script, utm_file_pull, utm_file_push). Install it inside each VM you want to manage:
Linux
Debian / Ubuntu:
sudo apt update && sudo apt install -y qemu-guest-agent
sudo systemctl enable --now qemu-guest-agentFedora / RHEL / CentOS:
sudo dnf install -y qemu-guest-agent
sudo systemctl enable --now qemu-guest-agentArch Linux:
sudo pacman -S qemu-guest-agent
sudo systemctl enable --now qemu-guest-agentAlpine Linux:
sudo apk add qemu-guest-agent
sudo rc-update add qemu-guest-agent
sudo service qemu-guest-agent startNixOS:
Add to configuration.nix:
services.qemuGuest.enable = true;Then rebuild:
sudo nixos-rebuild switchWindows
Download the VirtIO guest tools ISO
Mount the ISO in UTM (CD/DVD drive)
Run
guest-agent\qemu-ga-x86_64.msi(orqemu-ga-i386.msifor 32-bit) from the mounted driveThe agent starts automatically as a Windows service
Verifying the Agent
After installing, verify the agent is running by checking the VM status from the host:
/Applications/UTM.app/Contents/MacOS/utmctl exec <vm-name> -- echo "agent works"If this returns agent works, guest operations are ready to use.
Storage Notes
utm_clone_vm checks available disk space before cloning and warns if:
UTM storage is on the local disk rather than external storage
Free space would drop below 50 GB after the clone
UTM can be configured to store VMs on an external volume via UTM preferences. This is recommended for machines with limited internal storage.
Troubleshooting
utmctl returns no VMs (OSStatus error -1743)
utmctl communicates with UTM.app via Apple Events. If the app running utmctl (Terminal, iTerm, VS Code, etc.) hasn't been granted Automation permission, macOS silently blocks the request and no VMs are returned.
Fix:
Run this command in your terminal to trigger the macOS permission prompt:
osascript -e 'tell application "UTM" to get name of every virtual machine'Approve the dialog that appears, granting your terminal app permission to control UTM.
You can verify or manage this permission in System Settings → Privacy & Security → Automation.
Note: If you're using the App Store (sandboxed) version of UTM and continue to have issues, the direct download is known to work more reliably with
utmctl.
Limitations
utmctlrequires an active GUI session (Apple Events). It does not work over SSH.Guest operations require the QEMU/SPICE guest agent installed and running inside the VM.
Clone operations copy the entire VM disk image and can take significant time and space.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Remote MCP access to user-authorized Linux, Windows and Intel Mac devices for AI assistants.
Securely control computers you explicitly pair through files, terminals, processes, screenshots, desktop UI/input, clipboard, browser automation, diagnostics, and document tools.
Start, pause, resume, and run commands and file operations in Linux sandboxes.
Related MCP Servers
- FlicenseNot gradedqualityNot gradedmaintenanceProvides LLMs with administrative capabilities to execute shell commands on local systems through a pseudo-terminal environment with Unix Domain Socket communication.-
- AlicenseAqualityCmaintenanceManages UTM virtual machines on macOS via AppleScript, enabling cloning, configuration, and control with unique MAC randomization.225MIT
- AlicenseNot gradedqualityDmaintenanceEnables management of KVM/QEMU virtual machines on remote libvirt hosts via SSH, with tools for inspection, lifecycle management, snapshots, and cloning.2AGPL 3.0
- FlicenseNot gradedqualityAmaintenanceLets AI agents manage local virtual machines: create macOS and Linux VMs on Apple silicon and WSL distros on Windows, start/stop, clone, back up, and run commands inside them.4,073-