LG

lauriewired/ghidramcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

1.2万 stars 1246 forks 质量 86 趋势 78Apache-2.0

Ghidra 的 MCP 服务器

概览

ghidraMCP 是一个模型上下文协议服务器,允许大型语言模型自主逆向工程应用。它向 MCP 客户端展示了 Ghidra 核心功能的众多工具。 https://github.com/user-attachments/assets/36080514-f227-44bd-af84-78e29ee1d7f9 - 在 Ghidra 中反编译和分析二进制文件 - 自动重命名方法和数据 - 列出方法、类、导入和导出 首先,从该仓库下载最新版本。该仓库包含 Ghidra 插件和 Python MCP 客户端。然后,你可以直接将插件导入 Ghidra。 1. 运行Ghidra 2.选择文件 -> 安装扩展 3.点击+键 4.从下载的版本中选择GhidraMCP-1-2.zip(或您选择的版本) 5.重启Ghidra 6。确保文件 -> 配置 -> 开发者7中启用了GhidraMCPPlugin。可选:在Ghidra中配置端口,编辑 -> 工具选项 -> GhidraMCP HTTP Server https://github.

概述(AI 翻译)

ghidraMCP 是一个模型上下文协议服务器,允许大型语言模型自主逆向工程应用。它向 MCP 客户端展示了 Ghidra 核心功能的众多工具。

https://github.com/user-attachments/assets/36080514-f227-44bd-af84-78e29ee1d7f9

特征

MCP 服务器 + Ghidra 插件

  • 在 Ghidra 中反编译和分析二进制
  • 自动重命名方法和数据
  • 列表方法、类、导入和导出

安装

先修条件

  • 安装Ghidra 12.1.4
  • 安装 uv(或带有 pip install git+https://github.com/LaurieWired/GhidraMCP 的 Python 3.10+,然后使用 ghidra-mcp 作为下面的命令)

基德拉

首先,从该仓库下载最新版本。该仓库包含 Ghidra 插件和 Python MCP 客户端。然后,你可以直接将插件导入 Ghidra。

  1. 奔跑基德拉
  2. 选择 File -> Install Extensions
  3. 点击+按钮
  4. 从下载版本中选择ghidra_12.1.4_PUBLIC_ _GhidraMCP.zip
  5. 重启基德拉
  6. 确保GhidraMCPPlugin在File-> Configure ->Developer中启用
  7. 可选:在基德拉中配置端口为Edit -> Tool Options -> GhidraMCP HTTP Server

视频安装指南:

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

ghidraMCP

ghidraMCP is an Model Context Protocol server for allowing LLMs to autonomously reverse engineer applications. It exposes numerous tools from core Ghidra functionality to MCP clients.

https://github.com/user-attachments/assets/36080514-f227-44bd-af84-78e29ee1d7f9

Features

MCP Server + Ghidra Plugin

  • Decompile and analyze binaries in Ghidra
  • Automatically rename methods and data
  • List methods, classes, imports, and exports

Installation

Prerequisites

  • Install Ghidra 12.1.4
  • Install uv (or Python 3.10+ with pip install git+https://github.com/LaurieWired/GhidraMCP, then use ghidra-mcp as the command below)

Ghidra

First, download the latest release from this repository. This contains the Ghidra plugin and Python MCP client. Then, you can directly import the plugin into Ghidra.

  1. Run Ghidra
  2. Select File -> Install Extensions
  3. Click the + button
  4. Select the ghidra_12.1.4_PUBLIC__GhidraMCP.zip from the downloaded release
  5. Restart Ghidra
  6. Make sure the GhidraMCPPlugin is enabled in File -> Configure -> Developer
  7. Optional: Configure the port in Ghidra with Edit -> Tool Options -> GhidraMCP HTTP Server

Video Installation Guide:

https://github.com/user-attachments/assets/75f0c176-6da1-48dc-ad96-c182eb4648c3

MCP Clients

Theoretically, any MCP client should work with ghidraMCP. Most clients accept a JSON config like the following:

{
  "mcpServers": {
    "ghidra": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/LaurieWired/GhidraMCP",
        "ghidra-mcp",
        "--ghidra-server",
        "http://127.0.0.1:8080/"
      ]
    }
  }
}

The server IP and port are configurable and should be set to point to the target Ghidra instance. If not set, both will default to localhost:8080.

For clients that connect to a URL instead of launching a command, first run the MCP server yourself:

在 GitHub 查看完整 README

安装

uvx --from git+https://github.com/LaurieWired/GhidraMCP ghidra-mcp --ghidra-server http://127.0.0.1:8080/
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "ghidra": { "command": "uvx", "args": [ "--from", "git+https://github.com/LaurieWired/GhidraMCP", "ghidra-mcp", "--ghidra-server", "http://127.0.0.1:8080/" ] } } }