原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

XamlMcp

作者:trrahul版本 1.0.0-preview.2i★ –i在你的电脑上运行
注册名称io.github.trrahul/xamlmcp

安装

概览

作者提供的说明(英文原文)

Inspect and drive Avalonia, WPF, WinUI, and .NET MAUI apps through MCP.

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 其他

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:1 项中通过 1 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 注册中心没有列出需要填写的密钥。

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json

{
  "mcpServers": {
    "xamlmcp": {
      "command": "dnx",
      "args": [
        "XamlMcp.Server",
        "--yes"
      ]
    }
  }
}

在终端中运行这条命令

claude mcp add xamlmcp -- dnx XamlMcp.Server --yes

在 Cursor 中打开

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "xamlmcp": {
      "command": "dnx",
      "args": [
        "XamlMcp.Server",
        "--yes"
      ]
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

在 VS Code 中打开

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "xamlmcp": {
      "type": "stdio",
      "command": "dnx",
      "args": [
        "XamlMcp.Server",
        "--yes"
      ]
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。

你的选择通过 Cookie 保存在这台设备上,无需账户。

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月7日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 trrahul 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“其他”中的其他服务器比较i

  • 星标数多于此分类中其他 32691 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 32691 个服务器的 21% 更新
  • 基础检查结果等于或优于此分类中其他 32691 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

XamlMcp 安全吗?

它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(1.0.0-preview.2)于3个月前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 .NET。

有什么可以替代它?

同一分类中有:Spec Driven Development, Remote Desktop Commander, Dialyne

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

Spec Driven Development

作者:formulahendry

MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.

在你的电脑上运行★ 440MIT14个月前更新
安装

Remote Desktop Commander

作者:desktop-commander

Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.

在云端运行★ 211前天更新
安装

Dialyne

作者:dialyne

Real phone calls in France for AI agents: dial +33 numbers, menus, hold, AI disclosure.

在云端运行今天更新
安装

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

XamlMcp

XamlMcp is an open-source XAML MCP server and AI inspection toolkit for Avalonia, WPF, WinUI 3, and .NET MAUI. It lets Claude Code, Codex, GitHub Copilot, and other MCP clients inspect and drive a running application: walk the visual or logical tree, read and write properties, inspect styles and resources, capture screenshots, send input, invoke commands and automation patterns, and observe changes over an authenticated local transport.

See the XamlMcp installation and configuration guide for a focused setup path across supported frameworks and AI clients.

The current release is 1.0.0-preview.3. It supports Avalonia, modern .NET WPF, self-contained unpackaged WinUI 3, and .NET MAUI on Windows and Android. Protocol version 2 is stable. Native MAUI nodes, iOS, and Mac Catalyst are unsupported.

See the changelog for user-facing release history and the framework feature and tool matrix for per-tool support and capability limits. The preview release guide explains the package roles, installation options, and verification commands.

Packages

PackageWhat it is
XamlMcp.AvaloniaIn-process agent for Avalonia apps (net8.0, Avalonia 11.3.18+ and 12.x)
XamlMcp.WpfIn-process agent for modern .NET WPF apps (net8.0-windows)
XamlMcp.WinUIIn-process agent for unpackaged WinUI 3 apps (Windows App SDK 2.3.1)
XamlMcp.MauiLogical agent for .NET MAUI 10.0.80 (net10.0, Windows, and Android API 24+; screenshots require API 26+)
XamlMcp.Windows.InputShared guarded Win32 raw-input core used by Windows framework agents
XamlMcp.Agent.HostingFramework-neutral desktop discovery, authentication, and named-pipe host
XamlMcp.ProtocolShared JSON-RPC contract — DTOs and framing; no UI-framework dependency
XamlMcp.ServerStdio MCP server: a dotnet tool named xamlmcp that connects AI clients to running agents

Install

Prerequisite: the app you inspect can target .NET 8 or later, but the xamlmcp tool (and building this repo or the sample from source) needs the .NET 10 SDK/runtime.

Add the agent package for your UI framework:

dotnet add package XamlMcp.Avalonia --version 1.0.0-preview.3

dotnet add package XamlMcp.Wpf --version 1.0.0-preview.3 dotnet add package XamlMcp.WinUI --version 1.0.0-preview.3 dotnet add package XamlMcp.Maui --version 1.0.0-preview.3

The agent's floor is Avalonia 11.3.18. If your project pins older references (the current avalonia.app template pins 11.3.0) restore fails with a NU1605 package-downgrade error — bump your Avalonia.* package references to at least 11.3.18.

Install the MCP server tool:

dotnet tool install --global XamlMcp.Server --version 1.0.0-preview.3

You can also run the server without a global installation:

dnx XamlMcp.Server@1.0.0-preview.3

Attach the Avalonia agent

Two entry points provide explicit diagnostic opt-in. Nothing listens unless you enable the agent per build (option B) or per launch (option A):

using XamlMcp.Avalonia;

// Option A - fluent, in BuildAvaloniaApp. Compiled in, but INERT unless the // XAML_MCP=1 environment variable is set when the app launches. public static AppBuilder BuildAvaloniaApp() => AppBuilder.Configure () .UsePlatformDetect() .AttachXamlMcp();

// Option B - on the Application instance (e.g. in OnFrameworkInitializationCompleted). // Marked [Conditional("DEBUG")]: the CALL SITE disappears from YOUR Release builds. public override void OnFrameworkInitializationCompleted() { this.AttachXamlMcp(); base.OnFrameworkInitializationCompleted(); }

Why two shapes? [Conditional] requires a void method, so the fluent AppBuilder overload can't use it and gates on the environment variable instead. And why not a plain #if DEBUG inside the package? That would gate on how *this package* was compiled at pack time and could never see *your* app's configuration at all. Both overloads instead gate on your build configuration or your launch environment.

Know the difference: option B's call is gone from your Release binaries; option A's code ships in Release but stays inert unless XAML_MCP=1 is present at launch — anyone who controls the launch environment can enable it. If you need hard exclusion with the fluent shape, wrap the .AttachXamlMcp() line in your own #if DEBUG.

Attach the WPF agent

Call the extension on the WPF Application in OnStartup:

using System.Windows;

using XamlMcp.Wpf;

public partial class App : Application { protected override void OnStartup(StartupEventArgs e) { this.AttachXamlMcp(); base.OnStartup(e); } }

The WPF method is [Conditional("DEBUG")], so the call site disappears from the consuming app's Release build. There is no environment-enabled WPF overload. The agent uses the Application.Dispatcher that performs attachment. Windows and controls owned by secondary WPF UI threads are excluded.

Attach the WinUI agent

Attach on the WinUI UI thread, explicitly register each Window, and keep the calls inside the application's diagnostic build gate:

using Microsoft.UI.Xaml;

using XamlMcp.WinUI;

public partial class App : Application { private WinUiXamlMcpSession? _xamlMcp; private IDisposable? _windowRegistration;

protected override void OnLaunched(LaunchActivatedEventArgs args) { var window = new MainWindow(); #if DEBUG var session = WinUiXamlMcp.Attach(); _xamlMcp = session; _windowRegistration = session.RegisterWindow(window); window.Closed += async (_, _) => { _windowRegistration?.Dispose(); await session.DisposeAsync(); }; #endif window.Activate(); } }

Attach() is not conditionally compiled: the caller owns the #if DEBUG or equivalent diagnostic gate. One session supports one DispatcherQueue and explicitly registered windows on that queue. The supported floor is Windows App SDK 2.3.1, target framework net8.0-windows10.0.19041.0, Windows 10 1809 (10.0.17763.0), and win-x64.

WinUI support is unpackaged. Use WindowsPackageType=None, WindowsAppSDKSelfContained=true, and publish to a fresh directory:

dotnet publish MyWinUiApp.csproj -c Release -r win-x64 --self-contained true -o artifacts/winui

The publish output must retain the generated .xbf and .pri resources. MSIX/package identity, certificates, Store distribution, XAML Islands, and multiple UI threads are unsupported.

Attach the .NET MAUI agent

Call UseXamlMcp() while building the MAUI app, inside the application's diagnostic build gate:

using XamlMcp.Maui;

public static MauiApp CreateMauiApp() { var builder = MauiApp.CreateBuilder() .UseMauiApp ();

#if DEBUG builder.UseXamlMcp(); #endif

return builder.Build(); }

The same package and UseXamlMcp() call work in unpackaged Windows applications and debuggable Android applications on MAUI 10.0.80. The package does not inspect the consumer's configuration, so the caller must own the #if DEBUG or equivalent diagnostic gate. Android projects must set SupportedOSPlatformVersion to 24.0 or later. Screenshots require API 26 or later.

On Windows, the agent writes a discovery file under %LOCALAPPDATA%/XamlMcp/instances/ (override the directory with XAML_MCP_DIR) and serves JSON-RPC 2.0 on a current-user named pipe. On Android, it listens only on device loopback and stores a per-launch descriptor in app-private storage. The server reads that descriptor through debuggable run-as access and creates an owned adb forward only while connecting. Both transports require the per-launch token before any inspection call.

To discover an Android app, pass its application ID to the MCP server. Select a device explicitly when more than one authorized device is online:

claude mcp add xamlmcp -- xamlmcp --android-package dev.example.app --android-device emulator-5554

The Windows build prerequisites are the .NET 10 SDK and MAUI Windows workload. Android also requires the .NET Android workload and Android SDK platform tools (adb). iOS and Mac Catalyst are unsupported.

Connect an AI client

XamlMcp is a local stdio MCP server. Claude Code or Codex starts it when the client session needs it; you do not run a persistent server process.

This repository includes portable project configuration for both clients:

  • .mcp.json configures Claude Code.
  • .codex/config.toml configures Codex in a trusted checkout.

Both configurations run the pinned preview directly from NuGet with dnx, so they require the .NET 10 SDK but no global tool installation. After cloning the repository, open a new client session and verify the registration:

claude mcp get xamlmcp

codex mcp get xamlmcp

To register the pinned preview for your user account or from another project, run:

claude mcp add --scope user xamlmcp -- dnx XamlMcp.Server@1.0.0-preview.3

codex mcp add xamlmcp -- dnx XamlMcp.Server@1.0.0-preview.3

Alternatively, install the tool globally and register its xamlmcp command:

dotnet tool install --global XamlMcp.Server --version 1.0.0-preview.3

claude mcp add --scope user xamlmcp -- xamlmcp codex mcp add xamlmcp -- xamlmcp

If a client already has a server named xamlmcp, remove or update that entry before adding the new one. Use claude mcp remove xamlmcp --scope or codex mcp remove xamlmcp as appropriate.

Launch an instrumented application next. Set XAML_MCP=1 when using Avalonia's fluent attachment form. Then ask the client to call `list-apps` → `attach(instanceId)` → any tool below. Integer PID attach remains a Windows desktop compatibility path.

ToolPurpose
list-appsRunning instrumented apps (opaque instance id, platform, and sanitized metadata; desktop entries also include pid)
attachConnect to one app; reports its per-tool capability flags
detachRelease the current app connection and its transport resources
treeVisual/logical tree snapshot; the source of node ids
searchFind nodes by automation id / type / name / style class / pseudo-class / text
ancestorsAncestor chain of a node
propsProperties with value, source/priority, automation patterns, command slots
set-propWrite a property, or clear a local value (unset)
stylesApplied style selectors and setters (capability-gated)
bindingsActive bindings, source/path/status/errors, DataContext origin, and template identity
failuresBounded binding/dispatcher failure evidence after an optional action correlation cursor
resourcesResolved resources visible at a node or app scope
pseudo-classToggle :pointerover, :pressed, …
screenshotPNG of a window or node, with an optional same-capture node map — returned as a real MCP image
wait-forBounded polling for existence, visibility, enabled/focused state, or a property predicate
hit-testDeepest-first visual stack at logical coordinates, with node references and scaling
inputSynthesized clicks, keys, text, wheel
actionAutomation patterns (invoke/toggle/select/…) and bound ICommands
assetsEnumerate opaque framework asset identifiers (avares://, WPF pack, xamlmcp-asset:///, or maui-asset:///)
open-assetRead an asset (images as images, text as text)
dialog-waitDriver, opt-in: wait for a native dialog (file picker, message box) the app opened

| dialog-act | Driver, opt-in: act on it — set-file-name, `accep

只显示了开头部分;其余内容请在仓库中阅读

问 PopNx