utm-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Drive UTM virtual machines on this Mac. vm_exec runs commands through the guest agent (as SYSTEM/root, no desktop): use it for shell work. On Windows guests run vm_helper_install once: it puts a helper, running as SYSTEM inside the logged-in user's session, in the guest. Then prefer, over keystrokes and pixel clicks: vm_run_user (start GUI apps; as_="admin" starts them elevated with no prompt), vm_windows / vm_window, vm_ui_tree and vm_ui_act (read and drive controls by name through UI Automation, elevated windows included), vm_wait (instead of sleeping; for_="uac" waits for a UAC prompt), vm_uac (inspect / allow / deny a UAC prompt; to test the real flow start the program with Start-Process -Verb RunAs as the user, then vm_uac), vm_clipboard / vm_paste, and vm_screenshot (hwnd= for one window, max_width= to shrink; it also shows the lock screen). For raw input use vm_key / vm_type / vm_click with coordinates from the latest full-screen screenshot; those need QMP, enabled once per VM with vm_enable_qmp. vm_type follows the guest's keyboard layout; for long or non-typable text use vm_paste. Operating the guest: vm_ready after vm_start, a reboot or a QMP change (waits for the agent, and on Windows for a logged-in, unlocked desktop and the helper). For anything slower than a minute (builds, installers, servers) use vm_job_start and follow it with vm_job_log (wait=N, pass next_offset back) instead of a long vm_exec timeout; vm_jobs lists them, vm_job_stop kills one. vm_ps / vm_kill list and kill processes; vm_events reads Windows event logs and vm_tail the end of a text file (agent only, no helper). To close a window use vm_close, not vm_window close plus clicking the save prompt yourself: it answers the prompt ("Don't save" by default) and kills what stays open.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| vm_listA | All UTM VMs with id, name, status (stopped/started/paused/...) and backend (qemu/apple). |
| vm_startB | Starts (or resumes) a VM by name or UUID. With wait_for_agent, returns once the guest agent answers, i.e. once vm_exec will work. |
| vm_stopA | Stops a VM. method: request (guest shutdown), force (power off), kill (kill QEMU). |
| vm_ipA | The guest's IP addresses, IPv4 first (asks the guest agent). |
| vm_execA | Runs a program in the guest and returns exit_code, stdout and stderr.
argv[0] is the executable (full path or on PATH), e.g. ["cmd.exe", "/c", "dir C:\"] or
["/bin/sh", "-c", "uname -a"]. Runs as the guest agent's user (SYSTEM on Windows, root on
Linux) without a desktop, so GUI programs started here are invisible. If it outlives
|
| vm_pushB | Copies a host file into the guest (over HTTP on the VM network; needs curl in the guest, built into Windows 10+). guest_path is the full destination file path. |
| vm_pullC | Copies a guest file to the host (same mechanism as vm_push). |
| vm_screenshotA | The guest's screen as a PNG at native resolution; vm_click coordinates refer to a full-screen shot. On Windows guests with the helper (vm_helper_install) it needs no QMP and takes hwnd (one window, from vm_windows) and max_width (downscale to save tokens; a text note then gives the origin and scale to map image pixels back to screen pixels). Without the helper: QMP, full screen. |
| vm_keyA | Presses key combos in order. Each combo is QEMU qcodes joined by '-': 'ret', 'esc', 'tab', 'f5', 'up', 'ctrl-c', 'alt-f4', 'meta_l-r' (Win+R), 'ctrl-alt-delete', 'shift-tab'. |
| vm_typeA | Types text (newline = Enter) as keystrokes on the guest's keyboard layout, detected automatically (or pass e.g. layout="de"). For long text or characters the layout lacks, use vm_paste. |
| vm_layoutA | Re-detects the guest's keyboard layout (vm_type caches it for a minute). |
| vm_pasteA | Puts text (any Unicode, any length) on the logged-in user's clipboard and presses Ctrl+V in the focused window. Windows guests, needs vm_helper_install once. |
| vm_clipboardA | Reads the logged-in user's clipboard, or sets it when text is given (no paste). Windows guests, needs vm_helper_install once. |
| vm_helper_installA | Installs (or updates) and starts the helper, utm-helper.exe, in the Windows guest: a SYSTEM scheduled task (at boot) that keeps a SYSTEM process in the logged-in user's session, serving HTTP on the VM network behind a random token. It powers vm_run_user, vm_windows, vm_window, vm_ui_tree, vm_ui_act, vm_wait, vm_info, vm_uac, vm_clipboard/vm_paste, helper screenshots and the live keyboard layout for vm_type. |
| vm_clickA | Clicks at (x, y) in the latest screenshot's pixels. button: left, right or middle. Needs an absolute pointer in the guest (UTM's default USB tablet). |
| vm_scrollB | Scrolls the wheel at (x, y); positive clicks scroll down, negative up. |
| vm_snapshotA | Snapshots: action list | create | restore | delete. A running QEMU VM is saved with its running state. delete has no confirmation. |
| vm_enable_qmpA | Adds the loopback QMP argument that screenshots and input need. The VM must be stopped; start it again afterwards. |
| vm_run_userA | Runs a program in the guest's desktop session (unlike vm_exec, which has no desktop). Use
it to open GUI apps: argv ["notepad.exe"], wait=False. With wait=True returns pid, exit_code,
stdout, stderr, timed_out (a program that outlives |
| vm_windowsA | Lists the visible top-level windows, front first: hwnd, title, class, pid, process, x, y, width, height, focused, minimized, maximized (physical screen pixels). Use the hwnd with vm_window, vm_ui_tree, vm_ui_act and vm_screenshot. |
| vm_windowA | Acts on a window from vm_windows. action: focus (restores it first, then brings it to the front; ok=false if Windows refuses), minimize, maximize, restore, close (polite WM_CLOSE: an app may ask to save first). |
| vm_ui_treeA | The UI Automation tree of a window (default: the foreground one) as compact JSON: role, name, id (AutomationId), class, x, y, width, height, enabled, focused, offscreen, value, children. Empty fields are left out; truncated=true at the root means max_nodes was hit. Read controls and their text exactly this way instead of screenshots when possible. |
| vm_ui_actA | Finds the nth element (depth-first) of a window (default: foreground) whose name (exact, case-insensitive), role (e.g. Button, Edit) and id (AutomationId) match the given ones, and acts on it through UI Automation, with no coordinates. action: invoke (click a button or menu item), set_value (needs value; text boxes), toggle, select, expand, collapse, focus. If nothing matches, the error lists candidate elements. |
| vm_waitA | Waits (polling every 200 ms) instead of sleeping. for_: window (a visible window whose
title contains |
| vm_infoB | The helper's view of the desktop: user, session (active / locked / uac), desktop (Default, or Winlogon for the lock screen and UAC), screens (x, y, width, height, primary, scale_percent), virtual screen, keyboard layout hkl, foreground window. |
| vm_uacA | Answers a UAC consent prompt (the secure desktop that screenshots and ordinary windows
can't reach). Waits up to |
| vm_job_startA | Starts a long-running program in the guest that outlives this call (a build, an installer, a server) and returns {id, pid}. Output (stdout and stderr, interleaved) is kept in a log you read with vm_job_log. Use jobs, not vm_exec with a long timeout, for anything that takes more than a minute. argv[0] is the executable, no shell: ["cmd.exe", "/c", "..."] for shell syntax. as_: user (default), admin or system, as for vm_run_user. Windows guests, needs the helper. |
| vm_job_logA | Reads a job's output from byte |
| vm_job_stopB | Kills a job and its child processes. Returns {ok, id, running, exit_code}; a killed job's exit_code is -1. |
| vm_jobsC | Lists jobs, newest first, as compact JSON: id, pid, running, exit_code, size (log bytes), argv0. Jobs and their logs are deleted after 7 days. |
| vm_readyA | Waits until the VM can be driven: the guest agent answers and, on Windows with need_helper,
the helper reports a logged-in user, an active session and the Default desktop (not locked, not
on the lock screen or a UAC prompt). Use it after vm_start, a reboot or a QMP change. Returns
{ready, agent, helper, user, session, desktop, waited_s}; on timeout ready is false and
|
| vm_psA | Lists guest processes, biggest memory first, as compact JSON: pid, ppid, name, cmdline, session, user, cpu_s (CPU seconds so far), memory_mb, started (unix seconds); unreadable fields are left out. name / user: case-insensitive substrings. sample_ms (0-5000) measures twice that far apart and adds cpu_percent (share of all CPUs). Windows guests, needs the helper. |
| vm_killA | Kills a guest process (tree=True: its children too, children first). 404 if it is gone; the helper refuses pid 0 and 4, itself and its supervisor. Windows guests, needs the helper. |
| vm_eventsA | Reads a Windows event log (newest first) as compact JSON [{time (UTC), level, provider, id, message (first 500 chars)}]; [] when nothing matches. log: System, Application, Security or a channel such as Microsoft-Windows-Kernel-Power/Thermal-Operational. level: critical, error, warning or info (that level only). provider filters by event source; contains is a case-insensitive text match on the message. Runs through the guest agent, no helper needed. |
| vm_tailA | The last |
| vm_closeA | Closes windows the polite way and handles their "save changes?" prompts, instead of
vm_window close plus finding and clicking the prompt yourself. Give exactly one of hwnd, pid or
process (e.g. "notepad.exe"). Sends WM_CLOSE, then for up to |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 36 tools
Most tools are sharply distinguished by target resource and action, and the descriptions explicitly call out the tricky boundaries (vm_exec has no desktop vs vm_run_user in the user session vs vm_job_start for long-running work; vm_window close vs vm_close's prompt handling; vm_kill vs vm_job_stop vs vm_stop). A few clusters still need careful reading to pick correctly—the three exec-family tools, and vm_wait vs vm_ready—but the descriptions do carry the weight.
Everything is uniformly vm_-prefixed snake_case, so the family is predictable. The only deviation is that some tools are nouns describing a resource read (vm_ip, vm_info, vm_jobs, vm_events, vm_layout, vm_clipboard, vm_screenshot) while others are verb_noun (vm_run_user, vm_job_log, vm_helper_install), giving a slightly mixed verb/noun convention within an otherwise consistent scheme.
36 tools is well above the comfortable 3-15 band and forces the agent to scan a large surface before acting. The breadth is defensible—the domain genuinely spans QEMU control, guest agent, and a Windows helper—but several capabilities are split into many small tools (job_start/job_log/job_stop/jobs, windows/window/ui_tree/ui_ui_act/close) that could be consolidated.
Coverage is unusually deep: VM lifecycle, exec, file push/pull, input, screenshots, UI Automation, snapshots, QMP setup, jobs, process inspection, event logs and file tailing are all present with no dead ends in the driving workflow. The notable gap is VM provisioning—there is no create/clone/delete/configure tool, so a VM must pre-exist and be created elsewhere.