AI Skill Hub 强烈推荐:Ghidra逆向工程MCP服务器 是一款优质的MCP工具。已获得 2.0k 颗 GitHub Star,AI 综合评分 8.5 分,在同类工具中表现稳健。如果你正在寻找可靠的MCP工具解决方案,这是一个值得深入了解的选择。
基于Ghidra的开源MCP工具集,提供200+个AI驱动的逆向工程工具和GUI插件。整合先进的二进制分析能力与AI能力,适合安全研究员、逆向工程师和恶意软件分析人员进行自动化代码分析和漏洞挖掘。
Ghidra逆向工程MCP服务器 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
基于Ghidra的开源MCP工具集,提供200+个AI驱动的逆向工程工具和GUI插件。整合先进的二进制分析能力与AI能力,适合安全研究员、逆向工程师和恶意软件分析人员进行自动化代码分析和漏洞挖掘。
Ghidra逆向工程MCP服务器 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/bethington/ghidra-mcp
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"ghidra----mcp---": {
"command": "npx",
"args": ["-y", "ghidra-mcp"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 Ghidra逆向工程MCP服务器 执行以下任务... Claude: [自动调用 Ghidra逆向工程MCP服务器 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"ghidra____mcp___": {
"command": "npx",
"args": ["-y", "ghidra-mcp"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
If you find this useful, please ⭐ star the repo — it helps others discover it! If Ghidra MCP saves you time, consider sponsoring the project. One-time and recurring support both help fund compatibility updates, production hardening, docs, and new tooling.
A production-ready Model Context Protocol (MCP) server that bridges Ghidra's powerful reverse engineering capabilities with modern AI tools and automation frameworks. 244 MCP tools, battle-tested AI workflows, and the most comprehensive Ghidra-MCP integration available — now including P-code emulation, live debugger integration, and PCode-graph data flow analysis.
Shared Ghidra Server users: Ghidra 12.1 clients require a Ghidra Server at 12.1, 12.0.5, or a newer compatible version. Upgrade the server before using this plugin from a 12.1 client. Ghidra 12.1 ships Jython as an optional extension. Java scripts work by default, but.pyscripts inghidra_scripts/require installing the Jython extension from File > Install Extensions and restarting Ghidra.
Cause: Ghidra JARs not installed in local Maven repository.
Solution: ```text
Ghidra JARs must be installed into your local Maven repository (~/.m2/repository) before compilation. This is a one-time setup per machine, and again when your Ghidra version changes. -Deploy now installs these automatically by default.
The tool enforces version consistency between: - pom.xml (ghidra.version) - --ghidra-path version segment (e.g., ghidra_12.1_PUBLIC)
If these do not match, deployment fails fast with a clear error.
Recommended for all platforms: usepython -m tools.setupdirectly.ensure-prereqsinstalls runtime Python requirements plus the Ghidra JARs needed in the local Maven repository.deploycopies the build output, installs the user-profile extension, and patches Ghidra user config.
1. Clone the repository:
git clone https://github.com/bethington/ghidra-mcp.git
cd ghidra-mcp
2. Recommended: run environment preflight first:
python -m tools.setup preflight --ghidra-path "F:\ghidra_12.1_PUBLIC"
3. Build and deploy to Ghidra:
python -m tools.setup ensure-prereqs --ghidra-path "F:\ghidra_12.1_PUBLIC"
python -m tools.setup build
python -m tools.setup deploy --ghidra-path "F:\ghidra_12.1_PUBLIC"
deploy saves/closes an already-running matching Ghidra instance when needed, installs the extension, starts Ghidra, waits for MCP health, and runs schema smoke checks.
4. Optional strict/manual mode (advanced):
# Skip automatic prerequisite setup
python -m tools.setup build
python -m tools.setup deploy --ghidra-path "F:\ghidra_12.1_PUBLIC"
5. Show command help:
python -m tools.setup --help
6. Optional build-only mode (advanced/troubleshooting):
python -m tools.setup build
Supported build path: python -m tools.setup build uses Maven under the hood and is the canonical workflow used by the repo tasks and docs.
# Manual Maven build (requires Ghidra deps already installed in local .m2)
mvn clean package assembly:single -DskipTests
# Secondary/manual Gradle build path only (not used by tools.setup or VS Code tasks)
GHIDRA_INSTALL_DIR=/path/to/ghidra gradle buildExtension
1. Clone the repository:
git clone https://github.com/bethington/ghidra-mcp.git
cd ghidra-mcp
2. Install system prerequisites (if not already installed):
sudo apt update && sudo apt install -y openjdk-21-jdk maven python3 python3-pip curl jq unzip
3. Run environment preflight:
python -m tools.setup preflight --ghidra-path ~/ghidra_12.1_PUBLIC
4. Build and deploy to Ghidra (single command):
python -m tools.setup ensure-prereqs --ghidra-path ~/ghidra_12.1_PUBLIC
python -m tools.setup build
python -m tools.setup deploy --ghidra-path ~/ghidra_12.1_PUBLIC
This will: - Install Ghidra JAR dependencies into your local ~/.m2/repository - Build GhidraMCP-<version>.zip with Maven - Extract the extension to ~/.config/ghidra/ghidra_<version>_PUBLIC/Extensions/ - Update preferences with LastExtensionImportDirectory - Install Python requirements
5. Optional: setup only Maven dependencies:
python -m tools.setup install-ghidra-deps --ghidra-path ~/ghidra_12.1_PUBLIC
6. Show command help:
python -m tools.setup --help
Linux paths: The extension is installed to$HOME/.config/ghidra/ghidra_<version>_PUBLIC/Extensions/GhidraMCP/. Ghidra config files are in$HOME/.config/ghidra/ghidra_<version>_PUBLIC/.
1. Install prerequisites:
brew install openjdk@21 maven python ghidra
2. Clone the repository:
git clone https://github.com/bethington/ghidra-mcp.git
cd ghidra-mcp
3. Install Ghidra JARs into local Maven:
python -m tools.setup install-ghidra-deps \
--ghidra-path /opt/homebrew/opt/ghidra/libexec
4. Build and deploy:
python -m tools.setup ensure-prereqs \
--ghidra-path /opt/homebrew/opt/ghidra/libexec
python -m tools.setup build
python -m tools.setup deploy \
--ghidra-path /opt/homebrew/opt/ghidra/libexec
The extension is installed to ~/Library/ghidra/ghidra_12.1_PUBLIC/Extensions/GhidraMCP/.
Note: --ghidra-version is required when using the Homebrew path because the path contains no version string.
5. Start Ghidra and enable the plugin:
/opt/homebrew/opt/ghidra/libexec/ghidraRun
In the main project window: Tools > GhidraMCP > Start MCP Server
6. Configure Cursor/Claude MCP (~/.cursor/mcp.json):
{
"mcpServers": {
"ghidra": {
"command": "uv",
"args": ["run", "--script", "/path/to/ghidra-mcp/bridge_mcp_ghidra.py"]
}
}
}
@Pandoriaantje maintains community AUR packages:
ghidra-mcp-git — tracks mainghidra-mcp — tracks tagged releasesInstall with your AUR helper of choice, e.g.:
yay -S ghidra-mcp # or ghidra-mcp-git
Cause: JAR file in wrong location.
Solution: 1. Manual install location: ~/.ghidra/ghidra_12.1_PUBLIC/Extensions/GhidraMCP/lib/GhidraMCP.jar 2. Or use: File > Install Extensions > Add and select the ZIP file 3. Ensure JAR/ZIP was built for your Ghidra version
```bash
python -m tools.setup ensure-prereqs --ghidra-path "C:\ghidra_12.1_PUBLIC" python -m tools.setup build python -m tools.setup deploy --ghidra-path "C:\ghidra_12.1_PUBLIC"
python -m tools.setup preflight --strict --ghidra-path "C:\ghidra_12.1_PUBLIC"
GhidraMCP includes a headless server mode for automated analysis without the Ghidra GUI.
```bash
docker-compose up -d ghidra-mcp
curl "http://localhost:8089/decompile_function?address=0x401000"
#### Option 1: Stdio Transport (Recommended for AI tools)
python bridge_mcp_ghidra.py
#### Option 2: Streamable HTTP Transport (Recommended for web/HTTP clients)
python bridge_mcp_ghidra.py --transport streamable-http --mcp-host 127.0.0.1 --mcp-port 8081
MCP client config for the HTTP transport (add to your client's MCP config file):
{
"mcpServers": {
"ghidra-mcp-http": {
"url": "http://127.0.0.1:8081/mcp"
}
}
}
#### Option 3: SSE Transport (Deprecated — use streamable-http instead)
python bridge_mcp_ghidra.py --transport sse --mcp-host 127.0.0.1 --mcp-port 8081
| Flag | Default | Description |
|---|---|---|
--transport | stdio | stdio (AI tools), streamable-http (web clients), sse (deprecated) |
--mcp-host | 127.0.0.1 | Bind host for HTTP transports |
--mcp-port | — | Port for HTTP transports |
--lazy | off | Load only the default tool groups on connect. Faster startup, but MCP clients that don't support tools/list_changed will see an incomplete tool list. Not recommended for Claude Code. |
--no-lazy | (default) | Load all tool groups immediately on connect. Required for most AI clients. |
--default-groups | listing,function,program | Comma-separated groups loaded on connect when --lazy is set. |
#### Optional: Start the standalone debugger server
python -m pip install -r requirements-debugger.txt
python -m debugger
The debugger server listens on http://127.0.0.1:8099/ by default and is required for the debugger_* proxy tools exposed by the MCP bridge.
Debugger server flags:
| Flag | Default | Description |
|---|---|---|
--port | 8099 | HTTP server port |
--host | 127.0.0.1 | Bind address (0.0.0.0 to expose on LAN) |
--exports-dir | — | Path to a dll_exports/ directory for ordinal-to-name resolution |
--log-level | INFO | DEBUG, INFO, WARNING, or ERROR |
Set GHIDRA_DEBUGGER_URL in .env if you change the default port or host so the bridge can find it.
#### In Ghidra 1. Start Ghidra and open a CodeBrowser window 2. In CodeBrowser, enable the plugin via File > Configure > Configure All Plugins > GhidraMCP 3. Optional: configure custom port via CodeBrowser > Edit > Tool Options > GhidraMCP HTTP Server 4. Start the server via Tools > GhidraMCP > Start MCP Server 5. The server runs on http://127.0.0.1:8089/ by default
#### Verify It's Working ```bash
export GHIDRA_MCP_AUTH_TOKEN=$(openssl rand -hex 32)
export GHIDRA_MCP_ALLOW_SCRIPTS=1 # only if your workflow needs it
export GHIDRA_MCP_FILE_ROOT=/srv/ghidra/inputs
java -jar GhidraMCPHeadless.jar --bind 0.0.0.0 --port 8089
git checkout -b feature/amazing-feature)mvn clean package assembly:single -DskipTests or GHIDRA_INSTALL_DIR=/path/to/ghidra gradle buildExtension)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)Environment variables for Docker: - GHIDRA_MCP_PORT - Server port (default: 8089) - GHIDRA_MCP_BIND_ADDRESS - Bind address (default: 0.0.0.0 in Docker) - JAVA_OPTS - JVM options (default: -Xmx4g -XX:+UseG1GC)
python -m tools.setup bump-version --new X.Y.Z ```
The authoritative build system today is Maven. tools.setup, the VS Code tasks, and the documented deploy flow all build through pom.xml and write artifacts to target/. build.gradle remains in the repo as a manual fallback for direct Ghidra/Gradle users, but it is not the primary path.
| Command | What it does |
|---|---|
ensure-prereqs | Install Python deps + Ghidra Maven JARs in one shot. Start here on a new machine. |
preflight | Validate Python, build tool, Ghidra path, and JAR availability without making changes. Add --strict to also check network reachability. |
build | Build the plugin JAR and extension ZIP via Maven (or Gradle when TOOLS_SETUP_BACKEND=gradle). |
deploy | Copy the built extension into the Ghidra profile and patch FrontEndTool.xml for auto-activation. |
start-ghidra | Launch the configured Ghidra installation. |
clean | Remove Maven/Gradle build outputs (target/, build/). |
clean-all | Remove build outputs plus local cache artifacts (.m2 Ghidra JARs, etc.). |
install-ghidra-deps | Install only the Ghidra JARs into ~/.m2. Useful when the build environment changes. |
install-python-deps | Install only the Python requirements files. |
run-tests | Run the Java offline test suite (no live Ghidra needed). |
verify-version | Check that version strings are consistent across pom.xml, CHANGELOG.md, and README.md. |
bump-version --new X.Y.Z | Atomically update all version references. Pass --tag to create a git tag. |
Common flags accepted by most commands:
| Flag | Description |
|---|---|
--ghidra-path PATH | Ghidra installation directory. Defaults to GHIDRA_PATH from .env. |
--dry-run | Print actions without executing them. |
--force | Reinstall Ghidra JARs even if already present (install-ghidra-deps, ensure-prereqs). |
--with-debugger | Force-install debugger Python requirements (Windows only). |
--use-debugger-toggle | Read INSTALL_DEBUGGER_DEPS from .env to decide whether to install debugger deps. |
--test TIER | (deploy only) Opt into live deploy regression tiers such as release or debugger-live. |
--strict | (preflight only) Also check network reachability for Maven Central and PyPI. |
Deploy test tiers are opt-in because benchmark tiers can import/reset Benchmark.dll and BenchmarkDebug.exe in the active Ghidra project. Use --test release before cutting releases, or set GHIDRA_MCP_DEPLOY_TESTS=release in a local .env when you want every deploy on your machine to run the live benchmark regression. See Testing and Release Regression.
```text
```bash
| Endpoint | Method | Description |
|---|---|---|
/load_program | POST | Load binary file for analysis |
/run_analysis | POST | Run Ghidra auto-analysis |
/list_functions | GET | List all discovered functions |
/list_exports | GET | List exported symbols |
/list_imports | GET | List imported symbols |
/decompile_function | GET | Decompile function to C code |
/create_function | POST | Create function at address |
/get_metadata | GET | Get program metadata |
/create_project | POST | Create a Ghidra project |
/list_analyzers | GET | List available analyzers |
/server/status | GET | Check Ghidra Server connection |
Compatibility note: MCP tool names are normalized for GitHub Copilot CLI and CAPI validation. Exposed tool names use lowercase letters, digits, underscores, and hyphens only; nested HTTP paths such as/debugger/statusare advertised as names likedebugger_status_2when needed to avoid collisions with static bridge tools.
Cause: The standalone debugger server uses optional Windows-only Python dependencies that are not installed by the base requirements file.
Solution:
python -m pip install -r requirements-debugger.txt
python -m debugger
If you have both a global Python and a project venv, make sure you install into and run from the same interpreter.
python -m tools.setup ensure-prereqs --ghidra-path "C:\ghidra_12.1_PUBLIC" python -m tools.setup build python -m tools.setup deploy --ghidra-path "C:\ghidra_12.1_PUBLIC"
If you see a version mismatch error, align both values: 1. pom.xml → ghidra.version 2. --ghidra-path version segment (ghidra_X.Y.Z_PUBLIC)
Then rerun:
python -m tools.setup preflight --ghidra-path "C:\ghidra_12.1_PUBLIC"
```text
业界领先的AI赋能逆向工程平台,200+工具覆盖面广,Java实现稳定可靠,2k+ Stars验证其价值,活跃维护中。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。
总体来看,Ghidra逆向工程MCP服务器 是一款质量优秀的MCP工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | ghidra-mcp |
| 原始描述 | 开源MCP工具:Ghidra MCP Server — 200+ MCP tools for AI-powered reverse engineering. GUI plugi。⭐2.0k · Java |
| Topics | 逆向工程二进制分析Ghidra扩展安全研究AI工具集 |
| GitHub | https://github.com/bethington/ghidra-mcp |
| License | Apache-2.0 |
| 语言 | Java |
收录时间:2026-05-22 · 更新时间:2026-05-22 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端