DnSpy MCPserver Extension logo

DnSpy MCPserver Extension

Community
AgentSmithers

AgentSmithers DnSpyEx MCPServer extension

PublisherAgentSmithers
RepositoryDnSpy-MCPserver-Extension
LanguageC#
Forks
36
Stars
229
Available tools
0
Transport typestdio
LicenseGPL-3.0
Links
  • Connect tools to AI workflows

    DnSpy MCPserver Extension exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    229 stars and 36 forks from the linked repository.

AgentSmithers dnSpyEx MCPServer Extension

This is a dnSpy MCPServer Extension for the use of automated AI .NET reverse engineering The \dnSpy\Extensions\Examples\AgentSmithers dnSpy MCPServer.Extension has been updated to include the MCPServer logic with a few starting function to feed the decompiled code back to the LLM. This is an ongoing project and I plan to continue to add commands as time persist.

To execute the server, run as Administrator so the the Http server may Listen on +:3001 (release is currently set to 3003) and *:50301 for the streamable MCP Server.

The following command will suffice:

Recommended debug workflow:

Step 1: Ensure dnSpy is set as Startup Project

Step 2: Open Launch Settings In Solution Explorer, right-click on your project Select Properties In the left sidebar, click on Debug (or Debugging) Then go to "Open debug launch profiles UI"

Step 3: Add Command Line Arguments In the Command line arguments text box, enter: --extension-directory "$(SolutionDir)Extensions\Examples\Example1.Extension\bin\Debug\net48"

Step 4: Save Click Save or press Ctrl+S Close the properties window

Step 5: Test Press F5 or click the green play button Your dnSpy should now launch with your extension loaded!

OR

cd {dnspy directory}

dnspy.exe --extension-directory {Path to extension} Example 1: dnspy.exe --extension-directory "C:\repos\dnSpy\Extensions\Examples\Example1.Extension\bin\Debug\net48"

Example 2 in CMD: C:\Users\user>"C:\Users\user\source\repos\DnSpy-MCPserver-Extension\dnSpy\dnSpy\bin\Debug\net48\dnspy.exe" --extension-directory "C:\Users\user\source\repos\DnSpy-MCPserver-Extension\dnSpy\dnSpy\bin\Debug\net48\Extensions"

OR

In alternative you may copy the release into the Extension folder within the dnSpy\Extensions\AgentSmithersMCPServer path.

Modifying the project

Ensure to compile the primary DnSpy Soultion (Clean and rebuild) so that the dependancies for "AgentSmithers DnSpyEx MCPServer" can use them for its own build. (Note: When compiling DnSpyEx you may have approx. ~20 errors, this will not prevent the 45 Projects from compiling)

Once dnSpy is fully cleaned and compiled, navigate to the Example1 Extension Project. In there is the modified code. Make your adjustments, compile then use the --extension-directory argument when executing DnSpy.exe to point to your projects extension path.

In alternative you may pull down the latest dnSpyEx then rename the Extension sample folder to another name and bring the modified extension folder over to recompile.

Compiling

Clean and rebuild (I used visual Studio 2026, I think you'll need .NET Framework 4.8 and Core 10 Installed to compile the full solution)

#Clearing the errors above upon inital IDE load - Not executing these steps may result in the error below. HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem Find the value LongPathsEnabled. Double-click it and change the value to 1. Restart your computer (or at least restart Visual Studio).

Argument 1: cannot convert from 'System.ReadOnlySpan' to 'string' Cannot implicitly convert type 'System.ReadOnlySpan' to 'string' Argument 1: cannot convert from 'System.ReadOnlySpan' to 'string' Argument 1: cannot convert from 'System.ReadOnlySpan' to 'string' foreach statement cannot operate on variables of type 'void' because 'void' does not contain a public instance or extension definition for 'GetEnumerator' Metadata file 'C:\Users\User\source\repos\DnSpy-MCPserver-Extension\dnSpy\dnSpy\obj\Debug\net48\ref\dnSpy.exe' could not be found Metadata file 'C:\Users\User\source\repos\DnSpy-MCPserver-Extension\dnSpy\dnSpy\obj\Debug\net8.0-windows\ref\dnSpy.dll' could not be found

Supported commands

Currently readonly commands are supported to enumerate active namespaces, classes and functions by the AI. Plans are in the works to allow the AI to make interactive adjustments to the decompiled assemblies.

Get_Selected_Node - Gets the currently selected node within dnSpyEx
Get_Loaded_Assemblies - Gets all Assemblys currently loaded within dnSpyEx
Namespaces_From_Assembly - Dumps all unique namespaces under a given Assembly
Classes_From_Namespace - List all Classes under a given Namespace
Get_Class_Sourcecode - Dumps a target Class sourcecode
Get_Method_Prototypes - List all Method prototypes from a given Class within a given Namespace
Get_Method_SourceCode - Dumps a target Method's sourcecode
Update_Method_SourceCode - Update a target Method's sourcecode
Get_Function_Opcodes - Returns the IL opcodes of the specified method (with source line numbers)
Set_Function_Opcodes - Modifies the IL of the specified method at a given IL line index
Update_Tabs_View - Update all active tabs to reflect any changes or adjustments
Rename_Namespace - Renames exactly one distinct namespace across all types
Rename_Class - Renames a specific class within a given Namespace
Rename_Method - Renames a specific Methods by Class within a given Namespace
These commands allow you to inspect and modify .NET assemblies loaded in dnSpyEx, including viewing and editing source code, IL code, and performing various renaming operations.

Once the extension is loaded

A messagebox will appear allowing you a chance to attach your debugger if nessessary image

Click "OK" and the MCPServer will load on :3001

Connect via SSE or if your application only supports STDIO (Claude Desktop / Windsurf) grab a copy of the STDIO<->SSE bridge https://github.com/AgentSmithers/MCPProxy-STDIO-to-SSE

Attach the Bridge AFTER hitting "OK" and your good to go.

image

image

Use DnSpy MCPserver Extension MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once DnSpy MCPserver Extension is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add DnSpy MCPserver Extension as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the DnSpy MCPserver Extension MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "dnspy-mcpserver-extension": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the DnSpy MCPserver Extension MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the DnSpy MCPserver Extension MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use DnSpy MCPserver Extension to help me with this task?
DnSpy MCPserver Extension
Sure. I read it.
Here is what I found using DnSpy MCPserver Extension.

Frequently asked questions

What is the DnSpy MCPserver Extension MCP server used for?

DnSpy MCPserver Extension is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use DnSpy MCPserver Extension MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use DnSpy MCPserver Extension with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use DnSpy MCPserver Extension MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With DnSpy MCPserver Extension connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect DnSpy MCPserver Extension MCP to TypingMind?

DnSpy MCPserver Extension runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does DnSpy MCPserver Extension MCP provide in TypingMind?

DnSpy MCPserver Extension exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use DnSpy MCPserver Extension MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If DnSpy MCPserver Extension requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇