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 集成