Skip to main content
MCP server CX Codex

bun-uia — Claude Code MCP server: drive Windows GUI

An MCP server that hands your coding agent control over native Windows windows through UI Automation. Useful when the target app is a desktop program, not a browser.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env BUN_UIA_PROFILE=<BUN_UIA_PROFILE> --env BUN_UIA_OS=<BUN_UIA_OS> --env BUN_UIA_ALLOW=<BUN_UIA_ALLOW> --env BUN_UIA_DENY=<BUN_UIA_DENY> --env BUN_UIA_CURSOR=<BUN_UIA_CURSOR> --transport stdio bun-uia -- npx -y bun-uia
Open on GitHub

What bun-uia does

bun-uia is a Bun-based MCP server that exposes Windows UI Automation to an AI agent. The agent can walk the element tree of a native window, read control state, and act on it. The author pitches it as Playwright for the Windows desktop.

It runs over stdio with npx -y bun-uia. Configuration comes through environment variables: BUN_UIA_PROFILE, BUN_UIA_OS, BUN_UIA_ALLOW, BUN_UIA_DENY, BUN_UIA_CURSOR. The allow and deny lists decide which applications the agent may touch. Skip them and the server still starts, but nothing scopes its reach across your machine.

Windows is the only supported target, since UI Automation lives there. On macOS or Linux there is no API to bind to, so the server has nothing to talk to. You need Node.js or Bun available for npx to work.

What it helps with

  • read the element tree of a native Windows window
  • click a button in a desktop app from the agent
  • restrict which applications the agent can reach
  • script a GUI workflow without manual clicking
  • pull control state out of a window as text

Example prompts for the agent

  • Connect to the Notepad window and list the elements inside it
  • Find the Save button in the open window and click it
  • Limit the agent to calc.exe and report what it can see

How to install bun-uia

Platform CLI

claude mcp add --env BUN_UIA_PROFILE=<BUN_UIA_PROFILE> --env BUN_UIA_OS=<BUN_UIA_OS> --env BUN_UIA_ALLOW=<BUN_UIA_ALLOW> --env BUN_UIA_DENY=<BUN_UIA_DENY> --env BUN_UIA_CURSOR=<BUN_UIA_CURSOR> --transport stdio bun-uia -- npx -y bun-uia

Replace <…> with your own values. 1 more environment variable is in the server README

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about bun-uia

How do I install bun-uia in Claude Code?

Run claude mcp add bun-uia -- npx -y bun-uia. To pass environment variables, use the longer form: `claude mcp add --env BUN_UIA_PROFILE=<BUN_UIA_PROFILE> --env BUN_UIA_OS=<BUN_UIA_OS> --env BUN_UIA_ALLOW=<BUN_UIA_ALLOW> --env BUN_UIA_DENY=<BUN_UIA_DENY> --env BUN_UIA_CURSOR=<BUN_UIA_CURSOR> --transport stdio bun-uia -- npx -y bun-uia`.

What does bun-uia do?

It gives an agent access to Windows UI Automation: finding elements in native windows, reading their state, and acting on them. It speaks MCP over stdio.

Which systems does bun-uia run on?

Windows only, because UI Automation is part of that OS. There is no way to start the server on macOS or Linux.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor