LW

lysiuchenko/wpf-buddy-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

31 stars 2 forks 质量 67 趋势 15MIT

MCP服务器允许AI代理通过UI自动化驱动、测试和检查WPF桌面应用。

概览

附加到任何 WPF 应用。语义性地检查其 UI 树。自动化无坐标的工作流程。生成测试。诊断绑定错误。全部通过自然语言通过 MCP 完成。 通用的Windows自动化工具可以点击和输入。 给定任何WPF界面,语义上检查,自动化一个没有原始坐标的工作流程,解释WPF特有的失败,记录工作流程,确定性地重放,并导出可维护的自动化测试。 - .NET 8 SDK - Windows 10/11(UI 自动化仅限 Windows) 服务器会附加到任何正在运行的WPF进程,捕获完整的自动化树,并返回语义表示——控制类型、AutomationIds、名称、模式、状态。 所有操作都使用语义选择器(AutomationId → Name → ControlType),绝不使用原始屏幕坐标。选择器在界面变化时会自动修复。 记录 UI 交互作为工作流程,验证选择器的稳定性,并导出带有页面对象类的生产环境 xUnit + FlaUI 测试代码。

概述(AI 翻译)

理解WPF应用的MCP服务器——不仅仅是像素。


连接到任何WPF应用。语义性地检查其UI树。自动化无坐标的工作流程。生成测试。诊断绑定错误。所有这些都通过自然语言通过MCP完成。


为什么会有这样的存在

通用的Windows自动化工具可以点击和输入。本服务器支持WPF。

通用自动化MCP WPFBuddy MCP
“点击位置(340,220)” “点击保存按钮”
“从屏幕上读取像素” “获取带有 AutomationID 的 UI 树”
“某些东西失败了” “保存按钮被禁用,因为SaveCommand.CanExecute返回false——Name属性为空”
“这是截图” “这是元素树、它的绑定、验证状态和DataContext”

核心差异化

给定任何 WPF 界面,语义上检查,自动化一个没有原始坐标的工作流,解释 WPF 特有的故障,记录工作流,确定性地回放,并导出可维护的自动化测试。


快速启动

先决条件

  • .NET 8 SDK
  • Windows 10/11(UI 自动化仅限 Windows)

建造与奔跑

连接你的MCP客户端

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。


Why This Exists

Generic Windows automation tools can click and type. This server understands WPF.

Generic Automation MCP WpfBuddy MCP
“Click at position (340, 220)” “Click the Save button”
“Read pixels from screen” “Get the UI tree with AutomationIds”
“Something failed” “The Save button is disabled because SaveCommand.CanExecute returns false — the Name property is empty”
“Here’s a screenshot” “Here’s the element tree, its bindings, validation state, and DataContext”

Core Differentiator

Given any WPF screen, inspect it semantically, automate a workflow without raw coordinates, explain WPF-specific failures, record the workflow, replay it deterministically, and export a maintainable automated test.


Quick Start

Prerequisites

  • .NET 8 SDK
  • Windows 10/11 (UI Automation is Windows-only)

Build & Run

dotnet build WpfBuddyMcp.sln
dotnet run --project src/WpfBuddy.Mcp.Server

Connect Your MCP Client


What Can It Do?

Attach & Inspect

"Attach to WPFapp and show me the main window structure"

The server attaches to any running WPF process, captures the full automation tree, and returns a semantic representation — control types, AutomationIds, names, patterns, states.

Automate Without Coordinates

"Click 'New Project', fill in Name as 'Test Project', then click Save"

All actions use semantic selectors (AutomationId → Name → ControlType), never raw screen coordinates. Selectors self-heal when the UI changes.

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "wpfbuddy-mcp": { "command": "dotnet", "args": ["run", "--project", "src/WpfBuddy.Mcp.Server/WpfBuddy.Mcp.Server.csproj"] } } }