GhidraMCP
MCP server and Ghidra plugin that lets an agent decompile binaries, follow cross-references and rename functions in an open project
- 11,506 ★ on the repository
- Last commit
- Apache-2.0
Extended access
Why this level
- The plugin opens a local HTTP server through which the agent reads decompiled code and program memory in the open project
- Rename and type-change tools modify the Ghidra project itself, so keep a copy before edits
Install
- Works in
Manual install
claude mcp add ghidra -- uvx --from git+https://github.com/LaurieWired/GhidraMCP ghidra-mcp --ghidra-server http://127.0.0.1:8080/Install the plugin from the release archive into Ghidra 12.1.4 and enable it first. Requires uv.
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The plugin opens a local HTTP server through which the agent reads decompiled code and program memory in the open project
- Rename and type-change tools modify the Ghidra project itself, so keep a copy before edits
This is third-party code. Review the repository files before installing.
What it does
GhidraMCP has two parts: a Ghidra plugin that starts a local HTTP server on port 8080 and a Python bridge, ghidra-mcp, that exposes that server as MCP tools. The agent can read program info and list functions, classes, namespaces, segments, imports, exports and strings, or search functions by name. For code analysis it gets decompilation and disassembly by function name or address, cross-references to and from an address, a function's call tree and raw memory reads. The model can also edit the project: rename functions, data and variables, change a function prototype or a local variable type, and leave comments in the decompiler and the disassembly. A headless mode runs through PyGhidra, where the bridge imports and analyzes a binary itself and no Ghidra GUI is needed.
Who it is for. For reverse engineers, malware analysts and developers who dissect binaries in Ghidra and want an agent to take over the routine work.
Good fit when
- You need pseudocode for dozens of functions in a binary and meaningful names assigned to them right away
- You are tracing where a suspicious function is called from and ask the agent to walk the references with get_xrefs_to and get_function_calls
- You want an overview of imports, exports and strings in an unknown executable before a deep dive
- The analysis runs in a script or on a server without a display, and headless mode with ghidra-mcp --headless --binary fits
- You want comments added in the decompiler after the analysis without typing them by hand
Not a fit when
- Ghidra 12.1.4 is not installed: the plugin is built for that version and the bridge does nothing without Ghidra
- You work in IDA Pro, Binary Ninja or another disassembler: the server supports only Ghidra
- The binary is too sensitive to send decompiled code to a cloud model: the pseudocode lands in the agent's context
- The Ghidra project must stay untouched, while the model can rename functions and change types
Example request
Find the function in the open Ghidra project that references the server address string, decompile it and suggest names for the function and its variablesMCP
- Transport
- stdio, http
- Authentication
- not required
Environment variables
GHIDRA_INSTALL_DIR- Path to the Ghidra 12.1.4 directory, needed only for headless mode
Limitations
- The plugin is built for Ghidra 12.1.4 and installs from the release archive through File and Install Extensions; after that Ghidra is restarted and the plugin is enabled in the developer settings.
- The bridge needs uv or Python 3.10 and newer.
- Headless mode needs Python 3.10–3.13, the GhidraMCP extension and the GHIDRA_INSTALL_DIR variable. On macOS Ghidra's decompiler is built once with gradlew buildNatives.
- The author says any MCP client should work in theory, but gives examples only for VS Code and Claude Code.
- No API keys or paid accounts are required.
How to disable. Run claude mcp remove ghidra or delete the ghidra block from the client config. Switch the plugin off in Ghidra under File, Configure and Developer, and remove the extension under File and Install Extensions.
FAQ
How do I connect GhidraMCP to Claude Code?
Install the plugin from the release archive into Ghidra 12.1.4 and restart it. Then run claude mcp add ghidra -- uvx --from git+https://github.com/LaurieWired/GhidraMCP ghidra-mcp --ghidra-server http://127.0.0.1:8080/. If you changed the port in Tool Options, put it into the address.
Can GhidraMCP run without the Ghidra window?
Yes. uvx --python 3.13 --from "ghidra-mcp[headless] @ git+https://github.com/LaurieWired/GhidraMCP" ghidra-mcp --headless --binary /path/to/target imports the binary itself through PyGhidra. It needs the GhidraMCP extension and the GHIDRA_INSTALL_DIR variable. The --project DIR flag keeps the project between runs.
How do I connect a client that accepts only a URL?
Start the bridge in streamable-http mode: 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 the client.
How is GhidraMCP different from Bethington's Ghidra MCP Server?
Laurie Wired's GhidraMCP covers the core set: decompilation, references, memory reads, renames and comments. The other author's Ghidra MCP Server is much wider in tool count. Pick the core one if you want a simple uvx launch and headless mode.
What can GhidraMCP change in a Ghidra project?
It can rename functions, data and variables, change a function prototype and a local variable type, and leave comments in the decompiler and the disassembly. The remaining tools only read. Keep a copy of the project before a long session.
Discussion
No questions or reviews yet.
Related
MCP serversAn MCP server for the Ghidra disassembler: hundreds of tools for reverse engineering, decompilation, renaming, structures, emulation and debugging
A Ghidra extension with an MCP server: an agent reads pseudocode and disassembly, builds call graphs and edits names, types and structures via 100 tools
A Ghidra MCP server: the agent decompiles, renames variables, builds cross references and works through a binary via a set of small tools
A native MCP plugin for the x64dbg debugger: the agent drives debugging over HTTP, sets breakpoints, steps through code, reads and patches memory
An MCP server and agent toolkit for reverse engineering: Ghidra, Frida, x64dbg and Rizin for binary analysis, CTF and malware research
The official Hex-Rays MCP server: an agent opens IDA databases, runs Python inside them and reverses binaries, with plugins for Claude Code and Codex
Comparison with similar tools
Entries that share the main search query, and how they differ.
| Entry | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| GhidraMCP (this entry) | no | not required | 11,506 | |
| Ghidra MCP Server | no | not required | 5,869 | an independent project with a much wider set of reverse engineering tools |
| x64dbg MCP | no | not required | 534 | an x64dbg and x32dbg plugin with an MCP server of 79 tools and 11 |
| GhidrAssistMCP | no | not required | 780 | a Ghidra extension with an MCP server |
README in short
The page says the project gives language models Ghidra tools for autonomous analysis of applications. It then lists the requirements and the plugin install steps with a video guide, a JSON config for MCP clients and two examples, for VS Code and for Claude Code. Separate sections cover running the bridge for URL-based clients, headless mode and building the extension from source with Gradle and Java 21.