KD

kernelerr/dnspy.extension.mcp

Developer tools

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

266 stars 30 forks Качество 74 Тренд 27GPL-3.0

kernelerr/dnspy.extension.mcp — это кандидат на MCP-сервер, импортированный из https://github.com/kernelerr/dnspy.extension.mcp.

Обзор

kernelerr/dnspy.extension.mcp — это кандидат на MCP-сервер, импортированный из https://github.com/kernelerr/dnspy.extension.mcp.

Обзор (машинный перевод)

Позволяет AI-ассистентам, таким как Claude, работать с .NET-ассемблями через dnSpyEx по протоколу Model Context Protocol (MCP): декомпилировать, искать, отслеживать перекрёстные ссылки, исправлять IL, переименовывать символы и генерировать код BepInEx / Harmony — всего 32 инструмента.

Китайский / 中文说明: см. README.zh-CN.md.

Два способа провести её

Безголовый Внутри dnSpy
Что работает dnSpy.Extension.MCP.Headless.exe, нет окна Расширение, внутри окна dnSpy
Как всё запускается Ваш MCP-клиент запускает его, когда нужно, и останавливает после этого Вы открываете dnSpy и включаете Включить сервер
Транспорт STDIO HTTP, http://localhost:3000
Сборки Свои: ИИ открывает их с помощью open_files Всё, что открыто в dnSpy (ИИ может открывать больше)
Патчи и переименования В памяти, пока save_assembly не напишет их То же самое, и отображается в живом времени в дереве и вкладках dnSpy
Где его взять Всё в одном zip Универсальный файл zip или DLL только с плагинами

Оба используют одни и те же инструменты и ресурсы, и сквозный тестовый набор работает против каждого из них. Используйте headless, когда хотите, чтобы работу выполнял только ИИ; используйте dnSpy для самостоятельного изучения сборок.

Быстрый старт

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

README

Показан фрагмент оригинального README. Открыть оригинал.

dnSpy MCP Extension

Lets AI assistants such as Claude work with .NET assemblies through dnSpyEx over the Model Context Protocol (MCP): decompile, search, follow cross-references, patch IL, rename symbols and generate BepInEx / Harmony code — 32 tools in all.

Chinese / 中文说明: see README.zh-CN.md.

Two ways to run it

Headless Inside dnSpy
What runs dnSpy.Extension.MCP.Headless.exe, no window The extension, inside the dnSpy window
How it starts Your MCP client launches it when needed and stops it afterwards You open dnSpy and turn on Enable Server
Transport stdio HTTP, http://localhost:3000
Assemblies Its own: the AI opens them with open_files Whatever is open in dnSpy (the AI can open more)
Patches and renames In memory until save_assembly writes them The same, and shown live in dnSpy’s tree and tabs
Where to get it The all-in-one zips The all-in-one zips, or the plugin-only DLL

Both serve the same tools and resources, and the end-to-end test suite runs against each. Use headless when you only want the AI to do the work; use dnSpy when you also want to look at the assemblies yourself.

Quick start

  1. Download the all-in-one zip for your system from Releases (which one?) and unzip it, e.g. to C:\Tools\dnSpy.

  2. Connect Claude. In Claude Code, either

    • register the headless host — Claude Code starts it when needed:
      claude mcp add --scope user dnspy -- "C:\Tools\dnSpy\dnSpy.Extension.MCP.Headless.exe"
      
    • or run dnSpy.exe, tick View → Options → MCP Server → Enable Server, and register its URL:
      claude mcp add --scope user --transport http dnspy http://localhost:3000
      

    For Claude Desktop and other clients, see Connecting a client.

  3. Ask, in plain language:

    “Open C:\Games\MyGame\MyGame_Data\Managed\Assembly-CSharp.dll, find every method that uses the string SAVEFILE, and show me the decompiled SaveGame method.”

    Claude picks the tools itself (open_files → search_string_literals → decompile_method).

Installation

Each zip on Releases is a complete dnSpy with the extension already installed and the headless host next to dnSpy.exe. Unzip it anywhere; there is nothing else to set up.

File dnSpy build Needs
dnSpy-MCP-win-x64.zip .NET 10, self-contained, x64 Nothing — the runtime is included
dnSpy-MCP-win-x86.zip .NET 10, self-contained, x86 Nothing — the runtime is included
dnSpy-MCP-net48.zip .NET Framework 4.8 .NET Framework 4.8 (part of Windows 10 and later)

Plugin-only (dnSpy already installed)

Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "dnspy": { "type": "stdio", "command": "C:\\Tools\\dnSpy\\dnSpy.Extension.MCP.Headless.exe", "args": [] } } }