ghidra-mcp
MCP Bridge: Connects the Ghidra reverse engineering tool with AI agents.
ghidra-mcp is an open-source tool released on February 15, 2026, by the bethington team, a group of security analysts and developers from the United States. It is a unified server based on the Model Context Protocol (MCP), which enables bidirectional communication between Ghidra, a leading open-source reverse engineering framework, and LLM agents. Similar to how GPT models understand context and generate text in the field of text analysis, ghidra-mcp transforms and delivers complex machine code binary data and decompiled control flow graphs into semantic information structures that AI can understand. This tool abstracts Ghidra's more than 250 internal API endpoints and analysis tools into the MCP standard, providing a virtual environment where agents can directly access and read/write to the binary being analyzed.
Existing reverse engineering analysis tools typically operate in a read-only manner, such as executing unidirectional scripts or simply viewing decompiled source code. This forces analysts to manually rename and add comments in the Ghidra UI, which is inefficient, after reviewing AI suggestions. However, ghidra-mcp provides full write access, allowing AI agents to directly modify variable and function identifiers, define new structures and unions, and write comments directly to the entire binary. In particular, the convention enforcement mechanism based on the tool layer, introduced in version 5.0, forces AI agents to adhere to a set of naming rules and type safety criteria, fundamentally solving the problem of inconsistent analysis quality caused by large language models (LLMs) outputting results in different styles.
Security analysts can use this tool to build highly specific and automated static and dynamic analysis pipelines. For example, by running the ghidra-mcp server in a workstation environment and connecting it to AI development environments such as Claude Code or Cursor, agents can perform PCode-graph data flow analysis, tracing intermediate value propagation paths while exploring unidentified functions within a large binary end-to-end. Furthermore, by leveraging the P-code emulation feature supported in the latest version and the TraceRmi architecture for live debugger integration, advanced automation scenarios become a reality, such as safely executing dynamic decryption routines or API hashing algorithms within a sandbox and immediately reflecting the results in the analysis database, which are difficult to identify through static analysis alone.
๐ป System Requirements
0 (No GPU memory required, as it operates based on CPU computation)
No model required; 2GB or less is needed for installing the Ghidra program and plugins.
โก Installation
4-1. Quick Start
# Clone the repository and install macOS environment dependencies
git clone https://github.com/bethington/ghidra-mcp.git && cd ghidra-mcp
brew install openjdk@21 maven python ghidra
4-2. Detailed Installation
# 1. Register Maven dependencies according to the Ghidra installation path (macOS example)
python -m tools.setup install-ghidra-deps --ghidra-path /opt/homebrew/opt/ghidra/libexec
# 2. Pre-check the build environment and install required packages
python -m tools.setup ensure-prereqs --ghidra-path /opt/homebrew/opt/ghidra/libexec
# 3. Build the ghidra-mcp plugin using Maven
python -m tools.setup build
# 4. Deploy the built Zip file to the Ghidra Extension directory
python -m tools.setup deploy --ghidra-path /opt/homebrew/opt/ghidra/libexec
# 5. Install and run dependencies for Standalone Debugger server execution (optional)
python -m pip install -r requirements-debugger.txt
python -m debugger
FAQ
What is ghidra-mcp?
ghidra-mcp is an open-source tool released on February 15, 2026, by the bethington team, a group of security analysts and developers from the United States. It is a unified server based on the Model Context Protocol (MCP), which enables bidirectional communication between Ghidra, a leading open-source reverse engineering framework, and LLM agents. Similar to how GPT models understand context and generate text in the field of text analysis, ghidra-mcp transforms and delivers complex machine code binary data and decompiled control flow graphs into semantic information structures that AI can understand. This tool abstracts Ghidra's more than 250 internal API endpoints and analysis tools into the MCP standard, providing a virtual environment where agents can directly access and read/write to the binary being analyzed. Existing reverse engineering analysis tools typically operate in a read-only manner, such as executing unidirectional scripts or simply viewing decompiled source code. This forces analysts to manually rename and add comments in the Ghidra UI, which is inefficient, after reviewing AI suggestions. However, ghidra-mcp provides full write access, allowing AI agents to directly modify variable and function identifiers, define new structures and unions, and write comments directly to the entire binary. In particular, the convention enforcement mechanism based on the tool layer, introduced in version 5.0, forces AI agents to adhere to a set of naming rules and type safety criteria, fundamentally solving the problem of inconsistent analysis quality caused by large language models (LLMs) outputting results in different styles. Security analysts can use this tool to build highly specific and automated static and dynamic analysis pipelines. For example, by running the ghidra-mcp server in a workstation environment and connecting it to AI development environments such as Claude Code or Cursor, agents can perform PCode-graph data flow analysis, tracing intermediate value propagation paths while exploring unidentified functions within a large binary end-to-end. Furthermore, by leveraging the P-code emulation feature supported in the latest version and the TraceRmi architecture for live debugger integration, advanced automation scenarios become a reality, such as safely executing dynamic decryption routines or API hashing algorithms within a sandbox and immediately reflecting the results in the analysis database, which are difficult to identify through static analysis alone.
When should I use ghidra-mcp?
MCP Bridge: Connects the Ghidra reverse engineering tool with AI agents.
๐ Update Notes
No update notes yet.
๐งช Related Code of Life
No related Code of Life posts yet.