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
| Package | What it is |
|---|---|
XamlMcp.Avalonia |
In-process agent for Avalonia apps (net8.0, Avalonia 11.3.18+ and 12.x) |
XamlMcp.Wpf |
In-process agent for modern .NET WPF apps (net8.0-windows) |
XamlMcp.WinUI |
In-process agent for unpackaged WinUI 3 apps (Windows App SDK 2.3.1) |
XamlMcp.Maui |
Logical agent for .NET MAUI 10.0.80 (net10.0, Windows, and Android API 24+; screenshots require API 26+) |
XamlMcp.Windows.Input |
Shared guarded Win32 raw-input core used by Windows framework agents |
XamlMcp.Agent.Hosting |
Framework-neutral desktop discovery, authentication, and named-pipe host |
XamlMcp.Protocol |
Shared JSON-RPC contract — DTOs and framing; no UI-framework dependency |
XamlMcp.Server |
Stdio MCP server: a dotnet tool named xamlmcp that connects AI clients to running agents |
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