Skip to main content

MCP server exposing dnSpy decompilation (search, navigate, decompile .NET assemblies to C#)

Project description

dnSpy MCP

MCP server exposing dnSpy decompilation — search, list members, decompile to C#, and get IL from .NET assemblies. A Python (FastMCP) shim supervises a .NET decompiler worker built from this dnSpy fork; the published wheel bundles the worker, so installing needs no .NET build.

Use (Windows)

claude mcp add dnspy -- uvx dnspy-mcp

or pip install dnspy-mcp. That's it — the worker ships inside the wheel.

Tools

  • search_symbols(assembly, query, kind?) — kind: type | method | field | any
  • list_members(assembly, typeFullName)
  • decompile_type(assembly, typeFullName)
  • decompile_method(assembly, typeFullName, method)method = name or 0x-token
  • get_il(assembly, typeFullName, method)

assembly is an absolute path; the worker loads + caches it on first use.

Develop

git submodule update --init Extensions/ILSpy.Decompiler/ICSharpCode.Decompiler Extensions/ILSpy.Decompiler/NRefactory
dotnet build dnSpy.Mcp.Worker/dnSpy.Mcp.Worker.csproj -c Release
cd mcp && py -m pip install -e ".[dev]"
$env:DNSPY_WORKER_EXE = "<repo>/dnSpy.Mcp.Worker/bin/Release/net48/dnSpy.Mcp.Worker.exe"
py -m pytest -q

DNSPY_WORKER_EXE overrides the bundled worker path for development.

Publish

# set $env:TWINE_USERNAME='__token__'; $env:TWINE_PASSWORD=<pypi-token>
powershell -ExecutionPolicy Bypass -File mcp/publish.ps1

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dnspy_mcp-0.1.0-py3-none-win_amd64.whl (2.2 MB view details)

Uploaded Python 3Windows x86-64

File details

Details for the file dnspy_mcp-0.1.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: dnspy_mcp-0.1.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for dnspy_mcp-0.1.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 dac973d1c688cf303db0a5d723054ff9503e6c05bf5d79cdfc9d99f759c5f5ce
MD5 de698144b4336190aea848f964772b25
BLAKE2b-256 a20de26aaad73c92bde4b1a5d90cab6ec13c8eede353e5bbb46756a4fe542371

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page