
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。
- 奔跑基德拉
- 选择
File->Install Extensions - 点击
+按钮 - 从下载版本中选择
ghidra_12.1.4_PUBLIC_ _GhidraMCP.zip - 重启基德拉
- 确保GhidraMCPPlugin在
File->Configure->Developer中启用 - 可选:在基德拉中配置端口为
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 useghidra-mcpas 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.
- Run Ghidra
- Select
File->Install Extensions - Click the
+button - Select the
ghidra_12.1.4_PUBLIC__GhidraMCP.zipfrom the downloaded release - Restart Ghidra
- Make sure the GhidraMCPPlugin is enabled in
File->Configure->Developer - 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:
安装
uvx --from git+https://github.com/LaurieWired/GhidraMCP ghidra-mcp --ghidra-server http://127.0.0.1:8080/配置
{
"mcpServers": {
"ghidra": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/LaurieWired/GhidraMCP",
"ghidra-mcp",
"--ghidra-server",
"http://127.0.0.1:8080/"
]
}
}
}