What StockSharp DesktopDriver MCP server does
The StockSharp DesktopDriver MCP server gives an MCP client access to desktop applications built with Avalonia, WPF, or MAUI. It is intended for applications that include the relevant DesktopDriver bootstrap and toolkit adapter packages. The application exposes an automation endpoint only when started with the --ui-automation argument, allowing a runner or MCP process to connect to it.
Rather than interpreting pixels as the primary source of truth, the driver reads controls through the toolkit integration. A table can expose its columns and rows, a tree can expose its items, and a workspace can expose its panels. Supported adapter categories described by the project include grids, trees, lists, pickers, workspaces, charts, documents, and diagrams. Applications can also register adapters for custom controls.
How it works
A driven application starts a local named-pipe endpoint restricted to the current operating-system user. It records the endpoint location in the file supplied through --ui-automation-endpoint=<path>. The MCP server or another runner then attaches to that endpoint and validates the product, instance, and protocol during the session handshake.
After connecting, the client can request open windows and inspect their contents. It can also click, type, send key presses, scroll, and wait for the interface to report a changed state. The protocol uses structured control data and can provide pictures for human inspection, while tests can assert what controls report.
Setup and configuration
Install the MCP package with the .NET 10 SDK:
dotnet tool install StockSharp.DesktopDriver.Mcp --tool-path tools
The installed command is tools/desktop-driver-mcp. The target application must reference the bootstrap package for its toolkit and start its automation runtime when launched with the UI automation argument. Avalonia, WPF, and MAUI use corresponding bootstrap packages; the documented MAUI bootstrap applies to Windows.
The application should be started with an endpoint file path, or the MCP server can attach to an application that someone else started. Applications may ship a normal build without the driver and a separate build intended for automation. The application must also be configured with a product identity, version, and safety profile when its automation runtime starts.
Tools and capabilities
The StockSharp DesktopDriver MCP server can support agent operations for:
- Finding and connecting to an application endpoint.
- Listing open windows or other exposed surfaces.
- Reading structured controls, including grid data and rows.
- Clicking controls, entering text, pressing keys, and scrolling.
- Waiting for an interface state or response to change.
- Working with toolkit adapters for standard and application-specific controls.
The repository also provides a command-line client with operations such as find and grid-rows, plus separate client, runner, and testing packages for code-driven automation. Those packages are related to the same protocol but are not required when the MCP server is used by an agent.
Limitations and notes
The application must be instrumented with the appropriate DesktopDriver bootstrap; an unmodified desktop application does not expose the endpoint. The local endpoint is restricted to the current operating-system user, so this setup is for local automation rather than a remotely hosted UI.
Input safety depends on the startup profile. An application that stays within its own process can accept input, while an application connected to a broker, store, service, or other external system accepts input only when started with a test profile that replaces those dependencies. Without that profile, the endpoint can still provide reads but refuses input.
MAUI support is documented for Windows, and some application tests, WPF screenshot tests, and MAUI projects require an interactive Windows desktop session or the MAUI Windows workload. The MCP package does not by itself make an application compatible; the application must include the required toolkit integration and adapters.