winbench
Drives a Windows 11 VM on a Proxmox VE host through a restricted, whitelisted gate script: VM status, start, stop, reset, snapshot create/list/delete and rollback to a clean snapshot, host-level screenshots and key injection, plus a lease so several sessions can share one VM safely.
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.
The model is an administrator inside the VM by design. Use a VM you can throw away, keep it fenced off your other machines (seeSecurity model), and test only software you are allowed to run.
What it does
You work on a Windows program from your Mac (or Linux box) with an AI coding agent. winbench gives that agent a Windows 11 VM on your Proxmox VE server and 45 MCP tools to use it, so a session can get from "I changed the code" to "the fix works in the real GUI" on its own:
upload(build.exe) -> start -> wait_for(window) -> screen_describe -> ui_click / type_text
-> screen_describe -> crashes -> analyze_dump -> dbg_open / dbg_cmd -> vm_rollback("clean")The screen as text.
screen_describeturns the window into lines the model can act on, with an id, a position and the control's state. No vision model is needed, and when the model can see images, screenshots can carry the same ids.Crashes and debugging built in. Every crash leaves a full dump;
analyze_dumprunscdb !analyze -von it, anddbg_open/dbg_cmddrive a live cdb session (breakpoints, stacks, registers).Back to clean in about a minute.
vm_rollback("clean")restores the VM snapshot and waits for the agent to come back.Shared safely. Several Claude Code or pi sessions can use the same VM; a lease on the host makes them take turns (details).
What a model sees from screen_describe(interactive_only=true) on a Notepad save prompt:
Interactive elements of "*notes - Notepad" (hwnd 0x630444):
(modal dialog "Notepad" is open: only its elements are listed)
e1 | Button "Save" | in "Notepad" | id=PrimaryButton | (287,351) 85x32 | focused
e2 | Button "Don't save" | in "Notepad" | id=SecondaryButton | (382,351) 89x32
e3 | Button "Cancel" | in "Notepad" | id=CloseButton | (475,351) 80x32and from the full tree of an app's toolbar:
e18 | Button "Brush" | (65,212) 64x32 | checked
e19 | Button "Eraser" | (133,212) 67x32 | unchecked
e22 | Slider "Size" | (377,211) 129x17 | value="24 px" | range=2..200
e24 | Button "Undo" | (550,212) 63x32 | disabled
e46 | MenuItem "System" | (20,20) 22x22 | collapsedRelated MCP server: Windows-MCP
Tools
Group | Tools |
See the screen |
|
Act on it |
|
Files |
|
Processes |
|
Debugging |
|
The VM |
|
Sharing |
|
Reading the UI
screen_describereads the foreground window (or any window by title or hwnd) through UI Automation. Each parent's children come back with all their properties in one cached call, so a 49-element window is described in about a quarter of a second.Every line shows the state a tester checks:
checked/unchecked/mixed,expanded/collapsed,selected,disabled,focused,readonly,password(the value is never shown),range=min..max,scroll v=40%,modaland keyboard shortcuts (key=Ctrl+S).interactive_only=truelists only what you can act on, flat, each with the group it sits in. While a modal dialog is open it lists only the dialog, which is all a user could reach.screen_ocrreads text from custom-drawn UI (games, canvases, owner-drawn controls) with the Windows OCR engine.screenshot(annotate=true)draws the ids of the last describe onto the image.
Acting on it
ui_clickclicks an element by id at its live position;ui_invokepresses, toggles, expands or selects it without moving the mouse;ui_set_valuefills an edit box.ui_scrollscrolls the list, tree or document that contains an element, by page, by line, to a percentage, or until the element itself is in view.focus_windowand every element action bring the window to the front. When Windows' focus-stealing rule blocks that, winbench forces it by attaching to the foreground window's input queue.move_windowmoves, resizes, maximizes or minimizes a window, for layout and minimum-size tests.type_textpastes exact Unicode text through the clipboard, or types it key by key for controls that ignore paste.An id from before the screen changed is refused as stale instead of clicking whatever is there now.
How it fits together
Claude Code / pi (your computer)
| stdio, one MCP server process per session (server/)
| ssh with one restricted key, nothing else:
| - tunnel 127.0.0.1:18765 -> <vm-ip>:8765 (agent calls)
| - forced command on the host (VM power, snapshots, lease)
v
Proxmox VE host: winbench-gate (host/winbench_gate.py), whitelisted operations on one VM
v
Windows 11 VM: winbench-agent (agent/), Python 3.12 in the logged-on admin session, elevated,
HTTP JSON API with a bearer token, supervised by a Scheduled Taskagent/runs inside the VM. One worker thread owns UI Automation, input and screenshots; a call that hangs gets the thread replaced instead of blocking every later call. The Scheduled Task starts it at logon and checks every minute, so a crashed or killed agent is back within a minute.host/winbench_gate.pyis the only program the restricted key can run on the Proxmox host. It acceptsstatus,start,stop,reset,snapshot,rollback,screenshot,sendkey,leaseand a few more, for one VM id, and logs every call. When the agent is dead it restarts it through the QEMU guest agent.server/is the MCP server your client starts. It turns every failure into a tool error with the reason, restarts a dead agent by itself, and tells the model when its call did not run.
Getting started
What you need
A Proxmox VE host you have root ssh access to, with the VM disks on ZFS (snapshots and rollback).
A Windows 11 VM on it with the QEMU guest agent installed, a local administrator account named
adminthat logs on automatically, and a fixed IPv4 address on a bridge of the host. Turn off Microsoft Defender in the VM if your builds are unsigned: it quarantines them, andwinbench.doctorwarns while it runs.On your computer: macOS or Linux with
bash,ssh,openssl,zipand uv, plus Claude Code and/or pi.
Install with an AI agent
Let your coding agent do the install. Paste this into Claude Code, Codex, pi or another agent that can run shell commands on your computer:
Clone https://github.com/007hacky007/winbench and install it for me by following
docs/INSTALL-AGENT.md in that repository. Ask me for every value you cannot discover,
and stop for my confirmation before each change to the Proxmox host or the VM.The runbook tells the agent which values to ask for, how to discover them with
read-only commands (qm list, qm config, the guest agent), where to pause for your OK and how to
verify the result. You need the prerequisites below and working root ssh to the Proxmox host first.
Install
Configure. Copy
winbench.conf.exampletowinbench.confand fill in your Proxmox host, VM id and VM address.winbench.confis git-ignored; every script and the MCP server read it.cp winbench.conf.example winbench.conf $EDITOR winbench.confYour computer:
scripts/install-mac.shcreates the restricted gate key and the agent token (~/.config/winbench/token), builds the MCP server's virtualenv and registerswinbenchwith Claude Code (user scope) and pi. Skip either with--no-claude/--no-pi.The host:
scripts/install-host.shinstalls the gate and adds the restricted key to root'sauthorized_keys, limited to the gate and one port forward. Check it:scripts/gate.sh statusmust work, andscripts/gate.sh "status; id"must print usage and exit 2.The VM:
scripts/deploy-vm.shcopies the agent, the token andagent/install/setup-vm.ps1into the VM through the QEMU guest agent and runs the setup: Python 3.12, the VC++ runtime, Sysinternals, full crash dumps, power settings, the firewall rule and the Scheduled Task. Then install the debugger from inside the admin session:RPC_VIA=host scripts/rpc.sh run '{"cmd":"winget install --id Microsoft.WinDbg -e --accept-package-agreements --accept-source-agreements --silent","timeout":600}'Fence the VM (recommended):
scripts/install-host.sh --fencedrops all traffic between the VM's bridge port and every other guest on the host, IPv6 and ARP included. The VM keeps internet access.Snapshot it:
scripts/gate.sh snapshot clean.
Check every link of the chain with server/.venv/bin/python -m winbench.doctor.
Settings
Setting ( | What it is |
| ssh destination of the Proxmox host, e.g. |
| Proxmox id of the Windows VM |
| the VM's address, its network and bridge (firewall rule and fence) |
| the restricted ssh key (default |
| where the gate is installed on the host (default |
| local end of the tunnel (default 18765) |
| path of the config file, if not |
| screenshots are returned as images too (set for Claude Code by the installer) |
| no lease, for a VM only one session ever uses |
| how this session is named to the others in the queue |
Several sessions, one VM
Every MCP server process is a session, and only the session holding the lease may use the VM. The lease is kept on the Proxmox host, so rolling the VM back cannot lose it.
The first VM tool call takes the lease when the VM is free, so a single session never notices it.
When another session holds it, VM tools fail with who holds it, for how long, how long it has been idle, and your place in the queue. You keep that place while your session runs;
vm_lock(wait_s=...)waits for the VM,vm_lock_statuschecks,vm_unlockhands it on.A forgotten lock frees itself:
a session not heard from for 120 s is dropped (closed, crashed, laptop asleep); servers heartbeat every 30 s;
a holder that runs no VM tool for 15 minutes is dropped even while its session stays open.
vm_lock(idle_minutes=...)sets 1 to 240 minutes, for long builds between VM steps;a session releases its lease when it exits;
vm_lock(steal=true)takes over at once, when a person decides the holder is abandoned.
The holder's results say when others are waiting. A session that gets the VM back after another one used it is warned that its programs, files and snapshots may be gone.
vm_status,vm_snapshots,vm_screenshot_hostand the lease tools work without the lease.scripts/gate.sh lease statusshows the lease from a shell.The lease binds the MCP servers. It does not stop
scripts/rpc.shor a person at the VM console.
Security model
The model only calls MCP tools. The MCP server holds one ssh key, which reaches root on the host only through the gate (whitelisted operations on one VM id) and one TCP forward to the agent: no shell, no SFTP, no other forwards. ssh runs with
-F /dev/null,IdentitiesOnlyand no agent, so your own keys are never offered.The agent needs a bearer token; its firewall rule accepts only the VM's own network.
Inside the VM the model is admin. The fence (
install-host.sh --fence) filters by bridge port, so a model that changes the VM's IP or MAC still cannot reach other guests. Keep host services closed to the VM with the host firewall.Claude Code's and pi's own shell and file tools are not limited by winbench. For sessions that should touch only the VM, allow
mcp__winbench__*and denyBash.
Troubleshooting
"agent not reachable": the VM is rebooting, the desktop session is gone, or the agent died. The server starts the agent's task through the host and waits up to a minute; the call itself did not run, so repeat it.
vm_statusshows both agents,vm_screenshot_hostshows the screen even without the agent,vm_resethard-resets.A UI call times out or is refused with "stopped in debugger": a process sitting at a cdb prompt is frozen and UI Automation would wait on it forever. Let it run (
dbg_cmd(sN, "g")) ordbg_close.Logs: MCP server
~/winbench/server.log, tunnel~/winbench/tunnel.log, agentC:\ProgramData\winbench\agent.log, VM setupC:\ProgramData\winbench\setup.log, gate/var/log/winbench-gate.logon the host.Long calls cut off: the installer sets a 300 s tool timeout for Claude Code; for pi set
"timeout": 300for winbench in~/.pi/agent/mcp.json.Rollback fails: ZFS rolls back only to the newest snapshot.
vm_delsnapshotyour own snapshots first.
Tips for models and their users
Element ids live until the next
screen_describe; describe again after anything that changes the screen.start()of a packaged app (Notepad, Calculator) returns the launcher's pid; take the real pid fromlist_windowsorprocessesbeforedbg_open.Windows OCR reads normal UI text well and fails on spell-check squiggles and very small fonts.
A tool error that lists what exists ("no window matching ..., open windows: ...") is the model's chance to spot a misspelling. The server instructions tell it never to repeat an identical failing call.
Development
uv venv .venv && uv pip install --python .venv/bin/python pytest psutil mcp
.venv/bin/pytest # agent, host and server tests; no Windows needed
scripts/push-agent.sh # copy the agent into the VM and restart it
scripts/agent-smoke.sh # drive Notepad end to end through the agent
scripts/debug-smoke.sh # crash capture, dump analysis, live cdb
scripts/frozen-smoke.sh # a debugger-stopped process must not hang the UI tools
server/.venv/bin/python scripts/smoke-mcp.py # the MCP server over stdio, like a clientscripts/push-agent.sh restarts the agent, which ends every open dbg_* session.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote desktop MCP: let AI see, click, type and run terminal commands on your own Windows or Mac.
Remote MCP access to user-authorized Linux, Windows and Intel Mac devices for AI assistants.
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
Persistent memory, knowledge graph, task management and more for AI agents via MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that gives an LLM full control over a VMware-hosted Windows VM: lifecycle, snapshots, remote execution, file transfer, and kernel debugging.MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to seamlessly integrate with the Windows operating system, performing tasks such as file navigation, application control, UI interaction, and QA testing via the MCP protocol.-
- AlicenseNot gradedqualityBmaintenanceEnables LLMs to remotely control VirtualBox VMs and Playwright browsers on Windows, including VM lifecycle actions, in-guest commands, browser automation, window management, and service monitoring via REST API and MCP.MIT
- AlicenseAqualityBmaintenanceEnables AI agents to boot fresh, disposable Windows Sandbox machines, copy and run apps, drive their UI with UI Automation, capture screenshots, inspect crashes, and collect reports. It also supports installer testing, offline execution, and detonation of untrusted files through MCP tool calls.27497MIT