Back to Uno

Uno Platform DevServer CLI

src/Uno.UI.DevServer.Cli/README.md

6.6-release-branch-cut3.1 KB
Original Source

Uno Platform DevServer CLI

The Uno DevServer CLI (uno-devserver) manages the local development server for Uno Platform projects. It handles DevServer lifecycle, IDE channel communication, add-in discovery, and exposes an MCP (Model Context Protocol) interface for AI-powered development tools.

Installation

The CLI is distributed as a .NET tool and is typically invoked via dotnet dnx:

bash
dotnet dnx -y uno.devserver <command>

Commands

CommandDescription
startStart or reuse a DevServer for the current solution
stopStop all running DevServer instances
listDisplay running DevServer instances with process ancestry
cleanupRemove stale DevServer registrations
discoDiscover environment details (SDK, packages, active servers)
healthReport DevServer health for the current workspace
loginOpen Uno Platform settings
mcp serveStart the MCP STDIO proxy for AI tool integration
mcp statusReport MCP server registration state across IDE clients
mcp installRegister MCP servers in IDE client config files
mcp uninstallRemove MCP server registrations

How it works

The DevServer is a lightweight local HTTP server that provides bidirectional communication between the IDE and your running Uno Platform application:

  1. IDE opens a solution — the DevServer reserves a TCP port and writes it to .csproj.user
  2. App is built in Debug — connection details are embedded in the build output
  3. App launches — it connects back to the DevServer via WebSocket
  4. Development features activate — Hot Reload, XAML updates, and design-time tools start working

IDE channel

The IDE channel is a named pipe (\\.\pipe\{guid}) providing a direct JSON-RPC link between the IDE extension and the DevServer Host. It carries:

  • Development environment status notifications
  • Hot Reload coordination messages
  • Application launch tracking

When a DevServer is already running (e.g. started by MCP), the CLI reuses it and rebinds the IDE channel without restarting the Host process.

MCP integration

The CLI exposes an MCP server (mcp serve) that AI coding assistants (Claude, Codex, Copilot, Cursor, etc.) can connect to. This enables AI tools to inspect your app, query diagnostics, and interact with the DevServer programmatically.

Diagnostics

Use disco for a full environment diagnostic:

bash
dotnet dnx -y uno.devserver disco

This shows: SDK version, DevServer package version, Host path, .NET version, resolved add-ins, and active server instances with their process ancestry chain.

Use health for a quick status check:

bash
dotnet dnx -y uno.devserver health

Security

The DevServer binds to local ports only and is intended for local development. Do not expose it to untrusted networks.

Documentation