Netwright logo

Netwright

Automates Windows .NET desktop apps through MCP, with UI inspection, interaction, verification, logs, screenshots, and C# test export.

Install Netwright

Run the project’s own setup commands, in order.

Setup steps from the project

Netwright installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Add to Claude Code
    claude mcp add netwright -- dnx Netwright --yes
    
  2. 2. Install
    dotnet tool install -g Netwright
    

Overview

The Netwright MCP server lets AI agents launch, attach to, inspect, and operate WPF, WinForms, WinUI, and other Windows UI Automation targets. It exposes desktop controls for snapshots, selectors, input, window management, screenshots, waits, assertions, logs, and C# regression-test export. Actions generally run through UI Automation in the background, while key presses and certain clicks can use the foreground. Reach for it when an agent needs to test or explore a Windows desktop application rather than a web page.

Use cases

  • Launch a .NET desktop project and inspect its UI
  • Automate form entry and window interactions
  • Verify asynchronous UI changes with assertions
  • Capture application logs and screenshots
  • Export an explored flow as a C# regression test

Key features

  • WPF, WinForms, WinUI, and Windows .NET MAUI automation
  • Compact UI snapshots with stable element references
  • Background UI Automation actions and selector matching
  • Waits, retrying assertions, and change reports
  • Window screenshots, application logs, and state inspection
  • C# regression-test export

Tools15

What Netwright lets your agent do. Expand a tool for its parameters.

Self-reported~244 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

14/14 checks healthy over the last 67d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars25Stargazers on the source repository.
Last commit1mo agoMost recent push to the default branch.
Tools exposed15Callable tools this server registers over MCP.

How Netwright works

What the Netwright MCP server does

Netwright provides MCP tools for interacting with Windows desktop applications built with WPF, WinForms, WinUI, and .NET MAUI on Windows. Its primary supported tiers are WPF and WinForms, including .NET Framework 4.x applications, followed by WinUI 3 and .NET MAUI. Avalonia and Uno Platform are handled on a best-effort basis through UI Automation; other Windows applications may work but are not supported targets.

An agent can launch an executable, build and launch a project, attach to an existing process, check application status, and close the app. It can then inspect the visible interface, locate controls, perform actions, wait for asynchronous changes, and check expected state. A completed session can be exported as a C# regression test for xUnit, NUnit, or MSTest through Netwright.Testing.

How it works

The Netwright MCP server captures each window from Windows UI Automation and keeps a cached representation for subsequent operations. It renders that data as compact text, omitting or collapsing layout details that are usually less useful to an agent and summarizing grids by row. Elements receive references such as e12, and selectors can also target controls using identifiers, roles, names, or chained relationships.

Actions return a change report describing elements that appeared, disappeared, or changed. This lets an agent continue from the action result instead of requesting a full snapshot after every operation. The server waits for a target to be enabled and visible, then waits for the interface to settle. Failures are returned with error codes and guidance.

Most operations use UI Automation patterns and do not take control of the mouse. Keyboard input, along with right-click and double-click operations requested with foreground behavior, can briefly use focus and then return it.

Setup and configuration

Run the server on Windows 10 or Windows 11 with the .NET 10 SDK installed. The application under test may target any .NET version or .NET Framework version. A typical MCP configuration invokes dnx Netwright --yes; alternatively, install the Netwright global .NET tool and use netwright as the command.

Claude Code can register the server with claude mcp add netwright -- dnx Netwright --yes. Other MCP clients can use a configuration containing command: "dnx" and arguments for Netwright and --yes. An optional --allow argument restricts which applications the agent may access. Controls are easier to automate when WPF or WinUI applications set AutomationProperties.AutomationId, or when WinForms controls have a suitable Name.

Tools and capabilities

The available tools cover the full interaction loop:

  • desktop_app manages launch, project build-and-launch, attach, status, and close operations.
  • desktop_snapshot, desktop_find, and desktop_inspect expose the UI tree, matching elements, properties, patterns, and stable selectors.
  • desktop_click, desktop_type, desktop_set_state, desktop_press_key, and desktop_scroll operate controls and navigation.
  • desktop_window manages application windows, while desktop_screenshot captures a window or element, including covered content.
  • desktop_wait waits for an element state or text, and desktop_expect performs retrying checks for text, values, enabled state, checked state, and counts.
  • desktop_logs returns stdout, stderr, and debug or trace output.
  • desktop_export_test converts the interaction session into a C# test.

Limitations and notes

The server requires Windows and the .NET 10 SDK. UI Automation support depends on the application exposing useful control properties. WPF and WinForms are the most thoroughly supported technologies; WinUI 3 and .NET MAUI have a lower support tier, while Avalonia and Uno Platform are best effort. Applications such as Win32, Qt, and Electron may work through plain UI Automation but are not supported by the project.

Operations may take longer because the server waits for the interface to settle after actions. In return, the resulting response can include the relevant UI changes and reduce follow-up calls. The server is intended for desktop UI automation and does not provide a browser automation interface.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Netwright

Netwright is an MCP server that connects AI agents to WPF, WinForms, WinUI, and other Windows UI Automation targets. Its main tools launch or attach to desktop apps, inspect and manipulate controls, capture screenshots, wait for changes, verify outcomes, collect logs, and export sessions as C# regression tests.

Install the .NET 10 SDK on Windows 10 or 11, then configure an MCP client to run `dnx Netwright --yes`. You can also install the global `Netwright` .NET tool and invoke `netwright` instead. Claude Code uses `claude mcp add netwright -- dnx Netwright --yes`.

Yes, Netwright works with Cursor through a standard MCP configuration. Add a server entry that runs `dnx` with `Netwright` and `--yes`, or use the installed global tool as the command.

Netwright supports WPF and WinForms, including .NET Framework 4.x, and also supports WinUI 3 and .NET MAUI on Windows. Avalonia and Uno Platform are best effort, while other Windows applications may work through UI Automation without being supported targets.

Yes, `desktop_export_test` turns an agent session into a C# regression test. The generated test uses Netwright.Testing, which supports xUnit, NUnit, and MSTest.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewNetwright AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/netwright?style=directory)](https://allmcps.com/mcp/netwright)
HTML Embed
<a href="https://allmcps.com/mcp/netwright"><img src="https://allmcps.com/api/badge/netwright?style=directory" alt="Netwright on AllMCPs" /></a>