Get the FREE Ultimate OpenClaw Setup Guide →

ILSpyMcpServer

MCP server from seungyongshim/ILSpyMcpServer

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio seungyongshim-ilspymcpserver ilspy-mcp

How to use

ILSpy MCP Server provides AI-assisted analysis and selective decompilation of .NET assemblies via the MCP protocol. It leverages ILSpy to decompile targeted types or methods and then uses an AI model to sample and analyze the resulting code, offering intelligent summaries, architectural insights, and API surface exploration without flooding you with thousands of lines of decompiled code. The server exposes tools such as decompile_type, decompile_method, list_assembly_types, analyze_assembly, and get_type_members to let you inspect assemblies at varying levels of granularity. You can query for specific details like method implementations, design patterns, or class structures, and the AI response will focus on the requested information while preserving token efficiency.

To use the server, connect with a compatible MCP client and invoke the available tools. For example, you can request a specific type decompilation with decompile_type to obtain C# source for a class, or use get_type_members to enumerate all members of a type. The analyze_assembly tool provides a high-level AI-driven analysis of the entire assembly’s structure and patterns, which is helpful for architecture reviews or learning new APIs. The tools are designed to minimize token usage while delivering targeted, actionable insights.

How to install

Prerequisites:

  • .NET 9.0 or later (as noted in the project requirements)
  • A compatible MCP client to connect via stdio transport

Installation options (choose one):

Option A: Install and run via a global .NET tool (recommended per README)

  1. Install the global tool:
dotnet tool install -g ILSpyMcpServer
  1. Run the server (example using the global tool):
ilspy-mcp

Option B: Use the legacy dnx approach (dnx ILSpyMcpServer) if you prefer the older workflow

  1. Install DNX and run:
dnx ILSpyMcpServer

Option C: From source (build and package locally, then install the tool)

  1. Clone the repository:
git clone https://github.com/seungyongshim/ILSpyMcpServer.git
  1. Build and pack:
cd ILSpyMcpServer/src
dotnet build
dotnet pack
  1. Install the packaged tool from the local source (adjust path as needed):
dotnet tool install -g --add-source ./bin/Debug ILSpyMcpServer

Notes:

  • Ensure your environment has the required .NET SDKs installed and that the MCP client you use supports stdio transport.
  • If you plan to deploy in containers or cloud environments, consider packaging the tool inside your container image and exposing the MCP protocol endpoint accordingly.

Additional notes

Tips and considerations:

  • The server focuses on selective decompilation (types or methods) to preserve token usage while delivering meaningful insights.
  • Tools such as analyze_assembly can help you quickly grasp architectural patterns and design choices without full-source dumps.
  • If you encounter issues with different dotnet tool paths, verify your PATH includes the location where dotnet tools install (e.g., on Windows, typically %USERPROFILE%.dotnet\tools).
  • For Claude Desktop or other MCP clients, configure an mcpServers entry for ilspy with the command ilspy-mcp or the appropriate tool command in your environment.
  • When using decompile_type or decompile_method, provide precise assembly paths and fully-qualified type/method names to minimize processing and improve accuracy.

Related MCP Servers

Sponsor this space

Reach thousands of developers