Skip to main content
Glama
trsdn

UIAutomationMcp

by trsdn

UIAutomationMcp

License: MIT .NET Platform

Windows UI Automation ツールキットであり、3 つの整合したエントリポイントを備えています:

  • CLI (uiamcp)

  • MCP サーバー (UIAutomationMcp.McpServer)

  • VS Code 拡張機能 (uia-mcp)

インストール

VS Code 拡張機能 (推奨) — マーケットプレイスで "UI Automation MCP" を検索するか、 UIAutomationMcp-<version>.vsix を 最新リリース から インストールします。 自己完結型で、MCP サーバー、CLI、および両方のエージェントスキルをバンドルしています。

Claude Desktop — uia-mcp-<version>.mcpb を最新リリースからダウンロードして、 ダブルクリックします。

NuGet .NET ツール

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

スタンドアロン ZIP — UIAutomationMcp-MCP-Server-<version>-windows.zip には 自己完結型の MCP サーバーと CLI が含まれており、.NET ランタイムは不要です。

Windows と対話型デスクトップセッションが必要です。UI Automation はヘッドレスでは実行できません。

Related MCP server: windows2text

系譜

このリポジトリは、より広範な MCP オートメーションの系譜に属しており、Stefan Brönner による以前の作業への帰属を意図的に保持しています。

また、このリポジトリ自体は Windows UI Automation に焦点を当てていますが、その系譜における関連する兄弟プロジェクトとして Excel MCP への歴史的な言及も保持しています。

機能

  • Interop.UIAutomationClient を通じて型付き UI Automation クライアントを起動します

  • 境界、ランタイム ID、サポートされているパターンなど、デスクトップルートとフォーカスされた要素のリッチなメタデータを読み取ります

  • ネイティブウィンドウハンドルと画面座標から要素を解決します

  • 名前、クラス名、オートメーション ID、フレームワーク ID、コントロールタイプ、プロセス ID で UIA ツリーを検索します

  • raw、control、content の各ツリービューから直接の子要素を列挙します

  • raw、control、content の各ツリービューから子孫要素を列挙します

  • raw、control、content のウォーカーを使用して UIA ツリーをナビゲートします

  • 検査、検索、ナビゲーションのためのビルドキャッシュ要求をサポートします

  • テキスト、選択、キーパターンの状態を読み取ります

  • フォーカス、オートメーション、プロパティ変更、構造変更の各イベントを待機します

  • フォーカス、呼び出し、値の設定、トグル、展開/折りたたみ、選択、ウィンドウ状態の変更、移動/サイズ変更、スクロール、範囲値の更新などの一般的なアクションを実行します

  • CLI と MCP を通じて同じ拡張サーフェスを公開します

  • CLI と MCP サーバーを VS Code 拡張機能内にパッケージ化します

リポジトリ構成

  • src\UIAutomationMcp.ComInterop

  • src\UIAutomationMcp.Service

  • src\UIAutomationMcp.CLI

  • src\UIAutomationMcp.McpServer

  • src\UIAutomationMcp.Smoke

  • vscode-extension

  • mcpb — Claude Desktop バンドルのソースとビルドスクリプト

  • skills — uia-cli と uia-mcp のエージェントスキル

ビルドと検証

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 MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI agents to select Windows desktop UI elements, windows, or screen regions via mouse hover, then obtain context through UI Automation, screenshots, and local OCR for MCP-compatible clients.
    2
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables Windows UI Automation screen-to-text and computer-use via MCP, allowing agents to observe, decide, and act on Windows applications through accessibility data without OCR.
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables MCP clients to observe and control the Windows desktop through the UI Automation accessibility tree — no vision model required — by exposing tools for reading windows and interactive elements, clicking, typing, scrolling, shortcuts, PowerShell, screenshots, virtual desktops, web scraping, file operations and persistent memory, including background-window control without stealing focus. An optional agent mode adds a single natural-language task tool that runs the full upstream agent loop when an LLM provider is configured.
    1
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables an MCP host to observe and control Windows desktop applications deterministically: reading UIA control trees, OCR text and pixel diffs, clicking, typing, scrolling and window management, plus verbatim text reading/appending via ValuePattern/TextPattern. Visual judgment is delegated back to the host model's own multimodal context through annotated screenshots, numbered element cards, grid maps and crosshair zoom-ins, so no separate vision model is needed.
    AGPL 3.0