
用于 WPF 的 MCP 服务器和 CLI:检查可视化树和绑定,捕获可滚动内容,驱动鼠标/触摸输入,并将工作流记录为可运行的 xUnit 测试。
概览
Snoop + Playwright 用于 AI,通过模型上下文协议(Model Context Protocol)发布——可视化树、绑定、截图、鼠标拖动、触摸手势、文本输入和键盘。检查运行中的应用程序,无需更改源代码;触摸行为取决于应用程序的输入支持。 AI 代理通过可见文本查询控件,填写表单,选择列表项目,点击提交——然后通过拉取应用的绑定错误来解释状态框为何保持空白。每一步都是一次 MCP 工具调用(或 CLI 命令)。 记录工作流程并导出可运行的xUnit测试,包括拖动触摸;收集wpf_report的汇总诊断;捕获完整的可滚动内容;检查针对.NET Framework 4.7.2的应用。包含36个MCP工具、匹配的CLI命令、更可靠的更新器和更新的Codex伴随技能。感谢@miloszkukla在PR #22中的兼容性和截图工作。 1. 下载并解压最新版本的WpfVisualTreeMcp-vX.Y.Z-win-x64.zip(需要 .
概述(AI 翻译)
让AI代理查看、调试并驱动运行中的WPF应用。 Snoop + Playwright用于AI,通过模型上下文协议(Model Context Protocol)展示——可视化树、绑定、截图、鼠标拖拽、触摸手势、文本输入和键盘。检查运行中的应用,无需更改源代码;触摸行为取决于应用程序的输入支持。
AI 代理通过可见文本查询控件,填写表单,选择列表项,点击提交——然后通过拉取应用的绑定错误来解释状态框为何保持空缺。每一步都是一次 MCP 工具调用(或 CLI 命令)。
v0.17.0 新增内容:
38个MCP工具和匹配的CLI命令,支持鼠标悬停、纵横滚轮
输入和坐标点击。原生托管画布支持直接鼠标/触摸输入;
截图 auto 模式捕捉其可见内容。财产检查现已保留
WPF 自动/无界值,以及后台搜索读取复合标签和格式化标签。
Codex同伴技能包含了新的指令和升级指导。
工作流程录制/回放/xUnit 导出,汇总诊断,完整截图 而 .NET Framework 4.7.2 的支持则从 v0.16.0 继续提供。感谢@miloszkukla
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
WpfVisualTreeMcp
Let AI agents see, debug and drive running WPF apps. Snoop + Playwright for AI, exposed over the Model Context Protocol — visual tree, bindings, screenshots, mouse dragging, touch gestures, text input and keyboard. Inspect running apps without source changes; touch behavior depends on the application’s input support.
Drag-and-drop, move a canvas item, tap, hold, pan, pinch to zoom and rotate — then query controls, fill a form, select an item and diagnose a binding error. The gesture sequence records real WPF input through MCP, targets controls by AutomationId and checks the application’s response, just like the automated tests.
Watch the animated demo directly.
New in v0.20.0: Verified support for WPF on .NET 9, .NET 10 and .NET Framework 4.8.1, on both x86 and x64. CI exercises automatic injection and self-hosting across all six supported target frameworks, plus the installed C# SDK from .NET 8, 9 and 10 test projects. The x86 injection helper can also use .NET 9 or 10 when .NET 8 is absent.
The WpfVisualTreeMcp.Automation C# SDK
drives virtualized DataGrids/TreeViews, waits for controls, manages WPF windows and
streams property changes. The 38-tool MCP server and CLI share the inspection and
input engine, including direct AutomationId targeting.
Workflow recording/replay/xUnit export, aggregate diagnostics, full-content screenshots and .NET Framework 4.7.2 support remain available from v0.16.0. Thanks to @miloszkukla for the compatibility and screenshot work in PR #22.
Quickstart (60 seconds)
- Download and extract
WpfVisualTreeMcp-vX.Y.Z-win-x64.zipfrom the latest release (requires a .NET 8, 9 or 10 Desktop Runtime).
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"wpf-visual-tree": {
"command": "C:/path/to/WpfVisualTreeMcp.Server.exe",
"args": []
}
}
}