ILSpyMcpServer
MCP server from seungyongshim/ILSpyMcpServer
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)
- Install the global tool:
dotnet tool install -g ILSpyMcpServer
- 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
- Install DNX and run:
dnx ILSpyMcpServer
Option C: From source (build and package locally, then install the tool)
- Clone the repository:
git clone https://github.com/seungyongshim/ILSpyMcpServer.git
- Build and pack:
cd ILSpyMcpServer/src
dotnet build
dotnet pack
- 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
mssql
MSSQL Server MCP implementation written in C#
McpDotNet.Extensions.SemanticKernel
Microsoft SemanticKernel integration for the Model Context Protocol (MCP). Enables seamless use of MCP tools as AI functions.
DatabaseMcpServer
MCP server from ttcc666/DatabaseMcpServer
mcp-dataverse
MCP Server for querying Dataverse using SQL
xperience-community
ASP.NET Core MCP server for Xperience by Kentico projects
console-to-http
Example of converting a stdio MCP server to HTTP using ModelContextProtocol.AspNetCore