ND

notgate/dnspy-mcp

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

21 stars 2 forks 品質 51 トレンド 10

Headless CLI reflection debugger for .NET assemblies with MCP server support

概要

A Model Context Protocol server for static .NET assembly analysis powered by ICSharpCode.Decompiler (dnSpyEx engine). Exposes decompilation, IL disassembly, metadata inspection, and protection analysis as MCP tools over stdio. Never executes target assemblies. - .NET 8 SDK or later - Compatible MCP client (Claude Desktop, Cursor, or any client supporting MCP stdio transport) detect_anti_debug, detect_anti_tamper, and get_protection_report perform static analysis only. The target assembly is never loaded as a .NET type, never JIT-compiled, and never executed. Analysis uses ICSharpCode.Decompiler's type system and PE reader exclusively. - P/Invoke declarations targeting known anti-debug APIs (IsDebuggerPresent, NtQueryInformationProcess, etc.) - Managed API usage (System.Diagnostics.Debugger.IsAttached, etc.

README

以下は原文 README の抜粋です。原文を見る。

dnSpy-MCP

A Model Context Protocol server for static .NET assembly analysis powered by ICSharpCode.Decompiler (dnSpyEx engine). Exposes decompilation, IL disassembly, metadata inspection, and protection analysis as MCP tools over stdio. Never executes target assemblies.

Requirements

  • .NET 8 SDK or later
  • Compatible MCP client (Claude Desktop, Cursor, or any client supporting MCP stdio transport)

Installation

git clone https://github.com/ZeraTS/dnSpy-MCP.git
cd dnSpy-MCP
dotnet build src/DnSpyMcp/DnSpyMcp.csproj -c Release

Claude Desktop Configuration

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "dnspy-mcp": {
      "command": "dotnet",
      "args": ["/path/to/src/DnSpyMcp/bin/Release/net8.0/DnSpyMcp.dll"]
    }
  }
}

Tools

Tool Description Key Parameters
get_pe_info Get PE/COFF header information, assembly metadata, and target framework assemblyPath
get_resources List all manifest resources embedded in the assembly assemblyPath
resolve_token Resolve a metadata token (hex, e.g. 0x02000001) to its definition assemblyPath, tokenHex
list_pinvokes List all P/Invoke (DllImport) declarations in the assembly assemblyPath
find_attributes Find all types and methods decorated with a specific attribute assemblyPath, attributeName
get_methods_for_type Get all methods defined on a specific type assemblyPath, typeName
decompile_assembly Decompile the entire assembly to C# source code assemblyPath
decompile_type Decompile a specific type to C# source code assemblyPath, typeName
decompile_method Decompile a specific method to C# source code assemblyPath, typeName, methodName
dump_il Dump IL (CIL) disassembly for the whole assembly, a type, or a specific method assemblyPath, typeName?, methodName?
inspect_type Inspect a type’s structure: fields, methods, properties, interfaces, optionally with source assemblyPath, typeName, includeSource?
inspect_method Inspect a specific method: signature, parameters, decompiled source, optionally IL assemblyPath, typeName, methodName, includeSource?, includeIL?
list_types List all type definitions in the assembly assemblyPath
find_methods Find methods in the assembly, optionally filtered by name pattern assemblyPath, pattern?
search_strings Search for string literals in the assembly’s decompiled source assemblyPath, pattern, useRegex?
search_members Search for types, methods, fields, and properties by name pattern assemblyPath, pattern
set_breakpoint Set a virtual breakpoint on a method at a specific IL offset assemblyPath, typeName, methodName, ilOffset
list_breakpoints List all active virtual breakpoints
GitHub で README 全文を見る

インストール

This server does not publish a one-line install command.

Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "dnspy-mcp": { "command": "dotnet", "args": ["/path/to/src/DnSpyMcp/bin/Release/net8.0/DnSpyMcp.dll"] } } }