XamlMcp

MCP.Pizza Chef: trrahul

XamlMcp lets your AI assistant interact with running XAML-based applications like Avalonia, WPF, WinUI 3, and .NET MAUI on Windows and Android. It enables inspecting UI elements, reading and writing properties, capturing screenshots, sending input, and invoking commands. This requires adding XamlMcp packages to your app and running the XamlMcp server tool. It works locally and connects securely to AI clients such as Claude Code and GitHub Copilot, helping developers debug and automate their UI apps.

Other

Use This MCP server To

Inspect the visual and logical tree of my running XAML app Read and modify UI element properties live Capture screenshots from my app for debugging Send input events to test UI interactions Invoke commands and automation patterns in the app Observe UI changes in real time during development Authenticate and securely connect AI tools to my app

README

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

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

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

XamlMcp FAQ

Can I use XamlMcp to inspect and control my Avalonia or WPF app?
Yes — it supports Avalonia 11.3.18+, modern .NET WPF, WinUI 3, and .NET MAUI on Windows and Android.
Do I need an API key or account to use XamlMcp?
No — it runs locally and connects to your app via a secure local channel without external accounts.
How difficult is it to set up XamlMcp?
It requires developer skills — you must add packages to your app and configure it in code.
Which AI clients can connect to XamlMcp?
It works with MCP clients like Claude Code, Codex, and GitHub Copilot.
Can I use XamlMcp to capture screenshots and send input to my app?
Yes — it can capture screenshots, send input, and invoke commands in the running app.
Does XamlMcp support Mac or iOS apps?
No — native MAUI nodes for iOS and Mac Catalyst are not supported.
What .NET versions do I need?
Your app must target .NET 8 or later; the XamlMcp tool requires .NET 10 SDK/runtime.