Skip to content
MCP server

WPF Locator Doctor

Scores how testable a WPF app is and suggests the AutomationId fixes UI tests need

Runs locally

WPF Locator Doctor is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, Windows, Linux
Runs
Locally
Version
0.2.2
Listing updated

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add wpf-locator-doctor -- dnx wpf-locator-doctor-mcp --yes

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "wpf-locator-doctor": {
      "command": "dnx",
      "args": [
        "wpf-locator-doctor-mcp",
        "--yes"
      ]
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "wpf-locator-doctor": {
      "command": "dnx",
      "args": [
        "wpf-locator-doctor-mcp",
        "--yes"
      ]
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "wpf-locator-doctor": {
      "command": "dnx",
      "args": [
        "wpf-locator-doctor-mcp",
        "--yes"
      ]
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "wpf-locator-doctor": {
      "type": "stdio",
      "command": "dnx",
      "args": [
        "wpf-locator-doctor-mcp",
        "--yes"
      ]
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add wpf-locator-doctor -- dnx wpf-locator-doctor-mcp --yes

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.wpf-locator-doctor]
command = "dnx"
args = ["wpf-locator-doctor-mcp", "--yes"]

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "wpf-locator-doctor": {
      "command": "dnx",
      "args": [
        "wpf-locator-doctor-mcp",
        "--yes"
      ]
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "wpf-locator-doctor": {
          "command": "dnx",
          "args": [
            "wpf-locator-doctor-mcp",
            "--yes"
          ]
        }
      }
    }

    Or run: gemini mcp add -s user wpf-locator-doctor dnx -- wpf-locator-doctor-mcp --yes

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "wpf-locator-doctor": {
          "command": "dnx",
          "args": [
            "wpf-locator-doctor-mcp",
            "--yes"
          ]
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "wpf-locator-doctor": {
          "command": "dnx",
          "args": [
            "wpf-locator-doctor-mcp",
            "--yes"
          ]
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "wpf-locator-doctor": {
          "command": "dnx",
          "args": [
            "wpf-locator-doctor-mcp",
            "--yes"
          ]
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "wpf-locator-doctor": {
          "command": "dnx",
          "args": [
            "wpf-locator-doctor-mcp",
            "--yes"
          ]
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "wpf-locator-doctor": {
          "command": "dnx",
          "args": [
            "wpf-locator-doctor-mcp",
            "--yes"
          ]
        }
      }
    }

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "wpf-locator-doctor": {
          "command": "dnx",
          "args": [
            "wpf-locator-doctor-mcp",
            "--yes"
          ]
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "wpf-locator-doctor": {
          "command": "dnx",
          "args": [
            "wpf-locator-doctor-mcp",
            "--yes"
          ]
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

About WPF Locator Doctor

Automation testers often spend hours hunting for usable element locators in WPF screens, and tests break when IDs are missing, duplicated or renamed. This MCP server runs a testability scorecard that grades each screen and the whole app from 0 to 100, flagging controls without AutomationIds, machine-generated IDs, repeated IDs and custom controls that test tools cannot see.

It works in two modes. A source scan reads XAML and C# files on any operating system and returns exact file and line fixes. On Windows, the live tools attach to a running app through UI Automation, show the screen as test tools see it, rank locators that match exactly one element, and can click, type, wait and take screenshots.

It suits WPF test engineers and the developers who work with them, and it is designed to be driven from AI assistants such as Claude Code, Copilot or Cursor.

Tools this server provides (14)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 3 of 14 tools read data; 11 names don't say.

From the server's own tool labels and tool names; not verified by us.

score_source
Scores the testability of a WPF project's source.
list_problemsName suggests: reads
Lists testability problems found in a project.
suggest_xaml_fixes
Suggests exact XAML line edits with unique new AutomationIds.
compare_to_baseline
Checks that AutomationIds from an earlier report still exist.
explain_rulesName suggests: reads
Explains each testability rule.
open_app
Starts or attaches to a running WPF app on Windows.
snapshot_screen
Shows the screen as UI test tools see it.
recommend_locators
Ranks locators for an element in a running app.
check_locatorName suggests: reads
Checks that a locator matches exactly one element.
act
Clicks, types or otherwise acts on a control in a running app.
wait_for
Waits for a control or condition in a running app.
take_screenshot
Captures a screenshot of a running app.
score_live_app
Scores the testability of a running app.
close_app
Closes an app started through the server.

What it does

Testability scorecard
Scores each screen and the whole app across ID coverage, ID quality, uniqueness, visibility and readable names.
Source-level fix suggestions
Returns exact XAML edits with unique proposed AutomationIds for the problems it finds.
Baseline comparison
Checks whether AutomationIds from an earlier report have disappeared.
Live locator ranking
On Windows, ranks locators for a running app and checks that each matches exactly one element.
Live app interaction
Opens, clicks, types into, and waits on controls in a running WPF app, with screenshots.
Invisible control detection
Finds custom controls that do not expose themselves to UI Automation.

Good for

  • Scoring a WPF project's testability before writing UI automation tests
  • Adding missing AutomationIds to the worst-scoring screen through an AI assistant
  • Finding a stable locator for a button in a running app on Windows
  • Catching duplicated or machine-generated IDs in code review
  • Blocking a build when the testability score drops below a threshold

Pricing

Open source

Free and open source under the MIT licence.

WPF Locator Doctor FAQ

Which operating systems are supported?

The source tools run on any OS, while the live tools that drive a running app require Windows with an unlocked desktop.

How do I install WPF Locator Doctor?

Use NuGet package wpf-locator-doctor-mcp with dnx, or download the Windows win-x64 zip or mcpb package from the releases page.

Does WPF Locator Doctor need a .NET version?

The NuGet source scan requires the .NET SDK version 10 or newer.

Is WPF Locator Doctor open source?

It is released under the MIT licence.

Is WPF Locator Doctor free?

Yes. WPF Locator Doctor is open source, so you can use and self-host it for free.

How do I add WPF Locator Doctor to Claude Code?

Run this command in your terminal: claude mcp add wpf-locator-doctor -- dnx wpf-locator-doctor-mcp --yes

What are the best alternatives to WPF Locator Doctor?

The closest alternatives to WPF Locator Doctor are Wpf Lens, Wpf Visual Tree, MCP Test Utils, k11 Appium QA and UIAutomationMcp.

Where this comes from

  • Description: written from the project's README and its MCP Registry entry.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers