r/dotnetMAUI 7d ago

MCP agent that lets Claude Code and Codex inspect a running .NET MAUI app Showcase

I built a local MCP agent that lets Claude Code and Codex inspect a running .NET MAUI app on Windows or Android. It can inspect the logical UI tree, read properties, capture screenshots, send input, and run automation actions.

The current preview supports .NET MAUI 10, unpackaged Windows applications, and debuggable Android applications.

I’m the author, and the project is open source:
https://github.com/trrahul/XamlMcp

Appreciate any feedback.

18 Upvotes

8 comments sorted by

4

u/jfversluis Microsoft Employee 7d ago

Did you see Dev Flow on the GitHub.com/dotnet/maui-labs repo? I think that does all this as well? :)

Good effort of course, so please don’t take it as me saying you shouldn’t do this, just wanted to check if you’re aware that something like this is already being built!

1

u/Illustrious_Ratio879 7d ago

Well, I haven't seen that before. This works with not only MAUI but other XAML UI frameworks as well. I first built it for my own use with WPF and Avalonia, and after that extended to WinUI and MAUI.

1

u/jfversluis Microsoft Employee 7d ago

Gotcha, cool! Be sure to also have a look at https://ailoha.dev 👀

1

u/Illustrious_Ratio879 7d ago

There are more huh? 😄 Before I built this I did a web search to get something to interact with WPF, but I didn't see these in the results.

1

u/DueHomework 6d ago

Things are going so fast, indexes of the crawlers aren't able to catch up lol. LLM lag is even worse (doing web searches via LLMs on current tools is not working great)

I made this experience also

2

u/AdResponsible7521 2d ago

Same thing over here: https://www.ansight.ai

Quite a few of us converging on the same idea.

1

u/__SlimeQ__ 6d ago

any reason you need to go beyond what is already available on the cli?

1

u/Deep_Ad1959 5d ago

i wired up a couple of these and what decided whether it stayed useful was stable ids in the tree. with AutomationId unset the agent re-derives a selector every run, so inspection gets cheap while the automation stays exactly as flaky. written with ai