MCP server for decompiling and analyzing .NET assemblies using ILSpy. Provides tools for exploring assembly structure, decompiling types and methods, analyzing architecture, and searching for members across assemblies.
ILSpy MCP provides 15 well-intentioned tools for .NET assembly analysis with clear, context-rich descriptions (avg 180 chars, well above 34-char baseline). All tools have input schemas with type definitions and parameter descriptions. However, output schemas are entirely undocumented, no tool specifies what fields or structure the response contains, forcing LLMs to infer results. Error handling is minimal; tools reference McpToolException but provide no recovery guidance. Tool naming is strong (verb_noun pattern: decompile_type, list_assembly_types, search_members_by_name). Composition is clean, each tool has one responsibility. The main gap: output documentation and error recovery patterns are absent, which limits LLM confidence in chaining results.
Use this when you just installed a NuGet library and need to understand its overall architecture and entry points before writing code. Provides high-level overview of main namespaces, key public types, and design patterns. Start here for unfamiliar libraries.
Use this when you need to call a specific library method but don't understand its parameters, behavior, or side effects. Analyzes the method's implementation to explain what it does, what arguments it expects, and how to use it correctly. Helpful for understanding undocumented APIs.
Use this when writing code that needs to interact with a NuGet library type but you don't know its structure. Decompiles a class/interface/struct to understand what methods, properties, and constructors are available. Returns AI-analyzed insights about usage patterns, not raw source code.
Use this when you want to know what extension methods are available for a specific type. Extension methods add functionality to existing types and are often discovered through IntelliSense, but this tool helps you find them when exploring a library. Shows you additional methods you can call on instances of the type.
Use this when you need to understand inheritance relationships - what base classes a type extends, what interfaces it implements, or what types inherit from it. Essential for knowing valid cast operations, available polymorphic behaviors, and understanding the type's contract.
Output schemas completely undocumented. No tool specifies return type, field names, or structure. LLMs cannot plan downstream tool calls or extract required data (e.g., does list_assembly_types return an array or a formatted string? What fields does rpc_search return?). This violates pattern:tool and pattern:response-shaper.
Error handling provides no recovery guidance. McpToolException is thrown but no tool documents what errors are possible, whether they are retryable, or what the LLM should do next. Violates pattern:recovery-guide and pattern:error-classification.
RPC tools (rpc_decompile_method, rpc_decompile_type, rpc_list_types, rpc_search) use 'rpc_' prefix which is implementation detail, not user intent. Naming should reflect what the tool does (e.g., decompile_type_from_ilspy, search_loaded_assemblies) to avoid LLM confusion between file-based and ILSpy-based variants.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 66 | <=2025-11-25 | v2 |
Get the list of assemblies currently loaded in ILSpy. This shows all assemblies that have been opened in the ILSpy application.
Get information about the currently selected node in ILSpy's tree view. This shows what assembly, type, or member the user has selected.
Use this when you know the class name but need to see what methods and properties you can call on it. Shows complete API surface (method signatures, properties, events) without implementation details. Faster than decompile_type when you just need to know 'what can I call?'
Check the connection status to ILSpy RPC server. Returns information about whether ILSpy is running and connected, its version, and how many assemblies are loaded.
Use this when you added a NuGet package but don't know what classes/types it provides. Lists all available types by namespace to help you discover what's available. Essential first step before using decompile_type to examine specific classes.
Decompile a specific method from an assembly currently loaded in ILSpy. Use this when you want to see the decompiled source code of a single method.
Decompile a type from an assembly currently loaded in ILSpy. Use this when you want to see the decompiled source code of a class, interface, struct, or enum that's already open in ILSpy.
List all types in an assembly currently loaded in ILSpy. Can optionally filter by namespace.
Search for types, methods, properties, fields, or events across all assemblies loaded in ILSpy. Useful for finding specific members when you don't know which type they're in.
Use this when you know what operation you want to perform (like 'Parse', 'Convert', 'Serialize') but don't know which type contains that method. Searches across all types in the assembly to find matching methods, properties, or fields. Helps discover API entry points.
No pagination or result limits documented. Tools like list_assembly_types and rpc_search may return hundreds of results, risking context window exhaustion. No limit parameter, no cursor/offset, no total count in response. Violates pattern:paginated-result.
Tool composition gap: decompile_type and decompile_method descriptions mention 'AI-analyzed insights' but no output schema documents what insights are returned or how they differ from raw decompilation. Unclear whether these tools return structured analysis or free-text summaries.