ILSpyMcpServer 0.0.4

dotnet tool install --global ILSpyMcpServer --version 0.0.4
                    
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 ILSpyMcpServer --version 0.0.4
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=ILSpyMcpServer&version=0.0.4
                    
nuke :add-package ILSpyMcpServer --version 0.0.4
                    

ILSpy MCP Server

A Model Context Protocol (MCP) server that provides AI-powered .NET assembly decompilation and analysis using ILSpy.

Features

  • AI-Powered Analysis: Uses intelligent sampling to analyze decompiled code without overwhelming token usage
  • Selective Decompilation: Decompile specific types or methods instead of entire assemblies
  • Smart Assembly Overview: Get architectural insights and design pattern analysis
  • Member Exploration: Quick API surface exploration without full decompilation

Tools

1. decompile_type

Decompile a specific type (class, interface, struct, enum) from a .NET assembly to C# source code.

Parameters:

  • assemblyPath (required): Path to the .NET assembly file
  • typeName (required): Full name of the type (e.g., 'System.String')
  • query (optional): What specific information you're looking for

Example:

{
  "assemblyPath": "C:\\Program Files\\dotnet\\shared\\Microsoft.NETCore.App\\9.0.0\\System.Private.CoreLib.dll",
  "typeName": "System.String",
  "query": "method implementations"
}

2. decompile_method

Decompile a specific method from a type in a .NET assembly.

Parameters:

  • assemblyPath (required): Path to the .NET assembly file
  • typeName (required): Full name of the type containing the method
  • methodName (required): Name of the method to decompile
  • query (optional): What aspect of the method to focus on

Example:

{
  "assemblyPath": "MyLibrary.dll",
  "typeName": "MyNamespace.MyClass",
  "methodName": "ProcessData",
  "query": "algorithm logic"
}

3. list_assembly_types

List all types in a .NET assembly with optional namespace filtering.

Parameters:

  • assemblyPath (required): Path to the .NET assembly file
  • namespaceFilter (optional): Filter types by namespace (case-insensitive)

Example:

{
  "assemblyPath": "MyLibrary.dll",
  "namespaceFilter": "System.Collections"
}

4. analyze_assembly

Get an AI-powered analysis of an entire assembly's structure and design.

Parameters:

  • assemblyPath (required): Path to the .NET assembly file
  • query (optional): What aspects to analyze

Example:

{
  "assemblyPath": "MyLibrary.dll",
  "query": "design patterns and architecture"
}

5. get_type_members

Get a detailed list of all members (methods, properties, fields, events) of a type.

Parameters:

  • assemblyPath (required): Path to the .NET assembly file
  • typeName (required): Full name of the type to inspect

Example:

{
  "assemblyPath": "MyLibrary.dll",
  "typeName": "MyNamespace.MyClass"
}

Installation

Option 1: Using dnx (.NET 10+)

The easiest way to use this tool without installation:

dnx ILSpyMcpServer

Option 2: As a .NET Tool

dotnet tool install -g ILSpyMcpServer

Option 3: From Source

git clone https://github.com/seungyongshim/ILSpyMcpServer.git
cd ILSpyMcpServer/src
dotnet build
dotnet pack
dotnet tool install -g --add-source ./bin/Debug ILSpyMcpServer

Configuration

Claude Desktop

Add to your Claude Desktop configuration file:

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

{
  "mcpServers": {
    "ilspy": {
      "command": "dnx",
      "args": ["ILSpyMcpServer"]
    }
  }
}
Using installed global tool
{
  "mcpServers": {
    "ilspy": {
      "command": "ilspy-mcp"
    }
  }
}

Other MCP Clients

  • With dnx: dnx ILSpyMcpServer
  • With global tool: ilspy-mcp

Requirements

  • .NET 9.0 or later
  • Compatible with any MCP client that supports stdio transport

How It Works

Instead of dumping entire decompiled source code (which can be thousands of lines), this server:

  1. Uses ILSpy to decompile .NET assemblies
  2. Sends the decompiled code to the AI model via MCP sampling
  3. Returns intelligent analysis, summaries, and insights
  4. Preserves token efficiency while providing valuable information

Use Cases

  • Library Exploration: Understand how third-party libraries work internally
  • Reverse Engineering: Analyze compiled .NET assemblies
  • Learning: Study implementation patterns in .NET framework classes
  • API Discovery: Find and understand available methods and properties
  • Code Review: Analyze decompiled code for security or quality insights

License

MIT

Repository

https://github.com/seungyongshim/ILSpyMcpServer

Author

seungyongshim

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  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.0.4 177 10/30/2025
0.0.2 169 10/30/2025
0.0.1 167 10/30/2025