re-dotnet

re-dotnet

MCP server for .NET assembly analysis. Vendor-neutral wrapper around AsmResolver and ILSpy for parsing and decompiling .NET assemblies.

Category
Visit Server

README

re-dotnet

MCP server for .NET assembly analysis. Vendor-neutral wrapper around AsmResolver (PE + .NET metadata) and ICSharpCode.Decompiler / ILSpy (C# decompiler).

Why

The other RE-AI MCP servers (re-lief, re-rizin, re-capa) handle native PE, ELF, MachO, DEX, ART, OAT — but none of them read the .NET CLI header or the ECMA-335 metadata tables. A MonoLauncher-style launcher that ships its payload as a managed .NET assembly is invisible to those tools; the import hash is empty, the strings table is uninformative, and rizin only sees native wrapper code.

re-dotnet fills that gap. It enumerates TypeDef / MethodDef / FieldDef, walks the #US string heap, and decompiles a single class or method to C# on demand.

Architecture

The MCP server itself is pure Python. The heavy lifting is done by a small .NET 10 CLI binary, re-dotnet-cli, built from src/re_dotnet/dotnet/Re.Dotnet.Cli/:

Claude Code (MCP stdio)
  │
  ▼
re-dotnet server (Python, this directory)
  │  subprocess.run(...)
  ▼
re-dotnet-cli (self-contained .NET 10 binary, single-file publish)
  │
  ├─ AsmResolver 6.x        (PE + .NET metadata, obfuscation-robust)
  └─ ICSharpCode.Decompiler 9.x  (C# decompiler)

The subprocess boundary is intentional:

  • No pythonnet. pythonnet is a fragile ABI bridge that breaks on every Python minor. Process isolation is robust.
  • No Mono. .NET 10 is the only supported runtime.
  • Single-file publish. The CLI is a self-contained binary; no dotnet --info dance, no DOTNET_ROOT env vars, no GAC.

The Python wrapper locates the binary via this fallback chain (see runner.py):

  1. $RE_DOTNET_CLI_PATH (escape hatch for tests)
  2. <server>/bin/re-dotnet-cli (install.sh default)
  3. The dev build under src/re_dotnet/dotnet/.../bin/
  4. re-dotnet-cli on $PATH

Tools

Tool What it does
check_dotnet Health check — return .NET runtime + AsmResolver + Decompiler versions
parse_assembly Enumerate TypeDef rows; return assembly header + one row per type
decompile_type Decompile a single class to C# via ILSpy
decompile_method Decompile a single method to C# via ILSpy
list_strings Walk field-default constant strings (the #US heap subset)
get_entry_point Return the managed entry point (<Module>::.cctor or Main)

Install

./install.sh builds the .NET CLI via dotnet publish and copies the resulting binary to servers/re-dotnet/bin/.

To build standalone:

cd servers/re-dotnet/src/re_dotnet/dotnet/Re.Dotnet.Cli
dotnet publish -c Release -o ../../../../bin

To run:

re-dotnet                          # stdio transport (default for MCP)
python -m re_dotnet                # equivalent

Requirements

  • .NET 10 SDK or runtime (dotnet --version ≥ 10.0)
  • 2 GB disk for the .NET SDK + the self-contained binary

Deobfuscation notes

The ILSpy decompiler produces clean C# for non-obfuscated assemblies. For binaries that have been through commercial obfuscation (control-flow flattening, string encryption, JIT-hooking), the decompiler will surface Unable to decompile ... errors. The remediation path is to run the .NET deobfuscator first (the OSS de4dot shells out, GPL-3.0 — the RE-AI plugin keeps it process-isolated so the plugin's own distribution stays clean) and then re-run decompile_type / decompile_method on the cleaned output.

Pairing with re-leak-scan

A .NET-style launcher that calls out to telemetry endpoints (Sentry, Logstash, Confluence, Google Drive) will have those URLs as field-default constants. Run re-leak-scan (T2.2) on the assembly, or call list_strings here and pipe the output through a regex filter for the four endpoint families.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured