Skip to content
LangChain

XamlMcp for LangChain

io.github.trrahul/xamlmcp

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

client:LangChain transport:stdio runtime:nuget

Install XamlMcp in LangChain

pip install langchain-mcp-adapters

from langchain_mcp_adapters.client import MultiServerMCPClient

client = MultiServerMCPClient({
        "xamlmcp": {
            "transport": "stdio",
            "command": "dnx",
            "args": ["XamlMcp.Server", "--yes"],
        }
})

tools = await client.get_tools()

get_tools() returns the server's tools as LangChain tools, ready for an agent. LangChain docs

XamlMcp in other clients