UIAutomationMcp

io.github.trsdn由 GitHub 账号 trsdn 发布v1.0.2更新于 Oct 25, 2026

Windows UI Automation MCP server for desktop inspection and element lookup. Windows only.

已验证STDIO仅桌面浏览器自动化开发者工具

概览

AI 生成的概览

仅限 Windows 的 MCP 服务器,让助手通过 Windows UI Automation 检查并控制桌面应用程序。

可以做什么
检查桌面根元素与焦点元素,包括边界、运行时 ID 和支持的模式,并可从窗口句柄或屏幕坐标解析元素。按名称、类名、自动化 ID、框架 ID、控件类型或进程 ID 搜索 UI Automation 树,并在原始、控件和内容视图中枚举子元素、后代与遍历器。读取文本、选中项、光标位置、注释片段和表格单元格矩阵,并等待焦点、属性变更或结构变更事件。执行聚焦、调用、设值、切换、展开/折叠、选择、窗口状态变更、移动/调整大小、滚动、范围值更新、视图切换和 MSAA 默认操作等动作。
适用场景
当助手需要观察或操作暴露 UI Automation 的 Windows 桌面应用时适用,包括通过旧版辅助功能桥接的 Win32、MFC 和安装程序窗口,也可在无需滚动的情况下定位长虚拟化列表中的条目。
运行要求
需要 Windows 和交互式桌面会话;UI Automation 无法无头运行。以本地 stdio 进程安装,例如通过 npm 包、NuGet .NET 工具、VS Code 扩展、Claude Desktop 捆绑包或独立 ZIP。未声明认证、环境变量或请求头。
安装前请注意
该服务器可对桌面应用执行操作:聚焦、调用、设值、切换、调整大小、滚动和更改窗口状态,可能修改或提交目标应用中的数据。它会读取桌面屏幕内容和元素元数据,请避免在打开敏感窗口时运行。

安装

在 SourceWeft 中

  1. 打开 控制台中的 UIAutomationMcp,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

UIAutomationMcp

[VS Code Marketplace] [License: MIT] [.NET] [Platform]

Windows UI Automation toolkit with three aligned entry points:

  • CLI (uiamcp)
  • MCP server (UIAutomationMcp.McpServer)
  • VS Code extension (uia-mcp)

Install

VS Code extension (recommended) — install trsdn.uia-mcp from the Marketplace (code --install-extension trsdn.uia-mcp), or install the UIAutomationMcp-<version>.vsix from the latest release. Self-contained; bundles the MCP server, the CLI, and both agent skills.

Claude Desktop — download uia-mcp-<version>.mcpb from the latest release and double-click it.

npm — uia-mcp ships the MCP server with the .NET runtime bundled, so it needs no prerequisites:

json
{  "mcpServers": {    "uia-mcp": { "command": "npx", "args": ["-y", "uia-mcp"] }  }}

NuGet .NET tools

powershell
dotnet tool install --global UIAutomationMcp.McpServer   # MCP server -> uiamcp-serverdotnet tool install --global UIAutomationMcp.CLI         # CLI        -> uiamcp

Standalone ZIP — UIAutomationMcp-MCP-Server-<version>-windows.zip contains the self-contained MCP server and CLI; no .NET runtime required.

Requires Windows and an interactive desktop session. UI Automation cannot run headless.

Lineage

This repository is part of the broader MCP automation lineage and intentionally keeps attribution to earlier work by Stefan Brönner.

It also keeps the historical reference to Excel MCP as a related sibling project in that lineage, even though this repository itself is focused on Windows UI Automation.

What it does

  • boots a typed UI Automation client through Interop.UIAutomationClient
  • reads rich desktop-root and focused-element metadata, including bounds, runtime IDs, and supported patterns
  • resolves elements from native window handles and screen coordinates
  • searches UIA trees by name, class name, automation id, framework id, control type, and process id
  • enumerates immediate children from raw, control, or content tree views
  • enumerates descendants from raw, control, or content tree views
  • navigates the UIA tree with raw, control, and content walkers
  • supports build-cache requests for inspection, search, and navigation
  • reads text, selection, and key pattern states, including caret position, annotation runs such as spelling errors, and the containing document of an inline element
  • waits for focus, automation, property-changed, and structure-changed events
  • performs common actions such as focus, invoke, set-value, toggle, expand/collapse, selection, window state changes, move/resize, scroll, range-value updates, view switching, docking, realizing virtualized items, and MSAA default actions
  • finds items that a virtualizing list has not materialized yet by asking the container directly, so a search for the 250th row of a 300-row list works without scrolling
  • reports drag and drop state (isGrabbed, drop effects, grabbed items) so an in-progress drag can be observed, and resolves automation events to readable names such as Drag_DragStart
  • reads MSAA data through the LegacyIAccessible bridge, so Win32, MFC, and installer windows that expose no native UI Automation provider still report usable names, roles, states, and a runnable default action
  • reads tabular controls as a cell matrix with row and column headers
  • exposes the same expanded surface through CLI and MCP
  • packages the CLI and MCP server inside the VS Code extension

Repository layout

  • src\UIAutomationMcp.ComInterop
  • src\UIAutomationMcp.Service
  • src\UIAutomationMcp.CLI
  • src\UIAutomationMcp.McpServer
  • src\UIAutomationMcp.Smoke
  • vscode-extension
  • mcpb — Claude Desktop bundle sources and build script
  • skills — agent skills for uia-cli and uia-mcp

Build and validate

powershell
dotnet build .\UIAutomationMcp.sln -c Release.\src\UIAutomationMcp.Smoke\bin\Release\net9.0-windows\UIAutomationMcp.Smoke.exe.\src\UIAutomationMcp.CLI\bin\Release\net9.0-windows\uiamcp.exe inspect --root --cache.\src\UIAutomationMcp.CLI\bin\Release\net9.0-windows\uiamcp.exe find --focused --scope children --max-results 10 --cache.\src\UIAutomationMcp.CLI\bin\Release\net9.0-windows\uiamcp.exe children --focused --view raw --max-results 10.\src\UIAutomationMcp.CLI\bin\Release\net9.0-windows\uiamcp.exe descendants --focused --view raw --max-results 25.\src\UIAutomationMcp.CLI\bin\Release\net9.0-windows\uiamcp.exe wait-event --event-kind focus --timeout-ms 500.\src\UIAutomationMcp.CLI\bin\Release\net9.0-windows\uiamcp.exe action focus --focused

Related docs

来源:README.md,提交 ec0ffb1

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.2最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分