WpfPilot MCP

io.github.skuzadev由 GitHub 帳號 skuzadev 發布v0.1.1更新於 Oct 24, 2026

Automate Windows WPF apps from AI agents with semantic UIA selectors and FlaUI test generation.

發布方自己的服務:QuickBooks Connector by Meridian

已驗證STDIO僅桌面瀏覽器自動化開發者工具

概覽

AI 產生的概覽

一個本機 Windows MCP 伺服器,讓 AI 代理透過 UI Automation 選擇器檢視、操作與測試 WPF 桌面應用程式,並產生 FlaUI 測試。

可以做什麼
附加到或啟動 WPF 處理程序,並透過 wpf_capabilities 與 wpf_query 列出支援的動詞、查詢類型與等待條件,從語意化 UI 快照(而非螢幕座標)讀取文字、值、狀態、邊界、模式、子節點、祖先、兄弟節點與選取項目。使用 wpf_act 執行點擊、設值、選取、切換、展開、收合、捲動與拖放等 UI 操作。使用 wpf_wait 與 wpf_assert 等待並斷言 UI 狀態,回傳結構化錯誤。擷取螢幕截圖、錄製工作流程並產生 xUnit + FlaUI 測試程式碼。可選擇連接行程內探針,取得 ViewModel、繫結、命令、驗證與調度器診斷資訊。
適用情境
適合 AI 編碼代理需要驅動或偵錯 Windows WPF 桌面應用程式的情境:瀏覽 UI 樹、重現工作流程、診斷控制項為何停用,或把錄製的互動轉成自動化 xUnit + FlaUI 測試。
執行需求
Windows 10/11 以及要自動化的 WPF 應用程式。使用 npx(建議)需要 Node.js 18+;發行版二進位檔或 npm 啟動器不需要 .NET SDK。npm 啟動器首次執行時會下載最新的 Windows 發行版二進位檔。選用探針必須在目標應用程式中明確安裝。未宣告驗證、環境變數或標頭。
安裝前請注意
以你的使用者帳戶執行,可與該帳戶可見的任何 UI 互動;會變更 UI 的操作會記錄在使用者本機應用程式資料資料夾中。它不提供 shell、登錄檔或任意檔案系統工具。探針必須在目標 WPF 應用程式中明確安裝。npm 啟動器首次執行會下載發行版二進位檔,啟用前應將其視為可信任的本機程式碼。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 WpfPilot MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

WpfPilot MCP

WpfPilot MCP is a local Model Context Protocol server for Windows WPF applications. It lets AI coding agents inspect UI Automation trees, click and type through semantic selectors, diagnose WPF-specific issues, record workflows, and generate xUnit + FlaUI tests.

[.NET 8] [MCP] [Windows] [License]

Features

  • Attach to or launch WPF processes.
  • Capture semantic UI snapshots (selectors, not screen coordinates).
  • Query text, value, state, bounds, patterns, children, ancestors, siblings, and selection.
  • Act with verbs such as click, set value, select, toggle, expand, collapse, scroll, and drag/drop.
  • Wait and assert on UI state with structured errors.
  • Capture screenshots.
  • Record workflows and generate test code.
  • Optional in-process probe for ViewModel, binding, command, validation, and dispatcher diagnostics.

Requirements

  • Windows 10/11.
  • A WPF application to automate.
  • Node.js 18+ if using npx (recommended). No .NET SDK required for the release binary or npm launcher.

Getting started

Add this to your MCP client configuration (global or project-scoped):

json
{  "mcpServers": {    "wpfpilot-mcp": {      "type": "stdio",      "command": "npx",      "args": ["-y", "@skuzadev/wpfpilot-mcp"]    }  }}

Or run directly (stdio; waits for an MCP client):

powershell
npx -y @skuzadev/wpfpilot-mcp

The npm launcher downloads the latest Windows release binary on first run, then proxies stdio to it.

Other installs (persistent wpfpilot-mcp command, release zip, uninstall): see Install WpfPilot.

Popular clients

Use the standard config above unless noted. More clients: docs/all-clients.md.

Cursor

Global: ~/.cursor/mcp.json (do not add a project .cursor/mcp.json unless you need a repo-specific override)

json
{  "mcpServers": {    "wpfpilot-mcp": {      "type": "stdio",      "command": "npx",      "args": ["-y", "@skuzadev/wpfpilot-mcp"]    }  }}

Or: Cursor Settings → MCP → Add new MCP Server — command npx, args -y @skuzadev/wpfpilot-mcp.

powershell
cursor-agent mcp listcursor-agent mcp list-tools wpfpilot-mcp
Codex
powershell
codex mcp add wpfpilot-mcp -- npx -y @skuzadev/wpfpilot-mcpcodex mcp list

Or ~/.codex/config.toml:

toml
[mcp_servers.wpfpilot-mcp]command = "npx"args = ["-y", "@skuzadev/wpfpilot-mcp"]enabled = truestartup_timeout_sec = 30tool_timeout_sec = 60
Claude Code
powershell
claude mcp add --transport stdio wpfpilot-mcp -- npx -y @skuzadev/wpfpilot-mcpclaude mcp list

Project .mcp.json:

json
{  "mcpServers": {    "wpfpilot-mcp": {      "type": "stdio",      "command": "npx",      "args": ["-y", "@skuzadev/wpfpilot-mcp"]    }  }}
Claude Desktop

Windows config: %APPDATA%\Claude\claude_desktop_config.json

json
{  "mcpServers": {    "wpfpilot-mcp": {      "type": "stdio",      "command": "npx",      "args": ["-y", "@skuzadev/wpfpilot-mcp"]    }  }}

Restart Claude Desktop after saving.

VS Code

Create .vscode/mcp.json:

json
{  "servers": {    "wpfpilot-mcp": {      "type": "stdio",      "command": "npx",      "args": ["-y", "@skuzadev/wpfpilot-mcp"]    }  }}

Or: code --add-mcp '{"name":"wpfpilot-mcp","command":"npx","args":["-y","@skuzadev/wpfpilot-mcp"]}'

First prompt

After connecting the MCP client, ask:

text
List the WpfPilot tools and attach to my running WPF application.

Useful follow-up prompts:

text
Show the main window UI tree.Click the Save button using a selector, not coordinates.Wait until the status text says Saved.Why is the Submit button disabled?Record this workflow and generate an xUnit test.

Tools

ToolPurpose
wpf_capabilitiesList supported verbs, query kinds, and wait conditions.
wpf_queryRead UI state.
wpf_actPerform UI actions.
wpf_waitWait for UI state.
wpf_assertVerify UI state.

Full tool list: docs/tools-reference.md.

Optional WPF probe

The probe runs inside your WPF process and exposes diagnostics that UI Automation cannot see directly (bindings, ViewModels, commands, validation).

text
Use wpf_probe_connect, then inspect my ViewModel and binding errors.

Setup: docs/probe-setup.md.

Safety

WpfPilot is intended for local development and test automation.

  • It runs as your user account and can interact with UI visible to that account.
  • It does not expose general shell, registry, or arbitrary filesystem tools through MCP.
  • Mutating UI actions are audited under the user's local app data folder.
  • The probe requires explicit installation in the target WPF app.
  • Treat every MCP server as trusted local code before enabling it in an agent.

Troubleshooting

wpfpilot-mcp is not recognized

Restart your terminal after running the installer, or use the full path to wpfpilot-mcp.exe in your MCP client configuration. See all-clients.md.

Server starts but no tools appear

Restart the MCP client and check its MCP logs. Also verify npx -y @skuzadev/wpfpilot-mcp runs from a normal terminal.

Cannot attach to an app

Make sure the WPF app is running in the same user session and at a compatible privilege level. If the app runs as administrator, the MCP client may also need to run elevated.

Probe cannot connect

Confirm the target app called ProbeHost.Start(), then use wpf_probe_status and wpf_probe_connect. If needed, pass wpfpilot-mcp-probe-{ProcessId} explicitly.

Documentation

Contributing

See CONTRIBUTING.md.

License

MIT. See LICENSE.

來源:README.md,提交 0ed887d

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.1.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

其他 Pilot 整合