Binary Ninja MCP is a Binary Ninja plugin that includes an MCP server and bridge, designed to seamlessly integrate Binary Ninja's binary analysis capabilities with the LLM/MCP clients commonly used by users.
Purpose: This tool is used to enhance reverse engineering workflows through AI assistance, enabling real-time integration between Binary Ninja and MCP clients. It supports all MCP clients (such as Cline, Claude desktop, Roo Code, etc.), can open multiple binaries, and automatically switches the active target. An official demo video is provided showing the use of this extension to solve a CTF challenge.
Main capabilities: The repository contains two independent components:
- Binary Ninja plugin: provides an MCP server that exposes Binary Ninja's capabilities through HTTP endpoints and can be used with any client that implements the MCP protocol.
- MCP bridge: connects the MCP clients commonly used by users to the Binary Ninja MCP server.
Supported HTTP endpoints include:
- /allStrings: returns all strings at once.
- /formatValue?address=<addr>&text=<value>&size=<n>: converts and sets a comment at the specified address.
- /getXrefsTo?address=<addr>: gets cross-references to an address (code + data).
- /getDataDecl?name=<symbol>|address=<addr>&length=<n>: returns JSON of the declarative string and hex dump for a data symbol or address.
- /hexdump?address=<addr>&length=<n>: address-aligned text hex dump.
- /hexdumpByName?name=<symbol>&length=<n>: text hex dump by symbol name.
- /makeFunctionAt?address=<addr>&platform=<name|default>: creates a function at an address (idempotent).
- /platforms: lists all available platform names.
- /binaries or /views: lists hosted/open binaries and their ID and active flags.
- /selectBinary?view=<id|filename>: selects the active binary for subsequent operations.
- /data?offset=<n>&limit=<m>&length=<n>: defined data items with preview.
- /getXrefsToEnum?name=<enum>: gets enum usage by matching member constants.
- /getXrefsToField?struct=<name>&field=<name>: gets cross-references to a struct field.
- /getXrefsToType?name=<type>: gets cross-references/usages related to a struct/type name.
- /getTypeInfo?name=<type>: resolves a type and returns its declaration and detailed information.
- /getXrefsToUnion?name=<union>: union cross-references/usages.
- /getStackFrameVars?name=<function>|address=<addr>: gets stack frame variable information for a function.
- /getCallers?identifiers=<name|addr>[,...]: returns a caller summary for one or more identifiers.
- /getCallees?identifiers=<name|addr>[,...]: returns a callee summary.
- /localTypes?offset=<n>&limit=<m>: lists local types.
- /strings?offset=<n>&limit=<m>: paginated strings.
- /strings/filter?offset=<n>&limit=<m>&filter=<substr>: filters strings.
- /searchTypes?query=<substr>&offset=<n>&limit=<m>: searches local types by substring.
- /patch or /patchBytes?address=<addr>&data=<hex>&save_to_file=<bool>: patches raw bytes at an address.
- /renameVariables: batch renames local variables in a function.
Usage:
- First install an MCP client (clients that support automatic setupincluding Cline, Claude desktop, Roo Code, etc.), for automatic configuration.
- Install the extension through the Binary Ninja plugin manager (Plugins > Manage Plugins) or manually. For manual installation, copy the repository into the Binary Ninja plugins folder.
- Optional: manually set up the MCP client. It is recommended to use the official npm package for setup. For other MCP clients, the Python bridge can be used directly. Note to replace /ABSOLUTE/PATH/TO with the actual absolute path of the project directory, and use the Python interpreter of the virtual environment.
- Open Binary Ninja and load the binary file.
- Click the button displayed in the lower left corner.
- Start using it through the MCP client, and you can prompt the LLM with questions about the currently open binary file.
Use cases:
- Malware analysis
- CTF challenges
- AI assistance in reverse engineering workflows
Limitations: Information about fees, pricing, platform compatibility, performance guarantees, etc. is not currently provided.