The full upstream README, mirrored here for reference. Install config, tool schemas, adoption signals, and an original overview live on the GhidrAssistMCP listing page.
A powerful Ghidra extension that provides an MCP (Model Context Protocol) server, enabling AI assistants and other tools to interact with Ghidra's reverse engineering capabilities through a standardized API.
GhidrAssistMCP bridges the gap between AI-powered analysis tools and Ghidra's comprehensive reverse engineering platform. By implementing the Model Context Protocol, this extension allows external AI assistants, automated analysis tools, and custom scripts to seamlessly interact with Ghidra's analysis capabilities.
program_name; use list_binaries Project Path values to disambiguate duplicate filenamesShameless self-promotion: GhidrAssist supports GhidrAssistMCP right out of the box.

Download the latest release:
.zip file (e.g., GhidrAssistMCP-v1.0.0.zip)Install the extension:
Enable the plugin:
Source builds require Java 25 or newer. The included Gradle wrapper pins the supported Gradle release; use it instead of a system Gradle installation.
Clone the repository:
Point Gradle at your Ghidra install:
GHIDRA_INSTALL_DIR (environment variable), or pass -PGHIDRA_INSTALL_DIR=<path> when you run Gradle.Build + install:
Ensure Ghidra isn't running and run:
This copies the built ZIP into your Ghidra install ([GHIDRA_INSTALL_DIR]/Extensions/Ghidra) and extracts it into your Ghidra user Extensions folder (replacing any existing extracted copy).
If you need to override that location, pass -PGHIDRA_USER_EXTENSIONS_DIR=<path>.
Restart / verify:
Open the Control Panel:
Configure Server Settings:
localhost8080The Configuration tab allows you to:
GhidrAssistMCP can also be started from Ghidra's analyzeHeadless launcher. This is useful when you want MCP access to a program loaded in headless Ghidra without opening the CodeBrowser UI.
First, build and install the extension so Ghidra can load the compiled classes and bundled dependencies:
Set paths for your Ghidra install and extracted user extension. On Linux, Ghidra user extensions usually live under ~/.config/ghidra/<ghidra_profile>/Extensions:
Import a binary and start the MCP server as a headless pre-script:
For a binary that is already imported into the project, use -process instead:
To keep a headless MCP session open after analysis completes, run the server as a post-script with wait mode:
MCP clients can connect to:
The headless MCP server runs inside the analyzeHeadless JVM and uses the loaded currentProgram. The server holds a program consumer while it is running so MCP requests do not race against program database closure. Use wait=true when you want analyzeHeadless to stay open for interactive MCP clients. A harness can also pass completion_file=/workspace/control/session.complete; creating that file closes the MCP server cleanly and lets Ghidra save and exit normally.
Disposable static-analysis labs may pass tool_profile=agent_lab. This enables sandbox-local program export while arbitrary path import and Ghidra scripts remain disabled because they can expose process secrets or spawn processes. The harness owns artifact imports. Unknown profiles are rejected.
GhidrAssistMCP provides 49 tools organized into categories. Several tools use an action-based API pattern where a single tool provides multiple related operations.
| Tool | Description |
|---|---|
get_binary_info | Get basic program information (name, architecture, compiler, etc.) |
list_binaries | List all open programs across all CodeBrowser windows, including Project Path values for unambiguous program_name targeting |
open_program | List/open project programs in CodeBrowser, with optional analysis prompt suppression and analysis-after-open task submission |
close_program | Close an open CodeBrowser program; changed programs require save=true or ignore_changes=true |
import_file | Import a host file into the current Ghidra project and optionally open it (disabled by default) |
project_files | List or delete files/folders in the active Ghidra project; deletion requires confirm=true |
scripts | List/read/create/delete/run Ghidra scripts (disabled by default) |
assemble_code | Assemble instruction text at an address and optionally patch it into program memory |
patch_bytes | Patch raw bytes in program memory at a given address |
export_program | Export the current program to disk (binary or original_file) (disabled by default) |
Security-sensitive tools:
import_file,scripts, andexport_programare disabled by default because they interact with the host filesystem or execute script code. Enable them explicitly in the plugin configuration UI when needed.project_filesdeletes entries from the active Ghidra project database, not the original imported host files, and requiresconfirm=true.
| Tool | Description |
|---|---|
analysis_options | List/set/reset Auto Analysis options and save/apply/list/delete option presets for the current program |
analyze_program | Run Auto Analysis on the current program or all open programs; supports full re-analysis, pending-changes analysis, address ranges, and option overrides |
analysis_control | Query Auto Analysis status or request cancellation of queued analysis tasks |
| Tool | Description |
|---|---|
get_functions | List functions with optional pattern filtering and pagination |
search_functions_by_name | Find functions by name pattern |
get_function_statistics | Comprehensive statistics for all functions |
analyze_function | Get detailed function information (signature, variables, etc.) |
get_current_function | Get function at current cursor position |
get_function_stack_layout | Get stack frame layout with variable offsets |
get_basic_blocks | Get basic block information for a function |
create_function | Create/define a function at an address, optionally clearing existing data/code first |
disassemble_at | Disassemble code at an address, optionally clearing existing data/code in the range first |
| Tool | Description |
|---|---|
get_imports | List imported functions/symbols |
get_exports | List exported functions/symbols |
get_strings | List string references with optional filtering |
search_strings | Search strings by pattern |
get_segments | List memory segments |
get_namespaces | List namespaces in the program |
get_relocations | List relocation entries |
get_entry_points | List all binary entry points |
| Tool | Description |
|---|---|
get_data_vars | List data definitions in the program |
get_data_at | Get hexdump/data at a specific address |
create_data_var | Define data variables at addresses |
get_current_address | Get current cursor address |
These tools bundle related operations behind a discriminator parameter (e.g., action, target, target_type, or format).
get_code - Code Retrieval Tool| Parameter | Values | Description |
|---|---|---|
format | decompiler, disassembly, pcode | Output format |
raw | boolean | Only affects format: "pcode" (raw pcode ops vs grouped by basic blocks) |
classes - Class Operations Tool| Action | Description |
|---|---|
list | List classes with optional pattern filtering and pagination |
get_info | Get detailed class information (methods, fields, vtables, virtual functions) |
xrefs - Cross-Reference Tool| Parameter | Description |
|---|---|
address | Find all references to/from a specific address |
function | Find all cross-references for a function |
include_calls | Include callers/callees (replaces separate call graph tool) |
struct - Structure Operations Tool| Action | Description |
|---|---|
create | Create a new structure from C definition or empty |
modify | Modify an existing structure with new C definition |
merge | Merge (overlay) fields from a C definition onto an existing structure without deleting existing fields |
set_field | Set/insert a single field at a specific offset without needing a full C struct (use field_name to name it) |
name_gap | Convert undefined bytes at an offset/length into a named byte[]-like field (useful for “naming gaps”; uses field_name) |
auto_create | Automatically create structure from variable usage patterns |
rename_field | Rename a field within a structure |
field_xrefs | Find cross-references to a specific struct field |
rename_symbol - Symbol Renaming Tool| Parameter | Values | Description |
|---|---|---|
target_type | function, data, variable | What kind of symbol to rename |
batch_rename - Batch Symbol Renaming ToolRename multiple symbols in one operation.
comments - Comment Management Tool| Action | Description |
|---|---|
get | Get comment at an address |
set | Set a comment at an address or on a function |
list | List all comments |
remove | Remove a comment |
variables - Variable Management Tool| Action | Description |
|---|---|
list | List local variables for a function |
rename | Rename a local variable or a global/data symbol using scope |
set_type | Set data type for a local variable |
set_prototype | Set function signature/prototype |
types - Type Management Tool| Action | Description |
|---|---|
list | List all available data types |
get_info | Get detailed data type information and structure definitions |
set | Set data type at a specific address, including arrays with array_count or suffix syntax like int[16] |
delete | Delete a data type by name (optionally scoped by category) |
bookmarks - Bookmark Management Tool| Action | Description |
|---|---|
list | List all bookmarks |
set | Set a new bookmark |
remove | Remove a bookmark |
| Tool | Description |
|---|---|
search_bytes | Search for byte patterns in memory |
Long-running operations (decompilation, structure analysis, field xrefs) execute asynchronously:
| Tool | Description |
|---|---|
get_task_status | Check status and retrieve results of async tasks |
cancel_task | Cancel a running async task |
list_tasks | List all pending/running/completed tasks |
GhidrAssistMCP exposes 6 static resources that can be read by MCP clients:
| Resource URI | Description |
|---|---|
ghidra://program/{name}/info | Basic program information |
ghidra://program/{name}/functions | List of all functions |
ghidra://program/{name}/strings | String references |
ghidra://program/{name}/imports | Imported symbols |
ghidra://program/{name}/exports | Exported symbols |
ghidra://program/{name}/segments | Memory segments |
Pre-built prompts for common analysis tasks:
| Prompt | Description |
|---|---|
analyze_function | Comprehensive function analysis prompt |
identify_vulnerability | Security vulnerability identification |
document_function | Generate function documentation |
trace_data_flow | Data flow analysis prompt |
trace_network_data | Trace network send/recv call stacks for protocol analysis and network vulnerability identification |
compare_functions | Diff two functions for similarity analysis |
reverse_engineer_struct | Recover structure definitions from usage patterns |
get_code)If multiple types share the same name across categories, pass category (or pass a full path in name starting with /).
Equivalent form:
For overlays or mixed code/data regions where Ghidra defined code as data, clear the existing code unit or an explicit range first:
When working with multiple open programs, first list them:
Then specify which program to target using program_name. When multiple programs share the same filename, use the Project Path shown by list_binaries:
GhidrAssistMCP uses a singleton architecture that enables seamless operation across multiple CodeBrowser windows:
Every tool response includes a context header:
or when targeting a different program:
program_name is specified, tools automatically use the program from the active windowConsolidated Tools: Related operations are consolidated into single tools with a discriminator parameter:
get_code: format: decompiler|disassembly|pcodeclasses: action: list|get_infostruct: action: create|modify|merge|set_field|name_gap|auto_create|rename_field|field_xrefsrename_symbol: target_type: function|data|variablecomments: action: get|set|list|removevariables: action: list|rename|set_type|set_prototype with scope: auto|local|global for renametypes: action: list|get|set|create_struct|create_enum|create_typedef|deletebookmarks: action: list|set|removexrefs: address|function with include_calls parameteranalysis_options: action: list|set|reset|save_preset|apply_preset|list_presets|delete_presetanalysis_control: action: status|cancelproject_files: action: list|deletescripts: action: list|get|create|delete|runTool Interface Methods:
isReadOnly(): Indicates if tool modifies program stateisLongRunning(): Triggers async execution with task managementisCacheable(): Enables result caching for repeated queriesisDestructive(): Marks potentially dangerous operationsisIdempotent(): Indicates if repeated calls produce same resultGET /sse - SSE connection for bidirectional communicationPOST /message - Message exchange endpointGET /mcp - Receive Streamable HTTP eventsPOST /mcp - Initialize Streamable HTTP sessionDELETE /mcp - Terminate Streamable HTTP sessionImplement McpTool interface:
Register in backend:
io.modelcontextprotocol.sdk:mcp:0.17.111.0.20 (HTTP/SSE transport)2.18.3 (JSON processing)The Log tab provides real-time monitoring:
REQ: tool_name {parameters...}RES: tool_name {response...}Detailed logging in Ghidra's console:
curl http://localhost:8080/sseget_task_status to check task statelist_tasks to see all taskscancel_task if a task is stuckEnable debug logging by adding to Ghidra startup:
git checkout -b feature-nameThis project is licensed under the MIT License - see the LICENSE file for details.
Questions or Issues?
Please open an issue on the project repository for bug reports, feature requests, or questions about usage and development.