Rover.Uwp
0.4.0-preview
dotnet add package Rover.Uwp --version 0.4.0-preview
NuGet\Install-Package Rover.Uwp -Version 0.4.0-preview
<PackageReference Include="Rover.Uwp" Version="0.4.0-preview" />
<PackageVersion Include="Rover.Uwp" Version="0.4.0-preview" />
<PackageReference Include="Rover.Uwp" />
paket add Rover.Uwp --version 0.4.0-preview
#r "nuget: Rover.Uwp, 0.4.0-preview"
#:package Rover.Uwp@0.4.0-preview
#addin nuget:?package=Rover.Uwp&version=0.4.0-preview&prerelease
#tool nuget:?package=Rover.Uwp&version=0.4.0-preview&prerelease
Rover — MCP In-App Debug Host for UWP
Rover is a Model Context Protocol (MCP) debug host that runs inside a UWP application, exposing screenshot capture and input injection as MCP tools. External clients (AI agents, test harnesses, etc.) connect over HTTP and can remotely observe and interact with the running app.
Add Rover to Your UWP App
Install the NuGet package and integrate in three lines of code:
dotnet add package Rover.Uwp --prerelease
See the Integration Guide for complete setup instructions, manifest configuration, MCP client setup for VS Code / Claude / Cursor / Windsurf, the full tool reference (16 tools), and troubleshooting.
Connect an MCP Client
Once your app is running, point any MCP client at http://localhost:5100/mcp:
<img src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Server&color=0098FF" alt="Install in VS Code"> <img src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Install%20Server&color=24bfa5" alt="Install in VS Code Insiders"> <img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install in Cursor"> <img src="https://img.shields.io/badge/Visual_Studio-Install-C16FDE?logo=visualstudio&logoColor=white" alt="Install in Visual Studio">
See Connecting MCP Clients for manual configuration for each client.
Architecture
MCP Client (tests, AI agents, etc.)
│
│ HTTP Streamable MCP (port 5100)
▼
┌──────────────────────────────────┐
│ Rover.FullTrust.McpServer │ .NET 8 console app
│ ASP.NET Core MapMcp("/mcp") │ Runs as FullTrust process
│ │
│ AppServiceConnection IPC │
└──────────┬───────────────────────┘
│ ValueSet messages
│ (ping, list_tools, invoke_tool)
▼
┌──────────────────────────────────┐
│ Rover.Uwp.Sample │ UWP AppContainer
│ ├─ App.xaml.cs │ In-process AppService handler
│ │ OnBackgroundActivated() │
│ │ │
│ ├─ DebugHost / DebugHostRunner │ Orchestrates capabilities
│ │ │
│ ├─ ToolRegistry (singleton) │ Thread-safe tool lookup
│ │ │
│ └─ Capabilities │
│ ├─ ScreenshotCapability │ RenderTargetBitmap → PNG
│ └─ InputInjectionCapability │ InputInjector or XAML automation
└──────────────────────────────────┘
Data flow for a tool call
- Client sends MCP
tools/callvia HTTP to:5100/mcp - FullTrust server receives it, looks up the proxy tool, sends an AppService IPC message
- UWP app's
OnBackgroundActivateddispatches toToolRegistry - The capability handler runs (e.g. captures screenshot on UI thread)
- JSON result flows back: capability → AppService → FullTrust → MCP HTTP response
Projects
| Project | Target | Purpose |
|---|---|---|
| Rover.Core | netstandard2.0 | Interfaces (IDebugCapability, IMcpToolRegistry, IToolBackend), DTOs, coordinate types |
| Rover.Mcp | netstandard2.0 | MCP SDK adapter — bridges IMcpToolRegistry to McpServerTool via DelegateMcpServerTool |
| Rover.Uwp | UAP 10.0.19041 | UWP class library — debug host, capabilities, AppService handler, coordinate resolver |
| Rover.Uwp.Sample | UAP 10.0.19041 | Sample UWP app with Color Picker test UI for E2E testing |
| Rover.FullTrust.McpServer | net8.0-windows | Out-of-process MCP HTTP server, bridges to UWP via AppService IPC |
| Rover.Mcp.IntegrationTests | net8.0 | 34 xUnit tests (unit + E2E) |
MCP Tools
Rover exposes 16 tools across screenshot capture, touch/mouse, keyboard, pen, and gamepad input. All tools use normalized coordinates (0.0–1.0) by default.
See the full tool reference for parameters, coordinate spaces, and dry-run preview support.
Prerequisites
- Windows 10/11 (Desktop)
- Visual Studio 2022 with the UWP workload
- .NET 8 SDK
- Developer Mode enabled in Windows Settings → Privacy & Security → For Developers
Building
All commands assume the working directory is the repository root.
1. Publish the FullTrust MCP server
dotnet publish src\Rover.FullTrust.McpServer\Rover.FullTrust.McpServer.csproj `
-c Debug -r win-x64 --self-contained true /p:PublishSingleFile=true
This produces a single exe at:
src\Rover.FullTrust.McpServer\bin\Debug\net8.0-windows10.0.19041.0\win-x64\publish\Rover.FullTrust.McpServer.exe
The UWP sample project automatically picks it up and includes it in the AppX package as FullTrust\Rover.FullTrust.McpServer.exe.
2. Build and deploy the UWP app
# Rebuild (compiles Rover.Uwp + Rover.Uwp.Sample + bundles FullTrust exe)
& "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe" `
src\Rover.sln /Rebuild "Debug|x64" /Project "Rover.Uwp.Sample\Rover.Uwp.Sample.csproj"
# Deploy (registers the AppX package for sideloading)
& "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe" `
src\Rover.sln /Deploy "Debug|x64" /Project "Rover.Uwp.Sample\Rover.Uwp.Sample.csproj"
Important: Always use
devenv /Deployfor deployment. ManualAdd-AppxPackage -Registerwith file copying to the AppX directory is unreliable because thebin\x64\Debug\AppXsubdirectory may contain stale files.
3. Launch the app
Start-Process "shell:AppsFolder\Rover.Uwp.Sample_xaf3bmhg52ma0!App"
The app starts the debug host and launches the FullTrust MCP server automatically. Wait a few seconds, then verify:
Test-NetConnection -ComputerName localhost -Port 5100 | Select-Object TcpTestSucceeded
Running Tests
Unit tests only (no app needed)
dotnet test src\Rover.Mcp.IntegrationTests\Rover.Mcp.IntegrationTests.csproj `
--filter "McpServerToolTests|McpToolRegistryAdapterTests|DelegateMcpServerToolInvocationTests"
Runs 14 tests that exercise the MCP adapter in isolation using in-memory pipes. No UWP app required.
E2E tests only (app must be running on port 5100)
dotnet test src\Rover.Mcp.IntegrationTests\Rover.Mcp.IntegrationTests.csproj `
--filter "EndToEndPipelineTests|ColorPickerE2ETests"
Runs 20 tests that connect to the live MCP server. Requires the UWP app to be deployed, launched, and listening on port 5100.
All tests
dotnet test src\Rover.Mcp.IntegrationTests\Rover.Mcp.IntegrationTests.csproj
Runs all 34 tests. The E2E tests will fail if the app isn't running.
Full workflow (build + deploy + launch + test)
# 1. Publish FullTrust server
dotnet publish src\Rover.FullTrust.McpServer\Rover.FullTrust.McpServer.csproj `
-c Debug -r win-x64 --self-contained true /p:PublishSingleFile=true
# 2. Rebuild UWP app
& "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe" `
src\Rover.sln /Rebuild "Debug|x64" /Project "Rover.Uwp.Sample\Rover.Uwp.Sample.csproj"
# 3. Deploy
& "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\devenv.exe" `
src\Rover.sln /Deploy "Debug|x64" /Project "Rover.Uwp.Sample\Rover.Uwp.Sample.csproj"
# 4. Launch app and wait for MCP server
Start-Process "shell:AppsFolder\Rover.Uwp.Sample_xaf3bmhg52ma0!App"
Start-Sleep -Seconds 5
# 5. Run all tests
dotnet test src\Rover.Mcp.IntegrationTests\Rover.Mcp.IntegrationTests.csproj
Environment variable
The E2E tests default to http://localhost:5100/mcp. Override with:
$env:ROVER_MCP_ENDPOINT = "http://localhost:5100/mcp"
Test Inventory (34 tests)
McpServerToolTests (8 unit tests)
ServerInfo_ReturnsCorrectNameListTools_ReturnsAllRegisteredToolsListTools_EachToolHasDescriptionAndSchemaCallTool_Echo_ReturnsMessageCallTool_AddNumbers_ComputesCorrectSumCallTool_GetStatus_WorksWithNoArgumentsCallTool_FailingTool_ReturnsErrorPing_ServerResponds
McpToolRegistryAdapterTests (4 unit tests)
RegisterTool_AddsToToolsCollectionRegisterTool_ProtocolToolHasCorrectMetadataRegisterMultipleTools_AllPresentImplementsIMcpToolRegistry
DelegateMcpServerToolInvocationTests (2 unit tests)
CallTool_PassesSerializedArgumentsCallTool_WithEmptyArgs_PassesEmptyObject
EndToEndPipelineTests (10 E2E tests)
Server_Responds_WithCorrectInfoServer_Ping_SucceedsListTools_ReturnsRegisteredUwpToolsListTools_InjectTap_HasCorrectMetadataListTools_CaptureCurrentView_HasSchemaListTools_InjectDragPath_HasPointsSchemaCaptureCurrentView_ReturnsResultInjectTap_WithNormalizedCoordinates_SucceedsInjectDragPath_WithTwoPoints_SucceedsNonexistentTool_ReturnsError
ColorPickerE2ETests (10 E2E tests)
TapRedButton_PreviewBecomesRedTapGreenButton_PreviewBecomesGreenTapBlueButton_PreviewBecomesBlueTapYellowButton_PreviewBecomesYellowTapWhiteButton_PreviewBecomesWhiteDragRedSlider_IncreasesRedComponentDragGreenSlider_IncreasesGreenComponentDragBlueSlider_IncreasesBlueComponentSequentialColorChanges_PreviewUpdatesEachTimeScreenshot_HasReasonableDimensions
Key Implementation Details
AppService IPC (in-process model)
The AppService is declared without an EntryPoint attribute in the manifest, which makes it run in-process. App.OnBackgroundActivated handles requests directly, sharing the ToolRegistry singleton with the capabilities. This avoids cross-process serialization of tool handlers.
Screenshot capture
Uses RenderTargetBitmap.RenderAsync(Window.Current.Content) on the UI thread → SoftwareBitmap → BitmapEncoder (PNG). Files are saved to LocalState\debug-artifacts\screenshots\. The test process reads them with FileShare.ReadWrite to handle concurrent access.
UWP deployment gotcha
Add-AppxPackage -Register from bin\x64\Debug\AppxManifest.xml registers a package, but the runtime may load files from a stale AppX subdirectory. Always use devenv /Rebuild then devenv /Deploy for reliable updates.
Slider.ValueChanged during InitializeComponent
XAML fires Slider.ValueChanged during InitializeComponent() before other named elements are initialized. Subscribe to the event in code-behind after InitializeComponent() completes to avoid NullReferenceException crashes.
What's Not Yet Implemented
- stdio transport — code exists but is unused; only HTTP is exercised
- Mouse injection — schema accepts
device: "mouse"but only touch/automation is implemented - Automation fallback for more controls — only
ButtonBaseandSliderare handled; no ToggleSwitch, ListView, TextBox, etc. - Non-UWP platforms — no WinUI 3 or WPF adapter
- MCP resources and prompts — only tools are implemented
- CI/CD pipeline — tests require a locally deployed UWP app
- Auth in production — Bearer token support exists in
HttpMcpListenerbut is unused - Host app integration — no app-specific capabilities beyond the color picker sample exist yet
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| Universal Windows Platform | uap was computed. uap10.0 is compatible. |
-
UAP 10.0
- Microsoft.NETCore.UniversalWindowsPlatform (>= 6.2.14)
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|