umbriel
MCP server for driving any Windows app through five layers including OCR, UI Automation, and direct OS operations. Enables AI agents to control Windows desktop and OS cursor-free, even on background/locked windows.
README
<div align="center">
<img src="./assets/hero.png" alt="Umbriel" width="100%" />
Umbriel · A set of hands for your AI agent — and Playwright for the Windows desktop
Drive any Windows app through five layers — fall back to OCR and pixel-matching when there's no other way in, see and manage windows even when they're hidden, send cursor-free synthetic input, target controls by name and role, and reach past the GUI to drive the OS itself: processes, services, the registry, scheduled tasks, the firewall, network, power, displays, disks, environment, and the event log. Built by Claude, for Claude — but any AI agent over MCP can use it.
</div>
What is it?
Umbriel drives the Windows desktop the way a person would — through whatever channel actually works for the app in front of it:
- Pixels & OCR — when an app exposes no tree at all (canvas, custom-draw, games), fall back to full-screen capture, template matching, and text recognition.
- Semantic control — read the UI Automation tree an app exposes and target controls by name and role, not coordinates. Survives the DPI, layout, and theme changes that shatter pixel scripts.
- Sight & window control — capture the live pixels of any window (even fully GPU-composited or occluded), inspect raw HWND hierarchies, and move, raise, or size windows.
- Synthetic input — cursor-free clicks, keystrokes, and text that land on background, locked, minimized, or occluded windows without stealing focus.
- Drive the OS, not just GUIs — when the task is the machine, act on it directly: read and write the registry (values and keys), list / kill / suspend / reprioritize processes, query / start / stop / configure services, create / delete / enumerate scheduled tasks, read the firewall rules, enumerate network adapters and live connections, drive session power (lock / restart / sleep / hibernate), list volumes and free space, get and set environment variables, read the event log, and read or change the display mode — all native, no PowerShell or shelling out.
Underneath it's a few kilobytes of TypeScript on Bun's built-in FFI — no Appium server, no .NET, no node-gyp, no prebuilt binaries.
Install
bun add umbriel
That's the entire install story. No build step, nothing to compile.
Built for AI agents
This is what Umbriel is for. Hand the whole desktop to an agent with one line:
claude mcp add umbriel -- bunx umbriel
Any MCP-speaking agent then drives Windows cursor-free, ~15 ms per step, even on a background, locked, minimized, or occluded window. No mouse hijacking, no screenshots required. It was built by Claude, for Claude, but nothing about it is Claude-specific — any AI over MCP works.
A screenshot agent burns image tokens on every step — then burns them again to screenshot its own result, because it can't read state out of pixels. Umbriel maps the whole window to plain text you cache once and reuse across steps, and reads results straight back from that map. Same grounding Microsoft's UFO2 and the OSWorld-Human benchmark recommend (structure first, vision second) — without the bill.
umbriel.tree(app, { agentProfile: true });
// → one cached round-trip → { role, name, automationId, bounds, children }
⚡ Maps a window in ~13 ms · tokens are text you cache once and reuse, not an image re-bought every step · up to ~2000× faster grounding than a 3–26 s screenshot pipeline
| Per agent step | Screenshot agent | Umbriel |
|---|---|---|
| Tokens | 1.5–2.7k image — then re-shot to self-check | ~3k text — cached & reused across steps |
| Grounding time | 3–26 s | ~13 ms |
| Reads state back? | no — must take another screenshot | yes — straight from the snapshot |
<sub>Umbriel figures measured on Windows 11, Bun 1.4 (14.3 ms · ~3k tokens on Calculator; single property read ~58 µs) — reproduce with bun run example/benchmark.ts. Screenshot-pipeline figures are published third-party results (OSWorld-Human; computer-use image-token costs).</sub>
The MCP server exposes 99 snapshot-first tools (76 under the default safe profile; 41 under readonly; the 23 os/fs tools need full or UMBRIEL_OS=1) behind a deployer policy you control:
UMBRIEL_PROFILE=readonly # observe only
UMBRIEL_PROFILE=safe # default — observe + cursor-free control + window management
UMBRIEL_PROFILE=full # everything, including launch/run/file tools
desktop_snapshot returns a ref-keyed view — Button "Five" [ref=e49#3] — and every action replies with the smallest faithful update: a compact delta when little changed, a pruned snapshot when more did. The model re-grounds without drowning in tokens.
Use it from your code
Umbriel is also a first-class library for E2E tests and desktop automation — find by name → wait → act → assert, just like getByRole on the web:
import { ControlType, umbriel } from 'umbriel';
const app = await umbriel.launch(['notepad.exe'], { className: 'Notepad' });
const edit = await app.waitFor({ controlType: ControlType.Document });
edit.focus().type('nothing native compiles, and it just works');
console.log(edit.text()); // → nothing native compiles, and it just works
// Drive Calculator to 5 + 3 = 8 — by name, not pixels:
const calc = await umbriel.launch(['cmd', '/c', 'start', 'calc'], { title: 'Calculator' });
for (const name of ['Five', 'Plus', 'Three', 'Equals'])
calc.find({ controlType: ControlType.Button, name })?.invoke();
console.log(calc.find({ automationId: 'CalculatorResults' })?.name); // → "Display is 8"
Why Umbriel?
The Windows desktop-automation corner of npm is a minefield of native-addon build failures, paywalls, and abandoned daemons. There has been no zero-install, typed, in-process Windows-automation client for Node or Bun — until this.
Because Umbriel is plain TypeScript over Bun's own FFI, it:
- Can't be paywalled — there's no compiled binary to gate behind a subscription registry.
- Has no build step — no ABI matrix, no
MSVCor Python toolchain, nonode-gyp. - Talks to Windows in-process — no
127.0.0.1:4723round-trip, no Appium daemon, no Developer Mode, noWinAppDriver.
<details> <summary><b>How the alternatives compare</b> (npm weekly downloads, week of 2026-06-05)</summary>
| Tool | Weekly dl | The catch |
|---|---|---|
| FlaUI / pywinauto / AutoIt | n/a | A whole foreign runtime (.NET / Python / bespoke EXE) to install and ship. |
@bright-fish/node-ui-automation |
33 | The only real npm UIA wrapper — dead since 2022. |
@nut-tree-fork/nut-js |
32,360 | Fork of a now-paywalled original. Pixel/image-match only — no semantic model. |
appium-windows-driver |
30,749 | Needs an Appium server plus a separate WinAppDriver.exe Microsoft hasn't maintained in years. |
robotjs / @jitsi/robotjs |
11,375 / 15,333 | node-gyp C++ compile — the #1 documented install failure. Blind pixels + keystrokes, no element model. |
uiohook-napi |
21,965 | Healthy, but global hooks run on a foreign thread and can segfault. |
</details>
Highlights
| Capability | What it does | |
|---|---|---|
| 🌐 | Chromium & Electron | Drive the in-page DOM of Chrome, Edge, and Electron apps (Discord, Slack, Spotify, VS Code) as real elements — same API as native controls. |
| 🛠️ | Drive the OS, not just GUIs | Registry (read + typed write + key create/delete), processes (info / kill / suspend / reprioritize), services (+ config), scheduled tasks (+ create / delete), firewall rules, network adapters & connections, session power, volumes & free space, env vars, event log, displays (read + set mode) — all native, no PowerShell. |
| 📋 | Clipboard | Large-text paste with no per-keystroke corruption, plus copy-and-read from any app. |
| 🌑 | Drive in the dark | invoke / scroll / setValue / toggle move no cursor — they work on hidden, minimized, occluded, or locked windows. |
| 🖼️ | Pixel & OCR fallback | Coordinate clicks, full-screen capture, template matching, and text recognition for canvases and games. |
| 🔎 | Reads everything | MSAA trees, bounding boxes, data-grid cells, enabled/checked state, native HWND hierarchies, text, and values. |
| 🌍 | Real Unicode input | Japanese, Korean, accented Latin, and emoji round-trip through three input paths — proven by a regression test. |
| 👁️ | See the unseen | Capture the live pixels of a GPU-composited or occluded window via Windows.Graphics.Capture. |
| 🎯 | Semantic targeting | Find controls by automationId, name, or role — exact matches filtered inside the target app for speed. |
| 🧩 | Works across the stack | Electron/Chromium, Java, Qt, WPF, Win32, WinForms, WinUI/UWP — each pinned by its own regression test. |
| ⏳ | waitFor |
Playwright-style auto-retry for flaky native UIs, with timeouts that quote the nearest candidates and your selector. |
Requirements
- Semantic first, pixels where there's no structure — custom-draw, games, and WebGL surfaces fall back to the built-in pixel + OCR layer; everything with a tree gets exact semantic targeting.
- Synthetic typing and real clicks need an unlocked desktop —
invoke, reads, andsetValuework even on a locked session, so prefer them. - Minimized driving is for classic Win32 windows —
invoke/setValue/togglekeep working on a minimized or fully backgrounded classic Win32/HWND window, but a UWP/WinUI store app suspends its UI thread and accessibility tree when minimized (the tree reads empty and posted actions don't land until it's restored), so restore it first. - Windows 10 or 11, Bun ≥ 1.1 — Windows-only and Bun-only, the owned trade-off for zero dependencies and in-process speed.
Going deeper
The complete API surface lives in AI.md — written so thoroughly that an agent (or a developer) never needs to read the source. Runnable demos are in example/.
<div align="center">
MIT Licensed · Built on bun:ffi with zero native dependencies
</div>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。