
kernelerr/dnspy.extension.mcp 是从 https://github.com/kernelerr/dnspy.extension.mcp. 导入的 MCP 服务器候选
概览
kernelerr/dnspy.extension.mcp 是从 https://github.com/kernelerr/dnspy.extension.mcp. 导入的 MCP 服务器候选
概述(AI 翻译)
让像 Claude 这样的 AI 助手通过 dnSpyEx 通过模型上下文协议(MCP)处理 .NET 汇编:反编译、搜索、跟踪交叉引用、修补 IL、重命名符号并生成 BepInEx / Harmony 代码——共 32 种工具。
中文说明:参见 README.zh-CN.md。
有两种运行方式
| 无头 | dnSpy内部 | |
|---|---|---|
| 运行内容 | dnSpy.Extension.MCP.Headless.exe,无窗口 |
扩展,位于 dnSpy 窗口内 |
| 它是如何开始的 | 你的MCP客户端在需要时启动它,之后停止 | 你打开dnSpy并开启启用服务器 |
| 传输 | 标准 | HTTP,http://localhost:3000 |
| 组装 | 它自己的:AI用open_files |
dnSpy中打开的任何内容(AI可以打开更多) |
| 补丁与重命名 | 内存中,直到save_assembly写入 |
相同,且实时显示在dnSpy的树和标签页中 |
| 在哪里可以买到 | 全能压缩包 | 全合一压缩包,还是仅插件的 DLL |
两者提供相同的工具和资源,端到端的测试套件是针对它们运行的。当你只想让 AI 完成工作时使用无头程序;想自己查看汇编时使用dnSpy。
快速开始
本页由 AI 翻译,技术细节请以原文为准。
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
-
Download the all-in-one zip for your system from Releases (which one?) and unzip it, e.g. to
C:\Tools\dnSpy. -
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.
- register the headless host — Claude Code starts it when needed:
-
Ask, in plain language:
“Open
C:\Games\MyGame\MyGame_Data\Managed\Assembly-CSharp.dll, find every method that uses the stringSAVEFILE, and show me the decompiledSaveGamemethod.”Claude picks the tools itself (
open_files→search_string_literals→decompile_method).
Installation
All-in-one zip (recommended)
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)
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"dnspy": {
"type": "stdio",
"command": "C:\\Tools\\dnSpy\\dnSpy.Extension.MCP.Headless.exe",
"args": []
}
}
}