Binary Ninja MCP Server

MIT License
  • Linux
  • Apple

Integrations

  • Supports running the Binary Ninja MCP Server on Linux, with specific paths for plugin installation in the Linux environment.

  • Supports running the Binary Ninja MCP Server on macOS, with specific paths for plugin installation in the macOS environment.

  • Provides a Python module interface for the Binary Ninja MCP Server, allowing it to be run as a Python script.

二进制忍者 MCP 服务器

用于 Binary Ninja 交互和自动化的模型上下文协议服务器。该服务器提供通过大型语言模型与 Binary Ninja 交互的工具。

概述

Binary Ninja MCP 服务器是一个插件和服务器实现,允许大型语言模型通过模型上下文协议 (MCP) 与 Binary Ninja 交互。它提供以下功能:

  • 获取函数的汇编代码
  • 获取函数的反编译代码(HLIL)
  • 重命名函数和变量
  • 添加评论

安装

使用 uv(推荐)

使用uv时无需特殊安装。我们将使用uvx直接运行binja_mcp

使用 PIP

或者,您可以通过 pip 安装binja-mcp

pip install binja-mcp

安装后,您可以使用以下命令将其作为脚本运行:

python -m binja_mcp

二进制忍者插件安装

克隆此存储库或将克隆的存储库链接到 Binary Ninja 的插件目录:

  • Linux: ~/.binaryninja/plugins/
  • macOS: ~/Library/Application Support/Binary Ninja/plugins/
  • Windows: %APPDATA%\Binary Ninja\plugins\

配置

与 Claude Desktop/Cursor 一起使用

将其添加到您的claude_desktop_config.json或 Cursor MCP 服务器:

"mcpServers": { "binja": { "command": "uvx", "args": [ "-n", "mcp-server-binja" ] } }
"mcpServers": { "binja": { "command": "python", "args": [ "-m", "mcp_server_binja" ] } }

用法

  1. 打开 Binary Ninja 并加载二进制文件
  2. 从工具菜单或使用键盘快捷键启动 MCP 服务器
  3. 使用 Claude Desktop、Cursor 或任何您喜欢的 MCP 客户端与二进制文件进行交互

可用命令

以下命令可通过 MCP 接口使用:

  • binja_get_function_assembly :获取指定函数的汇编代码
  • binja_get_function_decompiled :获取指定函数的反编译代码
  • binja_get_global_variable :获取有关全局变量的信息
  • binja_get_current_function_assembly :获取当前函数的汇编
  • binja_get_current_function_decompiled :获取当前函数的反编译代码

发展

如果您正在进行本地开发,则有两种方法可以测试您的更改:

  1. 运行 MCP 检查器来测试您的更改:
npx @modelcontextprotocol/inspector uvx binja_mcp
  1. 通过将以下内容添加到claude_desktop_config.json来使用 Claude 桌面应用程序进行测试:
{ "mcpServers": { "binja": { "command": "uv", "args": [ "--directory", "/<path to mcp-server-binja>/src", "run", "mcp-server-binja" ] } } }

执照

该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。

-
security - not tested
A
license - permissive license
-
quality - not tested

模型上下文协议服务器使大型语言模型能够与二进制忍者交互,以执行逆向工程任务,例如查看汇编代码、反编译代码、重命名函数和添加注释。

  1. Overview
    1. Installation
      1. Using uv (recommended)
      2. Using PIP
      3. Binary Ninja Plugin Installation
    2. Configuration
      1. Usage with Claude Desktop/Cursor
    3. Usage
      1. Available Commands
        1. Development
          1. License
            ID: 7q8rq07sbh