11,871
stars
+20
1,299
forks
79
watchers
87
prs
95
issues
6
releases
0
discussions
README
!ghidra_MCP_logo
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 use ghidra-mcp as 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.
1. Run Ghidra
2. Select File - Install Extensions
3. Click the + button
4. Select the ghidra_12.1.4_PUBLIC__GhidraMCP.zip from the downloaded release
5. Restart Ghidra
6. Make sure the GhidraMCPPlugin is enabled in File - Configure - Developer
7. 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:
json
{
"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 --transport streamable-http --mcp-host 127.0.0.1 --mcp-port 8081 --ghidra-server http://127.0.0.1:8080/
Then add http://127.0.0.1:8081/mcp as a remote server in your client.
Example 1: VS Code
Run MCP: Add Server from the Command Palette, or add the following to .vscode/mcp.json in your workspace:
json
{
"servers": {
"ghidra": {
"type": "stdio",
"command": "uvx",
"args": [
"--from",
"git+https://github.com/LaurieWired/GhidraMCP",
"ghidra-mcp",
"--ghidra-server",
"http://127.0.0.1:8080/"
]
}
}
}
Example 2: Claude Code
Run the following command:
claude mcp add ghidra -- uvx --from git+https://github.com/LaurieWired/GhidraMCP ghidra-mcp --ghidra-server http://127.0.0.1:8080/
Headless (no Ghidra GUI)
ghidra-mcp can also import and analyze a binary itself using PyGhidra, with no Ghidra GUI running. This needs Python 3.10–3.13, the GhidraMCP extension installed in Ghidra (or --extension-jar /path/to/GhidraMCP.jar), and GHITop issues
#54GhidraMCP installation issues14 comments · 2025-05-30#27GhidraMCP's decompilation output differs from the Ghidra UI10 comments · 2025-04-04#165[feature] UV/UVX deployement to help maintain and install the client as native mcp7 comments · 2026-06-17#88unable to import the MCP zip7 comments · 2025-09-03#83GhidraMCP not working in Ghidra 11.4.1?7 comments · 2025-08-22#79Request failed: HTTPConnectionPool(host='127.0.0.1', port=8080): Read timed out. (read timeout=5)6 comments · 2025-08-04#49Error: MCP error -32000: Connection closed5 comments · 2025-05-13#140Security Advisory: Prompt Injection via Malicious Binaries in Decompiled Output4 comments · 2026-03-25
Latest release
GhidraMCP 2.0 2.0 2026-10-10- Update to latest ghidra 12.1.4 - Remove need for python bridging - Allow headless mode - Fix and update tools