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 分