bethington/ghidra-mcp
Ghidra MCP Server — 200+ MCP tools for AI-powered reverse engineering. GUI plugin + headless server, lazy tool loading, convention enforcement, batch operations, Ghidra Server integration, and Docker deployment.
3,176 ★83 forksPythonUpdated 2d ago
What you need to know
Production-ready MCP server bridging Ghidra reverse engineering to AI tools — 251+ MCP tools with full write access (renaming, typing, commenting, structures, script execution), plus P-code emulation, live debugger integration, cross-binary documentation transfer, and Ghidra Server/VCS support. Derived from LaurieWired/GhidraMCP.
Install
git clone https://github.com/bethington/ghidra-mcp.git && cd ghidra-mcp python -m tools.setup ensure-prereqs --ghidra-path "<ghidra-path>" python -m tools.setup build && python -m tools.setup deploy --ghidra-path "<ghidra-path>" Prerequisites: Java 21 LTS, Apache Maven 3.9+, Ghidra 12.1.2, Python 3.10+ with uv (recommended)
Usage
- •In Ghidra CodeBrowser: File > Configure > Configure All Plugins > GhidraMCP, then Tools > GhidraMCP > Start MCP Server (HTTP on http://127.0.0.1:8089/)
- •MCP client config: {"command":"uv","args":["run","--directory","/path/to/ghidra-mcp","bridge-mcp-ghidra"]}
- •Streamable HTTP: uv run bridge-mcp-ghidra --transport streamable-http --mcp-host 127.0.0.1 --mcp-port 8081
- •Verify: curl http://127.0.0.1:8089/check_connection
Key features
- ✓251 MCP tools (3x most competing implementations) covering every aspect of binary analysis with full write access
- ✓P-code emulation (EmulatorHelper) incl. brute-force API hash resolution; live debugger integration via Ghidra TraceRmi (WinDbg on Windows PE, gdb/lldb otherwise)
- ✓Cross-binary documentation transfer via SHA-256 function hash matching; archive via BSim Postgres
- ✓Convention enforcement in the tool layer (auto-fix / warn / reject tiers) plus analyze_function_completeness 0-100 scoring
- ✓Headless server (Docker-ready) and GUI modes; Ghidra Server integration with version control and checkin/checkout
- ✓Batch operations (93% API call reduction), atomic transactions, tool-group lazy loading / search_tools discovery
Best for
Reverse engineers who want AI-driven function documentation, data-type discovery, cross-version matching, and live debugging on real binaries
Caveats
- ⚠Script endpoints (/run_script_inline, /run_ghidra_script) default OFF since v5.4.1 — must set GHIDRA_MCP_ALLOW_SCRIPTS=1
- ⚠Designed for localhost-only; server refuses non-loopback bind without GHIDRA_MCP_AUTH_TOKEN; set GHIDRA_MCP_FILE_ROOT to prevent path traversal
- ⚠SSE transport is deprecated (use streamable-http)
- ⚠Ghidra 12.1.2 ships Jython as an optional extension — .py scripts in ghidra_scripts/ require installing the Jython extension; prefer Java scripts or PyGhidra
- ⚠Debugger Python deps are optional Windows-only (uv sync --group debugger); standalone debugger server needed for debugger_* proxy tools
- ⚠Ghidra 12.1.2 clients require a compatible Ghidra Server (12.1, 12.0.5, or newer)
Platforms: Windows · Linux · macOS (Homebrew) · Arch Linux (AUR)Clients: Cursor · Claude · Autohand Code · Any MCP client
Documentation ↗Reviewed 2026-08-07
Topics
aibinary-analysisghidraghidra-extensionjavamcpmcp-servermodel-context-protocolpythonreverse-engineeringstatic-analysis
- Stars
- 3,176★
- Forks
- 83
- Language
- Python
- License
- Apache-2.0
- Created
- 2025-08-30
- Last push
- 2026-08-04