WpfPilot MCP

WpfPilot MCP

MCP server for AI agents to automate Windows WPF apps with semantic UI Automation selectors, screenshots, recording, and FlaUI test generation.

Category
访问服务器

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):

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

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

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.

<details> <summary>Cursor</summary>

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

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

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

cursor-agent mcp list
cursor-agent mcp list-tools wpfpilot-mcp

</details>

<details> <summary>Codex</summary>

codex mcp add wpfpilot-mcp -- npx -y @skuzadev/wpfpilot-mcp
codex mcp list

Or ~/.codex/config.toml:

[mcp_servers.wpfpilot-mcp]
command = "npx"
args = ["-y", "@skuzadev/wpfpilot-mcp"]
enabled = true
startup_timeout_sec = 30
tool_timeout_sec = 60

</details>

<details> <summary>Claude Code</summary>

claude mcp add --transport stdio wpfpilot-mcp -- npx -y @skuzadev/wpfpilot-mcp
claude mcp list

Project .mcp.json:

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

</details>

<details> <summary>Claude Desktop</summary>

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

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

Restart Claude Desktop after saving.

</details>

<details> <summary>VS Code</summary>

Create .vscode/mcp.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"]}'

</details>

First prompt

After connecting the MCP client, ask:

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

Useful follow-up prompts:

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

Tool Purpose
wpf_capabilities List supported verbs, query kinds, and wait conditions.
wpf_query Read UI state.
wpf_act Perform UI actions.
wpf_wait Wait for UI state.
wpf_assert Verify 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).

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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选