ILSpyMCP
A MCP server for ILSpy
Ask AI about ILSpyMCP
Powered by Claude · Grounded in docs
I know everything about ILSpyMCP. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
ILSpy MCP Server
An MCP server that uses ICSharpCode.Decompiler to provide .NET assembly inspection tools. Lets LLMs list types, decompile C#, and view IL disassembly from compiled assemblies.
Prerequisites
Build
dotnet build
Usage
The server communicates over stdio using the MCP protocol.
dotnet run [options]
Options
| Option | Description |
|---|---|
--reference-path <path> | Add assembly reference directory (repeatable) |
-v, --verbose | Enable debug-level logging to stderr |
Tools
list_types
List all types (classes, interfaces, structs, delegates, enums) in a .NET assembly, grouped by namespace.
| Parameter | Required | Description |
|---|---|---|
assemblyPath | yes | Path to the .dll or .exe |
pattern | no | Regex to filter type names |
list_members
Decompile a type to C# and list its members and nested types.
| Parameter | Required | Description |
|---|---|---|
assemblyPath | yes | Path to the .dll or .exe |
typeName | yes | Fully qualified type name (e.g. Namespace.ClassName) |
decompile
Decompile a type to C# source code.
| Parameter | Required | Description |
|---|---|---|
assemblyPath | yes | Path to the .dll or .exe |
typeName | yes | Fully qualified type name |
disassemble
Disassemble a type to IL (Intermediate Language) code.
| Parameter | Required | Description |
|---|---|---|
assemblyPath | yes | Path to the .dll or .exe |
typeName | yes | Fully qualified type name |
MCP Client Configuration
Claude Code
Add to your MCP settings:
{
"mcpServers": {
"ilspy": {
"command": "dotnet",
"args": ["run", "--project", "/path/to/ILSpyMCP"]
}
}
}
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"ilspy": {
"command": "dotnet",
"args": ["run", "--project", "/path/to/ILSpyMCP"]
}
}
}
To pass additional options (e.g. reference paths for framework assemblies):
{
"mcpServers": {
"ilspy": {
"command": "dotnet",
"args": [
"run", "--project", "/path/to/ILSpyMCP",
"--",
"--reference-path", "/path/to/framework/assemblies"
]
}
}
}
