binaryninja-mcp logo

binaryninja-mcp

by MCPPhalanx

The MCP (Model Context Protocol) Server for Binary Ninja allows external tools to interact with Binary Ninja for tasks like renaming symbols and retrieving code snippets. It supports both UI plugin and headless modes, providing a versatile interface for reverse engineering workflows.

View on GitHub

Last updated: N/A

What is binaryninja-mcp?

The MCP Server for Binary Ninja is a tool that enables communication between Binary Ninja and external clients using the Model Context Protocol. It provides a set of tools and resources that allow clients to query and modify information within Binary Ninja, facilitating automated analysis and interaction.

How to use binaryninja-mcp?

The server can be run either as a Binary Ninja UI plugin or in headless mode. As a plugin, it starts automatically when a file is loaded. In headless mode, it's launched via the command line, specifying the files to be analyzed. Clients can connect using stdio relay or SSE endpoints, using tools like Claude Desktop or Cherry Studio. Configuration details are provided for setting up both server and client connections.

Key features of binaryninja-mcp

  • Provides remote access to Binary Ninja's analysis capabilities

  • Supports multiple client connection methods (stdio, SSE)

  • Offers a range of tools for code analysis and modification (rename symbol, get pseudo-C/Rust code, disassembly, etc.)

  • Exposes resources like imports, exports, segments, and strings via URIs

  • Supports both UI plugin and headless operation

Use cases of binaryninja-mcp

  • Automated reverse engineering workflows

  • Integration with external analysis tools

  • Remote code analysis and debugging

  • Scripted interaction with Binary Ninja

  • Collaborative reverse engineering

FAQ from binaryninja-mcp

How do I install the MCP server?

You can install it either as a Binary Ninja UI plugin via the plugin manager or run it in headless mode using the command line.

How do I configure the client to connect to the server?

You can configure the client to connect via stdio transport or SSE endpoint. Refer to the README for specific configuration examples for Claude Desktop and Cherry Studio.

What tools are available through the MCP server?

The server provides tools for renaming symbols, getting pseudo-C/Rust code, retrieving IL, disassembling code, updating analysis, and extracting various information like imports, exports, segments, and strings.

How do I access resources like imports and exports?

MCP Resources can be accessed via URIs in the format: binaryninja://{filename}/{resource_type}. The README lists the available resource types.

What is the default port for the MCP server?

The default port is 7000. You can use the --port flag to specify a different port.