MCPPOC - .NET Reverse Engineering via MCP

MCPPOC - .NET Reverse Engineering via MCP

mcp-dotnet•byneoz

A .NET reverse engineering toolkit implemented as a Model Context Protocol server that analyzes assemblies, extracts metadata, and inspects code structures via MCP tool calls.

License: MIT License•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Loads and examines .NET assemblies via MCP API calls, searching and enumerating types with regex patterns.
  • •Inspects methods, analyzes IL code, extracts control flow graphs, and decompiles IL back to C#.
  • •Locates literal strings embedded in assemblies and finds method usages and references.
  • •Modifies method instructions at the IL level for testing and debugging, and saves assemblies.

BEST FOR

  • •Reverse engineering .NET assemblies by discovering types, inspecting methods, and finding string literals through an MCP client.
  • •Integrating .NET assembly analysis capabilities into editors and IDEs that support MCP, such as VS Code.
  • •Understanding complex methods through control flow extraction and C# decompilation.

ABOUT MCP-DOTNET

MCPPOC - .NET Reverse Engineering via MCP is cataloged as an MCP server attributed to neoz. A .NET reverse engineering toolkit implemented as a Model Context Protocol server that analyzes assemblies, extracts metadata, and inspects code structures via MCP tool calls. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT License. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCPPOC - .NET Reverse Engineering via MCP are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What tools does MCPPOC expose over MCP?

Tools are exposed by the DnlibTools class with the McpServerTool attribute, covering operations such as loading assemblies, listing types by regex, decompiling methods by RID, and extracting control flow graphs.

Does MCPPOC require loading an assembly before using analysis tools?

Yes; a LoadAssembly call must precede analysis tools since all operations depend on an assembly being loaded first.

Can MCPPOC patch methods at the IL level and save the modified assembly?

Yes, methods can be modified at the IL level with UpdateMethodInstructions, and changes can be saved via SaveAssembly.

上游原版 README

在 GitHub 查看同一版本原文

README.md · a6e0c00a98fb · 采集于 2026-11-13 10:06:23 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

MCPPOC - .NET Reverse Engineering via MCP

MCPPOC is a .NET reverse engineering toolkit implemented as a Model Context Protocol (MCP) server. Built using the dnlib library, it provides an API-driven approach to analyze .NET assemblies, extract metadata, and inspect code structures through the MCP communication protocol.

Features

  • Assembly Analysis: Load and examine .NET assemblies via MCP API calls
  • Type Discovery: Search and enumerate all types using regex patterns
  • Method Inspection: List methods, analyze IL code, and extract control flow graphs
  • Code Relationships: Find method usages, dependencies, and references
  • String Analysis: Locate literal strings embedded in assemblies
  • Advanced Analysis: Detect reflection usage, dynamic code execution, and serialization
  • Code Decompilation: Convert IL code back to C# for easier analysis
  • Code Patching: Modify method instructions for testing and debugging

Installation

  1. Clone the repository:

    git clone https://github.com/neoz/mcp-dotnet
    cd mcp-dotnet
    
  2. Build the project using the .NET CLI:

    dotnet build
    
  3. Run the MCP server:

    dotnet run
    

Using MCPPOC as an MCP Server

MCPPOC implements the Model Context Protocol (MCP) to expose its .NET reverse engineering capabilities as a service. This allows any MCP-compatible client to interact with the toolkit and analyze .NET assemblies.

Connecting to MCPPOC

When running, MCPPOC provides an MCP server that processes commands through standard input/output. You can:

  1. Connect directly via stdin/stdout when running the executable
  2. Connect through an MCP-compatible client tool
  3. Integrate into editors and IDEs that support MCP

Available MCP Tools

The DnlibTools class exposes all functionality as MCP server tools with the [McpServerTool] attribute. Each tool is self-documented with descriptive parameter information.

Basic Operations

// Load an assembly for analysis
{
  "jsonrpc": "2.0",
  "method": "mcp/execute",
  "params": {
    "tool": "LoadAssembly",
    "args": {
      "AssemblyPath": "path/to/assembly.dll"
    }
  }
}

// List types matching a pattern
{
  "jsonrpc": "2.0",
  "method": "mcp/execute",
  "params": {
    "tool": "ListTypesRegex",
    "args": {
      "pattern": "System\\..*",
      "offset": 0,
      "pageSize": 100
    }
  }
}

Advanced Analysis

// Decompile a method using its RID
{
  "jsonrpc": "2.0",
  "method": "mcp/execute",
  "params": {
    "tool": "Decompile_Method_By_RID",
    "args": {
      "rid": 42
    }
  }
}

// Extract a method's control flow graph
{
  "jsonrpc": "2.0",
  "method": "mcp/execute",
  "params": {
    "tool": "ExtractControlFlowGraph",
    "args": {
      "methodName": "Namespace.TypeName.MethodName"
    }
  }
}

MCP Server Architecture

MCPPOC implements the Model Context Protocol (MCP) server architecture, which offers several advantages:

  1. Language-Agnostic: Any language or tool that can speak MCP can use MCPPOC's functionality
  2. IDE Integration: Easily integrates with VS Code and other MCP-compatible editors
  3. Self-Documented: All tools expose descriptions and parameter information
  4. Structured Data: Returns JSON-serialized results for easy parsing and analysis

MCP Tool Guidelines

When using MCPPOC via MCP, follow these guidelines for optimal results:

  1. Sequential Workflow: Always start by calling the LoadAssembly tool before using any analysis tools. All operations depend on having an assembly loaded first.

  2. Tool Selection Strategy:

    • For discovery: Use ListTypesRegex and SearchTypes to find structures of interest
    • For analysis: Use specialized tools like GetMethodILBodyByRID or ListTypeDependencies
    • For modification: Use UpdateMethodInstructions to patch code
  3. Pagination Support: Many tools support pagination with offset and pageSize parameters:

    {
      "tool": "FindStringLiterals",
      "args": {
        "offset": 100,
        "pageSize": 50
      }
    }
    
  4. Error Handling: All tools return meaningful error messages when operations fail:

    • "No assembly loaded" indicates you need to call LoadAssembly first
    • Type/method not found errors indicate you should verify names and use search tools
  5. Working with Large Assemblies:

    • Use specific search tools rather than retrieving everything
    • Increase page sizes for bulk operations
    • Consider extracting only the needed components
  6. Security and Permissions: Respect intellectual property and license restrictions when analyzing assemblies. The tool provides capabilities for legitimate reverse engineering scenarios only.

Example MCP Session

Here's an example of a complete reverse engineering session using the MCP protocol:

// 1. Load an assembly
{"jsonrpc":"2.0","method":"mcp/execute","params":{"tool":"LoadAssembly","args":{"AssemblyPath":"SampleApp.dll"}}}
// Response: {"jsonrpc":"2.0","id":null,"result":"Assembly 'SampleApp.dll' loaded successfully."}

// 2. Get metadata about the assembly
{"jsonrpc":"2.0","method":"mcp/execute","params":{"tool":"GetMetadata","args":{}}}
// Response: {"jsonrpc":"2.0","id":null,"result":"{\"AssemblyName\":\"SampleApp\",\"EntryPoint\":\"SampleApp.Program::Main\",\"MixedMode\":false}"}

// 3. Find interesting string literals
{"jsonrpc":"2.0","method":"mcp/execute","params":{"tool":"FindStringLiterals","args":{"offset":0,"pageSize":10}}}
// Response: [Array of string references]

// 4. Find methods that use a specific string
{"jsonrpc":"2.0","method":"mcp/execute","params":{"tool":"FindStringReferences","args":{"str":"password"}}}
// Response: [Array of method references]

// 5. Decompile an interesting method
{"jsonrpc":"2.0","method":"mcp/execute","params":{"tool":"Decompile_Method_By_RID","args":{"rid":42}}}
// Response: C# decompiled code

Advanced Features

Control Flow Analysis

MCPPOC can extract and visualize method control flows, which is valuable for understanding complex methods:

{"jsonrpc":"2.0","method":"mcp/execute","params":{"tool":"ExtractControlFlowGraph","args":{"methodName":"Namespace.TypeName.MethodName"}}}

Code Patching

You can modify methods at the IL level for testing or debugging:

{"jsonrpc":"2.0","method":"mcp/execute","params":{"tool":"UpdateMethodInstructions","args":{"rid":42,"offset":10,"newInstruction":"ldstr \"Patched!\"\ncall void [System.Console]System.Console::WriteLine(string)"}}}

Assembly Saving

After analyzing or modifying an assembly, save the changes:

{"jsonrpc":"2.0","method":"mcp/execute","params":{"tool":"SaveAssembly","args":{"path":"Modified.dll","mixedMode":false}}}

Integration Guide

Setting Up with VS Code

VS Code can connect to MCPPOC as an MCP server to provide advanced .NET analysis capabilities directly within your editor:

  1. Install the VS Code MCP Client extension:

    code --install-extension ms-toolsai.vscode-mcp-client
    
  2. Configure the extension in your settings.json:

    "mcp.servers": [
      {
        "name": "MCPPOC",
        "command": "dotnet",
        "args": ["path/to/MCPPOC.dll"],
        "capabilities": ["dnlib", "decompiler"]
      }
    ]
    
  3. Start the server from the Command Palette:

    > MCP: Connect to Server > MCPPOC
    
  4. Access MCPPOC tools from the VS Code MCP Client panel.

Using with Claude AI

Claude can interact with MCPPOC to analyze .NET assemblies when properly configured:

  1. Set up a Claude AI environment with MCP capabilities enabled.

  2. Configure Claude to use MCPPOC as its MCP server:

    {
      "mcpServers": [
        {
          "id": "dotnet-analyzer",
          "name": "MCPPOC",
          "command": "dotnet run --project /path/to/mcp-dotnet/MCPPOC.csproj",
          "documentationUrl": "https://github.com/neoz/mcp-dotnet"
        }
      ]
    }
    
  3. In your conversations with Claude, you can instruct it to use MCPPOC tools:

    Claude, please use the MCPPOC MCP server to analyze the MyApp.dll assembly and find all string literals.
    

Command-Line Integration

For command-line usage, you can create scripts that communicate with MCPPOC via standard I/O:

PowerShell Example

# Start MCPPOC server
$mcpServer = Start-Process -FilePath "dotnet" -ArgumentList "run --project C:\path\to\mcp-dotnet" -RedirectStandardInput stdin.pipe -RedirectStandardOutput stdout.pipe -NoNewWindow -PassThru

# Load an assembly
$request = @{
  jsonrpc = "2.0"
  id = 1
  method = "mcp/execute"
  params = @{
    tool = "LoadAssembly"
    args = @{
      AssemblyPath = "C:\path\to\assembly.dll"
    }
  }
} | ConvertTo-Json -Compress

# Send request to MCPPOC
$request | Out-File -FilePath stdin.pipe -Encoding utf8
$response = Get-Content -Path stdout.pipe

# Process response
Write-Host $response

Bash Example

# Start MCPPOC server
mkfifo request_pipe response_pipe
dotnet run --project /path/to/mcp-dotnet < request_pipe > response_pipe &

# Load an assembly
echo '{"jsonrpc":"2.0","id":1,"method":"mcp/execute","params":{"tool":"LoadAssembly","args":{"AssemblyPath":"/path/to/assembly.dll"}}}' > request_pipe

# Read response
cat response_pipe

Dependencies

Contributing

Contributions are welcome! Please submit a pull request or open an issue to suggest improvements or report bugs.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Disclaimer

This tool is intended for educational and debugging purposes only. Use it responsibly and ensure compliance with applicable laws and regulations.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCPPOC - .NET Reverse Engineering via MCP from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-dotnet)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools