Skip to content

Add Debugger MCP - #1211

Open
UvuvDev wants to merge 6 commits into
devfrom
debugger_mcp
Open

UvuvDev wants to merge 6 commits into
devfrom
debugger_mcp

Conversation

@UvuvDev

@UvuvDev UvuvDev commented Sep 23, 2026

Copy link
Copy Markdown
Member

Adds a debugger MCP. I would like some discussion quality wise, as I am still kind of unsure about the way I set this up. I made a quick RPC server that connects to the MCP, so we are going like this:

Agent -> MCP -> RPC Server -> Debugger

The reason for this is that the bundled MCP is compiled into the core of Binary Ninja. Making a custom build of the debugger or not including the debugger would then crash Binary Ninja. So the way I see it, there is 2 possible solutions:

  1. Bundle the debugger MCP into the current MCP server, and make it so it can soft fail if there is no connection back. This is why I abstracted it behind a server: it not being present is a network failure. Custom user commands can hide behind a "User commands" request, which is not ideal, but does work. Core debugger commands are compiled into the MCP. If someone removes the functionality for that command (for whatever reason), it will also similarly soft fail.
  2. Make an independent MCP server for the debugger. this would mean we then have 2 MCPs, which may be confusing. And once we have to integrate the debugger into the core as planned, we will have to break some peoples workflow most likely, since we would have to unify the two MCPs. I.e. this is the kicking the can down the road solution.

I'm not actually sure which one would be better. Currently, all of my code is written for 1, as it is what I thought of first. Functionality wise it works quite well. I can successfully one shot things on crackmes.one. I am open to restarting this with 2 if we decide it makes more sense.

@UvuvDev UvuvDev self-assigned this Sep 23, 2026
@UvuvDev

UvuvDev commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

One of the other issues I'm considering is when agents call tools/list (which for some reason, 5.5 Luna did 15 times), the more tools we list the more tokens we waste. So I am not sure about how to include certain functionality. At the moment I think we are at about 12,000 tokens per list call. Adding the TTD, GDB reverse, etc would add around 40,000 tokens to that, which I would like not to do.

My best solution I can think of is abstracting the non-core steps (things that aren't step, register read, etc.) behind subcommands, and doing a tree of commands. If it only hits the TTD branch .1% of the time, then we don't need to show it every time. We would have to benchmark this against different workflows to see if this is actually cheaper though, because maybe the AI starts calling tools/list 5x more often or something.

…workaround to not have to statically link Debugger and MCP togetherx
This reverts the 4-commit RPC-over-loopback-socket prototype (rpc_server.py
and its tests). It was always a workaround for not being able to statically
link the debugger plugin's tools into Binary Ninja's MCP server; now that
core exposes a plugin API for registering MCP tools in-process, the RPC
server, its auth token file, and its discovery file are unnecessary.

The reverted commits stay in history for reference; the new implementation
follows in subsequent commits.

This reverts commits 71aed25, 1520176, 6c17725, and c0eb781.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant