WPF DevTools MCP Server
Search Results for

    Show / Hide Table of Contents

    AI Agent Client Quickstart

    Install WPF DevTools first, then register the installed executable with your preferred MCP client. The canonical installation flow is 5-Minute Setup; this page only compares client registration paths.

    Installed executable

    Use the generated client-registration artifact as the source of truth. The executable normally resolves to:

    <InstallRoot>\<arch>\current\bin\wpf-devtools-<arch>.exe
    

    Supported clients

    Client Registration style Guide
    Claude Code CLI command generated by installer Claude Code
    OpenAI Codex / Codex CLI CLI command generated by installer OpenAI Codex and Codex CLI
    Grok Build CLI CLI command generated by installer Use <InstallRoot>\<arch>\client-registration\grok.txt
    Claude Desktop JSON config generated by installer Claude Desktop
    Cursor mcpServers JSON generated by installer Cursor, VS Code, and Visual Studio
    VS Code servers JSON generated by installer Cursor, VS Code, and Visual Studio
    Visual Studio servers JSON generated by installer Cursor, VS Code, and Visual Studio
    Other Artifact-only JSON Use <InstallRoot>\<arch>\client-registration\other.mcpServers.json

    For -Client other -OutputJson, the install result also includes composerPolicyProfile. Its requiredEnvironment map names the minimum project-write and destructive gates for apply_ui_blueprint, while freshServerProcessRequired=true reminds automation to start a new scoped server after setting them.

    Every successful install with -OutputJson includes a compact serverCommand object. Use its exact executable and empty arguments array to start the selected installed server with transport="stdio"; client, architecture, and installRoot identify the resolved installation. Its policyTemplate supplies the first-run fields WPFDEVTOOLS_MCP_ALLOWED_TARGETS, WPFDEVTOOLS_INJECTION_ALLOWED_TARGETS, and WPFDEVTOOLS_MCP_ALLOW_SENSITIVE_READS. Replace the target placeholders with the reviewed app path, omit raw-injection opt-in when it is unnecessary, and start a fresh process when freshServerProcessRequired=true. This object does not contain secrets; it intentionally omits auth and certificate configuration.

    First verification flow

    Before the first connection, set the reviewed target path for connection and raw-injection fallback, then enable sensitive reads for the first scene summary:

    $target = 'C:\Path\To\YourApp.exe'
    $env:WPFDEVTOOLS_MCP_ALLOWED_TARGETS = $target
    $env:WPFDEVTOOLS_INJECTION_ALLOWED_TARGETS = $target
    $env:WPFDEVTOOLS_MCP_ALLOW_SENSITIVE_READS = 'true'
    
    1. connect
    2. get_active_process
    3. get_ui_summary(depthMode: "semantic")
    4. A focused diagnostic tool from navigation.recommended

    Prefer scene-level summaries before visual-tree dumps or screenshots.

    Deeper gated workflows

    Keep the first session narrow, then enable only the gate needed for the next approved tool:

    • WPFDEVTOOLS_MCP_ALLOW_SCREENSHOTS=true for element_screenshot.
    • WPFDEVTOOLS_MCP_ALLOW_VIEWMODEL_INSPECTION=true for get_viewmodel, command metadata, and ViewModel scopes in snapshots or batch_mutate.
    • WPFDEVTOOLS_MCP_ALLOW_DESTRUCTIVE_TOOLS=true for capture_state_snapshot, batch_mutate, interactions, event drain, and restore workflows.

    Before a mutation or ordered batch_mutate, take capture_state_snapshot, inspect get_state_diff, and restore when the workflow needs rollback.

    • Edit this page
    In this article
    Back to top WPF DevTools MCP Server documentation for users, operators, and contributors.