
StockSharp DesktopDriver
io.github.StockSharpPublished by GitHub account StockSharpv1.0.1Updated Oct 24, 2026
Inspect and drive Avalonia, WPF and MAUI desktop applications through local MCP.
Overview
Lets an assistant inspect and drive Avalonia, WPF and MAUI desktop apps locally: read windows, tables and trees, then click, type and scroll.
- What you can do
- Read the interface of a running desktop app: list open windows, inspect the contents of a window, and read grids, trees, lists, pickers, workspaces, charts, documents and diagrams as structured data.
- Send input through the toolkit's own pipeline: click, type, press keys and scroll, then wait for the answer to change.
- Start or attach to an instrumented application over a local named-pipe endpoint, checking product, instance and protocol in the session handshake.
- Retrieve screenshots and automation artifacts for a person to look at.
- When to use it
- Useful when you want an AI agent to exercise or verify a desktop application built on Avalonia, WPF or MAUI — for example to walk through a window, check what a table shows, or reproduce a UI flow — instead of relying on screen pixels.
- Requirements
- Runs as a local process on the user's machine, installed with the .NET 10 SDK (dotnet tool install of the MCP package). The target application must reference the toolkit's bootstrap package and be started with --ui-automation so it opens a local named-pipe endpoint. Two required environment variables: STOCKSHARP_UI_ARTIFACTS for screenshots and artifacts, and STOCKSHARP_UI_CATALOGUE for the JSON catalogue of applications the server may launch. Desktop only; no authentication declared.
Installation
In SourceWeft
- Open StockSharp DesktopDriver in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
StockSharp DesktopDriver
Drive desktop applications built on Avalonia, WPF or MAUI from tests, from a command line, or from an AI agent over MCP.
DesktopDriver reads the interface, not the screen. A table answers with its columns and rows, a tree with its items, a workspace with its panels - in words that do not change with a theme, a font or a language. Input goes through the toolkit's own pipeline, and only into a run that cannot reach anything real. Pictures are there for a person to look at; tests check what the controls say.
How it works
- An application that can be driven references the bootstrap of its toolkit. Started the ordinary way it
opens nothing. Started with
--ui-automation, it opens a local named-pipe endpoint restricted to the current OS user, and writes where the endpoint is to the file named by--ui-automation-endpoint=<path>. - A runner - a test, the command line, the MCP server - starts the application that way (or attaches to one somebody else started), checks the product, instance and protocol in the session handshake and asks: which windows are open, what is in this one, what does this table show. It can then click, type, press keys and scroll, and wait for the answer to change.
- Adapters turn controls into what the protocol knows: grids, trees, lists, pickers, workspaces, charts, documents, diagrams. An application registers adapters for its own controls through the same interface the standard ones use.
NuGet packages
Install the CLI or MCP server with the .NET 10 SDK:
The commands are tools/desktop-driver and tools/desktop-driver-mcp. To add automation to an
application, reference the bootstrap package for its toolkit. To drive it from code, use the client,
runner and testing packages.
For MCP Registry publication and Claude Desktop extensions, see MCP distribution.
Make an application drivable
Avalonia, once the main window exists (the sample does the same with the grid module alone):
Dispose the returned runtime when the application exits. WpfAutomationBootstrap and
MauiAutomationBootstrap take the same arguments.
The sample applications show startup and shutdown for all three toolkits. The WPF and MAUI Windows samples also have tests that start their executables, connect over the local pipe, read their controls, send input and retrieve screenshots.
UiAutomationStartup.For decides whether input is allowed. An application that talks to nothing outside
its own process is always safe to click through. One that connects to something real - a broker, a
store, a service - is safe only when it was started on a test profile that replaces it; otherwise the
endpoint still reads, but every input is refused.
Many applications ship two builds: an ordinary one with no driver in it, and one made to be driven. The driver is only referenced by the second, so the first has nothing listening by construction.
Drive it
From a test:
From a command line, against an application somebody started with --ui-automation:
desktop-driver with no arguments prints every operation.
From an agent: register the MCP server, see DesktopDriver.Mcp.
Its MCP name is StockSharp.DesktopDriver, and its display title is StockSharp DesktopDriver.
Documents
- How the driver is built
- The protocol
- What answers for which control, and how to add an adapter
- The command line
- The MCP server
- Builds, test suites and releases
- Sample applications and Windows integration tests
Build and test
The MAUI projects need the MAUI Windows workload. MCP application tests, WPF screenshot tests and
DesktopDriver.Windows.Tests need an interactive Windows desktop session. Run the filtered suites
with hang and session timeouts using ./.github/scripts/Test.ps1 -Suite Headless or -Suite Desktop
after a Release build.
Packages from source
Sources instead of packages
A product checked out beside this repository can reference the projects themselves:
A product that builds a second, drivable copy of itself by passing a property on the command line adds
GlobalPropertiesToRemove="<that property>" to the reference: the driver has no build of its own for it, and
would otherwise be built twice into the same folder.
License
See LICENSE.
Source: README.md at commit a5e10d1
Tools
0Version history
1- v1.0.1LatestOct 9, 2026
Score
40% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
Declare a license in the repository or the registry entry.