InitialForce.SnoopAgent 1.1.1

Prefix Reserved
dotnet add package InitialForce.SnoopAgent --version 1.1.1
                    
NuGet\Install-Package InitialForce.SnoopAgent -Version 1.1.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="InitialForce.SnoopAgent" Version="1.1.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="InitialForce.SnoopAgent" Version="1.1.1" />
                    
Directory.Packages.props
<PackageReference Include="InitialForce.SnoopAgent" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add InitialForce.SnoopAgent --version 1.1.1
                    
#r "nuget: InitialForce.SnoopAgent, 1.1.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package InitialForce.SnoopAgent@1.1.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=InitialForce.SnoopAgent&version=1.1.1
                    
Install as a Cake Addin
#tool nuget:?package=InitialForce.SnoopAgent&version=1.1.1
                    
Install as a Cake Tool

SnoopWPF.Agent

An MCP (Model Context Protocol) server for WPF applications. Enables AI agents (Claude Code, Claude Desktop) to inspect the visual tree, read properties, diagnose binding errors, and capture screenshots of your running WPF app.

Requires .NET 8.0+. For older targets, use the injection-mode snoop-mcp.exe.

Quick Start

1. Add the package

<PackageReference Include="SnoopWPF.Agent" />

2. Start the agent

// App.xaml.cs
using SnoopWPF.Agent.Server;

protected override void OnStartup(StartupEventArgs e)
{
    base.OnStartup(e);
    SnoopAgent.StartCoLocated(); // stdio transport by default
}

3. Configure your MCP client

{
  "mcpServers": {
    "snoop": {
      "command": "dotnet",
      "args": ["run", "--project", "MyApp/MyApp.csproj"]
    }
  }
}

Options

SnoopAgent.StartCoLocated(new SnoopAgentOptions
{
    Transport      = TransportMode.Stdio,  // or TransportMode.Pipe
    EnableMutation = false,                // set true to allow wpf_set_property
    EnableRedaction = true,                // redact sensitive properties
    TimeoutMs      = 5000,                // per-operation Dispatcher timeout
});

Available Tools (28)

wpf_get_session_info, wpf_get_windows, wpf_get_visual_tree, wpf_get_children, wpf_get_ancestors, wpf_find_elements, wpf_inspect_element, wpf_get_properties, wpf_set_property, wpf_get_binding_info, wpf_run_diagnostics, wpf_get_resources, wpf_capture_screenshot, wpf_get_triggers, wpf_get_behaviors, wpf_fetch_blob, wpf_poll_changes, wpf_pump_until_idle, wpf_resolve_binding, wpf_click, wpf_execute_command, wpf_expand_collapse, wpf_select_item, wpf_set_check_state, wpf_set_slider_value, wpf_set_text_value, wpf_toggle, wpf_wait_for_property.

Documentation

Full documentation: docs/mcp-agent.md

Product Compatible and additional computed target framework versions.
.NET net8.0-windows10.0.19041 is compatible.  net9.0-windows was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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
1.1.1 310 6/9/2026