HandMirrorMcp 0.1.1

{
  "servers": {
    "HandMirrorMcp": {
      "type": "stdio",
      "command": "dnx",
      "args": ["HandMirrorMcp@0.1.1", "--yes"]
    }
  }
}
                    
This package contains an MCP Server. The server can be used in VS Code by copying the generated JSON to your VS Code workspace's .vscode/mcp.json settings file.
dotnet tool install --global HandMirrorMcp --version 0.1.1
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local HandMirrorMcp --version 0.1.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=HandMirrorMcp&version=0.1.1
                    
nuke :add-package HandMirrorMcp --version 0.1.1
                    

<p align="center"> <img src="HandMirrorMcp.png" alt="HandMirrorMcp Logo" width="128" height="128" /> </p>

<p align="center"> <a href="https://github.com/rkttu/HandMirrorMcp"><img src="https://img.shields.io/github/stars/rkttu/HandMirrorMcp?style=flat-square" alt="GitHub Stars" /></a> <a href="https://github.com/rkttu/HandMirrorMcp/fork"><img src="https://img.shields.io/github/forks/rkttu/HandMirrorMcp?style=flat-square" alt="GitHub Forks" /></a> <a href="https://github.com/rkttu/HandMirrorMcp/issues"><img src="https://img.shields.io/github/issues/rkttu/HandMirrorMcp?style=flat-square" alt="GitHub Issues" /></a> <a href="https://www.nuget.org/packages/HandMirrorMcp"><img src="https://img.shields.io/nuget/v/HandMirrorMcp?style=flat-square" alt="NuGet Version" /></a> <a href="https://www.nuget.org/packages/HandMirrorMcp"><img src="https://img.shields.io/nuget/dt/HandMirrorMcp?style=flat-square" alt="NuGet Downloads" /></a> <a href="https://github.com/rkttu/HandMirrorMcp/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/rkttu/HandMirrorMcp/ci.yml?style=flat-square&label=CI" alt="CI Status" /></a> <a href="https://github.com/rkttu/HandMirrorMcp/actions/workflows/publish-nuget.yml"><img src="https://img.shields.io/github/actions/workflow/status/rkttu/HandMirrorMcp/publish-nuget.yml?style=flat-square&label=CD" alt="CD Status" /></a> <a href="https://github.com/rkttu/HandMirrorMcp/blob/master/LICENSE"><img src="https://img.shields.io/github/license/rkttu/HandMirrorMcp?style=flat-square" alt="License" /></a> <a href="https://github.com/sponsors/rkttu"><img src="https://img.shields.io/github/sponsors/rkttu?style=flat-square&label=Sponsors" alt="GitHub Sponsors" /></a> </p>

HandMirror MCP Server

A Model Context Protocol (MCP) server for .NET assembly and NuGet package inspection. HandMirror helps AI coding agents understand .NET APIs accurately and resolve build errors by providing direct access to assembly metadata and NuGet package information.

๐ŸŽฏ Purpose

AI coding assistants often hallucinate or guess API details, leading to build errors and wasted development iterations. HandMirror solves this by:

  • Providing accurate, version-specific API information directly from assemblies
  • Enabling verification of method signatures, types, and namespaces before writing code
  • Helping diagnose and fix .NET build errors quickly
  • Supporting analysis of native interop (P/Invoke, COM) dependencies

โœจ Features

Assembly Inspection

  • inspect_assembly - Full analysis of all public types, members, and attributes with XML documentation
  • list_namespaces - List all namespaces in an assembly
  • get_type_info - Get detailed information about a specific type

NuGet Package Exploration

  • search_nuget_packages - Search for packages by keyword
  • get_nuget_package_info - Get package metadata and dependencies
  • get_nuget_package_versions - List all available versions
  • inspect_nuget_package - Analyze assemblies in a package
  • inspect_nuget_package_type - Get detailed type info from a package
  • list_nuget_sources - List configured NuGet package sources
  • clear_nuget_cache - Clear the local NuGet package cache
  • get_nuget_vulnerabilities - Check for known security vulnerabilities
  • inspect_nupkg_contents - Inspect contents of a .nupkg file
  • extract_nupkg_file - Extract specific files from a .nupkg

Native Interop Analysis

  • inspect_native_dependencies - Find P/Invoke (DllImport/LibraryImport) and COM types in an assembly

Project Analysis

  • analyze_csproj - Analyze .NET project files and identify issues
  • analyze_solution - Analyze solution files
  • explain_build_error - Get explanations for common build errors
  • analyze_file_based_app - Analyze file-based apps
  • analyze_config_file - Analyze configuration files
  • analyze_packages_config - Analyze packages.config files

System Information

  • get_system_info - Get system information (OS, .NET runtime, hardware)
  • get_dotnet_info - Get detailed .NET installation information

๐Ÿ“‹ Prerequisites

  • .NET 8.0 SDK or later
  • MCP-compatible client (e.g., Claude Desktop, VS Code with Copilot)

๐Ÿš€ Installation

Build from Source

git clone https://github.com/rkttu/HandMirrorMcp.git
cd HandMirrorMcp
dotnet build

Run the Server

dotnet run --project HandMirrorMcp

โš™๏ธ Configuration

Claude Desktop

Add the following to your Claude Desktop configuration file:

Windows: %APPDATA%\Claude\claude_desktop_config.json macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "handmirror": {
      "command": "dotnet",
      "args": ["run", "--project", "C:\\path\\to\\HandMirrorMcp"]
    }
  }
}

Or if you've built the project:

{
  "mcpServers": {
    "handmirror": {
      "command": "C:\\path\\to\\HandMirrorMcp\\bin\\Debug\\net8.0\\HandMirrorMcp.exe"
    }
  }
}

VS Code with GitHub Copilot

Add to your VS Code settings or workspace settings:

{
  "servers": {
    "handmirror": {
      "command": "dotnet",
      "args": ["run", "--project", "/path/to/HandMirrorMcp"]
    }
  }
}

๐Ÿ“– Usage Examples

Verify API Before Writing Code

When you need to use an unfamiliar .NET API:

Use inspect_nuget_package_type to show me the HttpClient class from System.Net.Http

Diagnose Build Errors

When you encounter errors like CS0246, CS1061, or CS7036:

I'm getting CS1061 error. Use inspect_nuget_package to check the Newtonsoft.Json package 
and show me the available methods on JObject

Explore NuGet Packages

Search for packages related to "json serialization" and show me the top results

Check Package Vulnerabilities

Check if there are any known vulnerabilities in System.Text.Json version 6.0.0

Analyze Project Issues

Analyze my .csproj file at C:\MyProject\MyProject.csproj and identify any issues

๐Ÿ—๏ธ Architecture

HandMirrorMcp/
โ”œโ”€โ”€ Constants/
โ”‚   โ””โ”€โ”€ Emoji.cs              # Unicode emoji constants for output formatting
โ”œโ”€โ”€ Prompts/
โ”‚   โ”œโ”€โ”€ AssemblyInspectorPrompts.cs
โ”‚   โ””โ”€โ”€ NuGetInspectorPrompts.cs
โ”œโ”€โ”€ Services/
โ”‚   โ”œโ”€โ”€ NuGetService.cs       # NuGet package operations
โ”‚   โ”œโ”€โ”€ PeAnalyzerService.cs  # PE file analysis
โ”‚   โ”œโ”€โ”€ RepositoryService.cs  # Repository operations
โ”‚   โ””โ”€โ”€ XmlDocService.cs      # XML documentation parsing
โ”œโ”€โ”€ Tools/
โ”‚   โ”œโ”€โ”€ AssemblyInspectorTool.cs
โ”‚   โ”œโ”€โ”€ InteropInspectorTool.cs
โ”‚   โ”œโ”€โ”€ NuGetInspectorTool.cs
โ”‚   โ”œโ”€โ”€ ProjectAnalyzerTool.cs
โ”‚   โ””โ”€โ”€ SystemInfoTool.cs
โ””โ”€โ”€ Program.cs

๐Ÿงช Testing

Run the test suite:

dotnet test

The tests use MSTest and connect to the actual MCP server for integration testing.

๐Ÿ“ฆ Dependencies

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

๐Ÿ’– Support This Project

If you find HandMirror helpful in your development workflow, please consider supporting the project!

<p align="center"> <a href="https://github.com/sponsors/rkttu"> <img src="https://img.shields.io/badge/Sponsor-โค๏ธ-ea4aaa?style=for-the-badge&logo=github" alt="Sponsor on GitHub" /> </a> </p>

Your sponsorship helps maintain and improve this project, add new features, and keep it free for everyone. Every contribution, no matter how small, is greatly appreciated! โญ


HandMirror - Look before you code ๐Ÿชž

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos 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.

This package has no dependencies.

Version Downloads Last Updated
0.1.1 0 2/4/2026