GhidraMCP
GhidraMCP is a Model Context Protocol server that exposes Ghidra tools to MCP clients, enabling LLMs to autonomously decompile and analyze binaries, rename methods and data, and list methods, classes, imports, and exports.
Visit LaurieWired/GhidraMCPOverview
GhidraMCP is a Model Context Protocol server and Ghidra plugin that lets LLMs autonomously reverse engineer applications. It exposes numerous tools from core Ghidra functionality to MCP clients.
Key Features
- Decompile and analyze binaries in Ghidra.
- Automatically rename methods and data.
- List methods, classes, imports, and exports.
- Expose core Ghidra functionality as MCP tools.
- Support optional headless analysis without the Ghidra GUI.
Use Cases
- Ask an LLM to decompile a function and explain it in plain language.
- Map functions, imports, strings, and cross-references in a binary.
- Analyze malware samples, old firmware, or your own builds.
- Automatically rename methods and data during reverse engineering.
Getting Started
- Install Ghidra 12.1.4 and uv, or use Python 3.10+ with the package installed.
- Download the latest release, import the extension zip into Ghidra through File > Install Extensions, restart Ghidra, and enable GhidraMCPPlugin.
- Configure an MCP client to launch ghidra-mcp and point it at the Ghidra server, which defaults to localhost:8080.
- For clients that connect to a URL, run the MCP server with streamable HTTP transport and add its MCP endpoint as a remote server.
- For headless analysis, run ghidra-mcp with headless and binary options, using Python 3.10–3.13 and GHIDRA_INSTALL_DIR set to the Ghidra 12.1.4 directory.
Deployment & Requirements
- Ghidra 12.1.4 is required.
- uv is recommended; Python 3.10+ can be used with a pip installation.
- Headless mode requires Python 3.10–3.13, the GhidraMCP extension installed or available as a jar, and GHIDRA_INSTALL_DIR set to the Ghidra 12.1.4 directory.
- The MCP server and Ghidra HTTP server default to localhost:8080 and can be configured.
- On macOS, headless use requires building Ghidra's decompiler once.
Before You Adopt
- License: Apache-2.0. Review its terms before using, modifying, or distributing the project.
- The documented setup explicitly requires Ghidra 12.1.4.
- Headless mode narrows the Python requirement to versions 3.10 through 3.13.
- Headless use on macOS requires an additional decompiler build step.
- When server host and port are not set, they default to localhost:8080.