
ian1971/mcpeek
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
dotnet decompilation mcp for reasoning about libraries
概要
A Model Context Protocol (MCP) server that decompiles .NET DLL assemblies using ICSharpCode.Decompiler (ILSpy's library) and exposes the decompiled code to AI tools. - : Decompiles .NET DLLs to C# source code - : Persistent file-based caching using SHA256 hash for speed - : Search across all decompiled code - : Exposes decompiled files as MCP resources - : Provides MCP tools for decompilation and search operations - .NET 9.0 SDK or later - Windows, Linux, or macOS The server communicates via stdio and follows the MCP protocol. Decompiles all .NET DLL files in a specified folder. - folderPath (string): The absolute path to the folder containing DLL files - dllPath (string): The absolute path to the DLL file Searches for text patterns across all decompiled C# code.
README
以下は原文 README の抜粋です。原文を見る。
DLL Decompiler MCP Server
A Model Context Protocol (MCP) server that decompiles .NET DLL assemblies using ICSharpCode.Decompiler (ILSpy’s library) and exposes the decompiled code to AI tools.
Features
- Decompilation: Decompiles .NET DLLs to C# source code
- Caching: Persistent file-based caching using SHA256 hash for speed
- Search: Search across all decompiled code
- Resources: Exposes decompiled files as MCP resources
- Tools: Provides MCP tools for decompilation and search operations
Installation
Prerequisites
- .NET 9.0 SDK or later
- Windows, Linux, or macOS
Build
cd c:\development\mcpeek\McPeek
dotnet build
Usage
Running the Server
dotnet run
The server communicates via stdio and follows the MCP protocol.
MCP Tools
The server exposes the following tools:
1. DecompileFolder
Decompiles all .NET DLL files in a specified folder.
Parameters:
folderPath(string): The absolute path to the folder containing DLL files
Returns:
{
"Success": true,
"Message": "Successfully decompiled 5 assemblies",
"AssemblyNames": ["Assembly1", "Assembly2", ...],
"TotalFiles": 150
}
2. DecompileDll
Decompiles a specific DLL file.
Parameters:
dllPath(string): The absolute path to the DLL file
Returns:
{
"Success": true,
"Message": "Successfully decompiled MyAssembly",
"AssemblyNames": ["MyAssembly"],
"TotalFiles": 30
}
3. SearchCode
Searches for text patterns across all decompiled C# code.
Parameters:
query(string): The text to search forcaseSensitive(bool, optional): Whether search should be case-sensitive (default: false)maxResults(int, optional): Maximum number of results to return (default: 50)
Returns:
{
"Success": true,
"Query": "MyClass",
"TotalMatches": 10,
"Results": [
{
"AssemblyName": "MyAssembly",
"FilePath": "MyNamespace/MyClass.cs",
"LineNumber": 42,
"LineContent": "public class MyClass",
"Context": "..."
}
]
}
4. ListLoadedAssemblies
Lists all assemblies that have been decompiled and are currently loaded.
Returns:
{
"Success": true,
"TotalAssemblies": 5,
"Assemblies": [
{
"Name": "MyAssembly",
"Path": "C:\\path\\to\\MyAssembly.dll",
"FileCount": 30,
"DecompiledAt": "2025-10-24T12:00:00Z"
}
]
}
5. GetCacheStatistics
Gets statistics about the decompilation cache.
Returns:
{
"Success": true,
"TotalCachedAssemblies": 10,
"CacheDirectory": "C:\\Users\\...\\Temp\\McPeek\\cache",
"CacheSizeMB": 15.5
}
6. ClearCache
Clears all cached decompilation results.
Returns:
{
"Success": true,
"Message": "Cache cleared successfully"
}
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →設定
{
"mcpServers": {
"mcpeek": {
"command": "dotnet",
"args": [
"run",
"--project",
"c:\\development\\mcpeek\\McPeek\\McPeek.csproj"
]
}
}
}