Skip to content
Back to search

winvision-mcp

Native Windows vision & desktop control MCP server for ZCode: UI Automation snapshots (34ms), DXGI Set-of-Mark capture, offline OCR. Pure Rust.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 21 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/USBc388/winvision-mcp with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/USBc388/winvision-mcp'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/usbc388--winvision-mcp/badge.svg)](/listings/usbc388--winvision-mcp)

HTML

<a href="/listings/usbc388--winvision-mcp"><img src="/api/listings/usbc388--winvision-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 86 lines
  1. # WinVision MCP
  2. An ultra-fast local MCP server (Model Context Protocol, stdio JSON-RPC 2.0)
  3. for ZCode: native Windows "vision" and desktop control in pure Rust. It
  4. replaces the slow screenshot → pixel-guessing → click loop with instant
  5. access to the UI Automation tree, hardware-level DXGI screen capture and
  6. event-driven window monitoring.
  7. **Speed (p50, full JSON-RPC round trip, live desktop):** warm window
  8. snapshot — **34 ms**, button click via a UIA pattern — **0.3 ms**, screen
  9. region OCR — **44 ms**, capture + Set-of-Mark overlay — **72 ms**.
  10. Full benchmarks: [BENCHMARKS.md](BENCHMARKS.md). Prebuilt exe in
  11. [Releases](../../releases).
  12. ## Tools
  13. | Tool | Purpose | Speed |
  14. |---|---|---|
  15. | `desktop_snapshot` | Instant "X-ray" of a window via UI Automation: interactive elements with short IDs `[N]` and screen rects. Browsers (Chrome/Edge/Firefox/Zen/Floorp/Brave) are woken automatically (WM_GETOBJECT + screen-reader flag) with walk depth 14 | warm ~10–50 ms |
  16. | `ui_interact` | click / double_click / right_click / focus / set_value / toggle by `element_id`; tries native patterns first (Invoke/Value/Toggle/SelectionItem/ExpandCollapse), falls back to a hardware SendInput click | ~0.3–5 ms |
  17. | `ocr_click_text` | Click exactly on text on screen: capture (DXGI/GDI) → OCR → bounding box of the found text → SendInput click at its center; `type_after_click` pastes text via Ctrl+V. Works on sites with no UIA tree, Canvas, captchas | ~50–150 ms |
  18. | `visual_som_capture` | JPEG frame via DXGI Desktop Duplication with Set-of-Mark badges on windows/OCR lines + a coordinate table | < 5 ms capture |
  19. | `ocr_read_region` | Offline OCR of any region (Windows.Media.Ocr), per-line boxes in screen coordinates | ~20–50 ms |
  20. | `window_manager` | list_windows, focus, minimize/maximize/restore, snap_left/right/full, launch_app, wait_for_window (with OCR text check), recent_events (SetWinEventHook) | ms |
  21. | `input_macro` | hotkey (`Ctrl+Shift+P`), type_text (Unicode), click/move/drag/scroll | ms |
  22. | `clipboard` | get/set CF_UNICODETEXT | ms |
  23. ## Architecture
  24. ```
  25. src/
  26. main.rs — startup: DPI-aware, COM actor, tokio stdio
  27. mcp.rs — MCP transport: initialize/tools/list/tools/call, schemas for 8 tools
  28. actor.rs — dedicated COM thread (CoInitializeEx MTA + message pump), all Win32/COM calls
  29. uia.rs — UIA: batched tree cache (BuildUpdatedCache, TreeScope=Subtree — 1 round trip),
  30. 10 s ID→element cache, patterns + fallback, browser accessibility auto-wake
  31. dxgi.rs — DXGI Desktop Duplication: one duplication per process (global singleton),
  32. survives ACCESS_LOST / mode changes / monitor switches, GDI fallback
  33. som.rs — Set-of-Mark: numbered color badges (built-in 5x7 font), grid, JPEG
  34. ocr.rs — Windows.Media.Ocr: engine creation with fallbacks, word/line boxes
  35. window.rs — EnumWindows/ShowWindow/snap/launch (foreground-lock workaround via Alt tap)
  36. events.rs — SetWinEventHook (foreground/show/destroy/namechange) into a ring buffer
  37. input.rs — SendInput: hotkeys, Unicode typing, interpolated drag, wheel
  38. clipboard.rs — CF_UNICODETEXT
  39. ```
  40. ## Building
  41. ```powershell
  42. cargo build --release # target/release/winvision-mcp.exe
  43. cargo clippy --all-targets
  44. cargo test # 43 unit tests
  45. cargo test -- --ignored # 10 integration tests (real UIA/DXGI/OCR/stdio, needs an interactive desktop)
  46. ```
  47. ## Connecting to ZCode
  48. In `~/.zcode/cli/config.json`:
  49. ```json
  50. "mcp": { "servers": { "winvision": {
  51. "command": "C:\\tools\\winvision-mcp.exe",
  52. "args": []
  53. } } }
  54. ```
  55. A skill file describing usage rules lives in
  56. `.zcode/skills/winvision/SKILL.md` (per-project) and
  57. `~/.zcode/skills/winvision/SKILL.md` (global).
  58. Manual smoke check:
  59. ```powershell
  60. powershell -NoProfile -ExecutionPolicy Bypass -File scripts\smoke-release.ps1
  61. ```
  62. ## Notes
  63. - The first UIA call in a process pays cold COM initialization (~300–700 ms);
  64. warm snapshots of typical windows take 10–50 ms. The desktop shell window
  65. (`Program Manager`) answers its provider in ~650 ms — an explorer-side
  66. limitation, not a server one.
  67. - Browsers wake their accessibility tree on demand; the server sends the
  68. wake probe automatically on every browser snapshot (v0.2.0+).
  69. - Fully static screens (e.g. an animated-wallpaper app paused behind a
  70. focused window can stop NVIDIA from delivering duplication frames) fall
  71. back to a GDI BitBlt capture automatically.
  72. - OCR requires a Windows language pack (en-US / ru-RU, etc.).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.