IM

ian1971/mcpeek

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

11 stars 3 forks Качество 64 Тренд 18MIT

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 for
  • caseSensitive (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"
}
Открыть полный README на GitHub

Установка

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" ] } } }