GhidrAssistMCP
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
- 780 ★ on the repository
- Last commit
- MIT
Broad access
Why this level
- The agent renames, changes types and structures, and creates, saves and closes Ghidra projects, so it can spoil the results of a long analysis
- The server accepts HTTP connections on port 8080, and any client that can reach the port gets every enabled tool
- The optional file import and script tools open file reads outside the project and code execution
Install
- Works in
Manual install
./gradlew installExtensionSource build: needs Java 25 or newer and the GHIDRA_INSTALL_DIR variable or the -PGHIDRA_INSTALL_DIR=<path> parameter, with Ghidra closed. The command copies the archive into Extensions/Ghidra and extracts it into the user extensions folder.
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- The agent renames, changes types and structures, and creates, saves and closes Ghidra projects, so it can spoil the results of a long analysis
- The server accepts HTTP connections on port 8080, and any client that can reach the port gets every enabled tool
- The optional file import and script tools open file reads outside the project and code execution
This is third-party code. Review the repository files before installing.
What it does
GhidrAssistMCP installs as an extension in Ghidra and runs an MCP server inside it. The server starts with the project manager, before any CodeBrowser opens, and one instance serves every open window. By default it listens on localhost:8080 and accepts Streamable HTTP connections (at /mcp) and SSE connections (at /sse and /message). The agent gets one hundred named tools, 93 enabled by default: function lists and search, pseudocode, disassembly, P-code, control flow graphs, imports, exports, strings, memory blocks, hex dumps, cross-references, callers and callees. Beyond reading, the tools change the project: they rename local variables, set types and function prototypes, create structures and their fields, infer a structure from a variable, add and remove comments, and start and cancel program analysis. Separate tools create, open, save and close Ghidra projects and open a project program in CodeBrowser. Every response begins with a note on which program is being worked on and which window has focus, so with several binaries open the agent picks the target with the program_name field. Long operations run in the background: the server returns a task id, get_task_status shows the state and cancel_task stops the job. Repeated requests are cached. Alongside the tools the server serves six resource templates (program info, functions, strings, imports, exports, segments) and seven ready prompts, including function analysis, data flow, network data and comparison. The Window, GhidrAssistMCP panel shows the request and response log and the settings: port, a checkbox list of tools, a server switch. Without a graphical window the extension starts through the GAMCPStartServerScript.java script under analyzeHeadless.
Who it is for. For reverse engineers, security researchers and CTF players who analyze binaries in Ghidra and want an AI agent to work with the open project through an MCP client.
Good fit when
- You want an agent to read the pseudocode of an unfamiliar function and explain it step by step without copying text out of Ghidra by hand
- A binary has hundreds of unnamed functions and the agent should propose names, types and prototypes from pseudocode and cross-references
- You need to recover structures and classes from how variables are used in the code
- Projects should be opened and saved from a conversation with the agent, and analysis started and cancelled without switching to the Ghidra window
- Analysis has to run without a graphical window, in a server script or an isolated lab through analyzeHeadless
Not a fit when
- You run a different version of Ghidra or Java: the extension is built for Ghidra 12.0 or 12.1 and Java 25, and each archive is tied to a Ghidra version
- Your analysis happens in IDA Pro: the extension works only with Ghidra, and the catalog has Hex-Rays IDA MCP for IDA
- You have no right to analyze the program you are about to open: the tool does not check whose binary it is or whether analysis is allowed
- You need code emulation and a live debugger: neither appears in the tool list, while Ghidra MCP Server describes them
Example request
Open the main function in Ghidra, read its pseudocode and propose names for every function it callsMCP
- Transport
- http, sse
- Authentication
- not required
Environment variables
GHIDRA_INSTALL_DIR- Path to the installed Ghidra, needed only for a source build
Limitations
- MIT license. Version 3.0.0 renamed and split the tools of the earlier set, so after upgrading the client must request the tool list again, and saved prompts with the old names will not work.
- Ghidra 12.0 or 12.1 and Java 25 or newer are required. Ready archives are built per Ghidra version, and a source build needs the repository's Gradle wrapper and the GHIDRA_INSTALL_DIR variable.
- Streamable HTTP supports protocol 2025-11-25, while SSE stays on 2024-11-05. The latest protocol revision, 2026-07-28, is not fully supported yet: the author is waiting for the next major Java SDK line.
- The file import, program export and five script-running tools are off by default. They are switched on with checkboxes in the settings window, and from then on the server can accept arbitrary files and run scripts at the agent's request.
- The extension analyzes other people's programs, so use it only on binaries you have permission to analyze.
- Closing a project does not save changes by default and refuses to finish if there are any. The discard_changes parameter allows losing them.
How to disable. Turn the server off with the switch in the Window, GhidrAssistMCP panel. To remove the extension entirely, open File, Install Extensions in Ghidra, clear the GhidrAssistMCP checkbox and restart. After a source build, ./gradlew uninstallExtension removes the extension while Ghidra is closed.
FAQ
What does the extension do when only the project manager is open?
The server is already running. The lifecycle tools create a project from the absolute path of a parent folder and a plain name without .gpr and .rep, open an existing one by its .gpr path, save it and close it. open_program opens a project program and launches CodeBrowser when needed. You cannot open a project over an active one: close the active project first.
How do I pick the right binary when several programs are loaded?
Call list_open_programs: it returns in-project paths that tell apart files with the same name. Pass that path as program_name. If the target is missing or ambiguous, the server returns an error. Cursor queries always refer to the focused CodeBrowser window and take no separate program selector.
How do I run the extension without the Ghidra window?
Through the analyzeHeadless launcher with GAMCPStartServerScript.java as a pre- or post-script and the host and port parameters. The server runs inside the analyzeHeadless process and uses the loaded program. The wait=true parameter keeps the process open for clients, and completion_file lets you close the server cleanly by creating the named file.
What is the agent_lab profile?
It is a mode for disposable static-analysis labs. It allows sandbox-local program export, while import from an arbitrary path and Ghidra scripts stay off: the author explains that they could expose process secrets or spawn processes. The surrounding harness controls artifact imports. The server rejects unknown profiles.
What does the log in the extension window show?
The log tab records session events (server start and stop, program changes), every request as REQ with the tool name and parameters, every response as RES, errors and cache hits. The log is shared by all CodeBrowser windows, bounded in size, and the Clear Shared Log button clears it everywhere.
Discussion
No questions or reviews yet.
Related
MCP serversMCP server and Ghidra plugin that lets an agent decompile binaries, follow cross-references and rename functions in an open project
An MCP server for the Ghidra disassembler: hundreds of tools for reverse engineering, decompilation, renaming, structures, emulation and debugging
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
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
x64dbg MCP
x64dbg MCP Server Plugin
An x64dbg and x32dbg plugin with an MCP server of 79 tools and 11 Claude Code commands for crash analysis, tracing and memory dumps
Comparison with similar tools
Entries that share the main search query, and how they differ.
| Entry | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| GhidrAssistMCP (this entry) | no | not required | 780 | |
| GhidraMCP | no | not required | 11,491 | a plugin with a Python bridge on port 8080, a smaller tool set and a headless mode through PyGhidra |
| Ghidra MCP Server | no | not required | 5,869 | over two hundred tools, code emulation and a live debugger integration |
| ReVa | no | API key | 879 | many small tools, comparison of two programs and a marketplace of Claude Code skills in the repository |
README in short
The repository has a project description covering installation from a ready archive and a source build, server and tool settings, headless mode, and a table of tools by task. Separate sections describe the runtime shared by all windows, MCP protocol version support, the source layout with an example of a new tool, Gradle build commands, logging and common problems. A detailed review of the move to version 3.0.0 is in docs/modernization-review.md.