Skip to main content

dnre-mcp

Links#

Overview
#

dnre-mcp is a Model Context Protocol (MCP) server for .NET assembly reverse engineering and decompilation. It gives AI assistants like Claude the ability to load, analyze, and decompile .NET assemblies without needing a GUI tool like dnSpy or ILSpy open. Built in C# on .NET 10 and powered by ICSharpCode.Decompiler (the engine behind ILSpy), it communicates over stdio for easy integration with Claude Code and Claude Desktop. The project is MIT licensed.

Features
#

Assembly Management
#

  • Load .NET assemblies (dll/exe) from disk
  • List all currently loaded assemblies

Type Analysis
#

  • List all types in an assembly with optional namespace filtering
  • Search for types by name (case-insensitive)
  • Get complete type metadata — base class, interfaces, fields, properties, methods, events, nested types
  • Decompile entire types to C# source code

Method Analysis
#

  • Search for methods across all types by name
  • Get method signature details — parameters, return type, accessibility, virtual/abstract/override
  • Decompile specific methods to C# source (handles overloads)

Namespace Browsing
#

  • List all namespaces in an assembly

Quick Start
#

1. Install from PyPI (recommended). dnre-mcp is published as a wheel that bundles the DnreMcp binary behind a small Python launcher, so it installs through uv/pip like any other MCP server:

# run on demand (fetched + cached on first launch)
uvx dnre-mcp

# or install the CLI persistently
uv tool install dnre-mcp

The wheel is tagged py3-none-win_amd64 — it works on any Python 3, but the bundled binary is Windows x64 and requires the .NET 10 runtime on the host:

winget install --id Microsoft.DotNet.Runtime.10 --exact

2. Or download a pre-built release from the GitLab releases page (binaries available for Windows x64 and Linux x64, no .NET SDK required).

3. Or build from source (requires .NET 10 SDK):

dotnet build src/DnreMcp/DnreMcp.csproj

4. Example MCP client config (e.g. for Claude Code or Claude Desktop), using the PyPI wheel via uvx:

{
  "mcpServers": {
    "dnre": {
      "command": "uvx",
      "args": ["dnre-mcp"]
    }
  }
}