
Ghidra MCP Server: Setup for Claude, Cursor and Other Apps
Lets Claude, Cursor and other assistants work inside Ghidra: decompile functions, trace calls, rename code and document a binary.
This is a community project, not made by Ghidra's maker. It connects an assistant to a running Ghidra through a plugin you install in Ghidra and a small bridge program on your computer. The assistant can then read, search, decompile and edit the program you have open.
Setup has two parts. You install the Ghidra extension and the bridge, and Ghidra 12.1.4 and Java 21 are required. The server has more than 200 tools. Most load on demand, so the assistant first sees a smaller set.
Good for
- Reverse engineers who want an assistant to name and document functions
- Malware analysts triaging samples and pulling out indicators
- Researchers comparing versions of the same program
Works in
12 should work
Tap an app to see how to set it up and any known problems.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Supports local MCP servers.
Client does not support this transport.
Client does not support this transport.
Install Ghidra MCP
Claude Code
- 1
Copy this prompt.
Add the Ghidra MCP server to Claude Code. Run this command: claude mcp add ghidra-mcp -- /path/to/bridge-mcp-ghidra Then check that it loaded and tell me if I need to sign in or restart.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Ghidra 12.1.4, Java 21, uv.
Use the absolute path to bridge-mcp-ghidra: clients launched from a GUI do not see your shell PATH, and a bare command fails with spawn ENOENT. Open a program in Ghidra before you ask for functions.
Built from the package data we hold. Not yet tested by us. Source.
Tools
Shows which program is loaded
Returns the name, architecture and function count of the open program. A good first call to confirm the connection.
Try: “What binary do I have open in Ghidra?”
Read ·
get_metadataLists or searches functions in the program
Lists functions a page at a time, or filters them by name pattern.
Try: “List functions whose names contain "crypt".”
Read ·
find_functionsShows where the program starts running
Returns the entry points of the program, a good root for analysis.
Try: “Where does this binary start executing?”
Read ·
get_entry_pointsShows everything about one or many functions
Takes one function or up to 20 and returns the fields you ask for, such as decompiled code and callers.
Try: “Decompile the function at 0x401000 and list what it calls.”
Read ·
get_functionsShows who calls whom around a function
Returns a call graph for a function, to the depth and direction you choose.
Try: “Show the call graph two levels deep from main.”
Read ·
get_function_call_graphShows everything that references an address
Lists the places in the program that point to an address, such as who reads a global.
Try: “Who touches the global at 0x4a3000?”
Read ·
get_xrefs_toShows what an address references
Lists the references that start at an address.
Try: “What does the code at 0x401050 reference?”
Read ·
get_xrefs_fromLists the strings defined in the program
Returns the defined strings, an easy way to get oriented in an unknown binary.
Try: “List the strings in this binary.”
Read ·
list_stringsSearches the program's strings by pattern
Finds defined strings that match a substring or regex.
Try: “Find strings that look like URLs.”
Read ·
search_stringsLists imports, exports, segments and more
Lists one kind of item at a time, such as imports or exports, with paging.
Try: “List the imports of this binary.”
Read ·
list_program_itemsReads raw bytes from the program
Returns raw memory from the program at an address.
Try: “Show 64 bytes at 0x402000.”
Read ·
read_memoryShows the assembly for a function
Returns the disassembly of a function.
Try: “Disassemble the function at 0x401000.”
Read ·
disassemble_functionSearches for a byte pattern
Finds places in the program that match a byte pattern.
Try: “Find this byte sequence in the binary.”
Read ·
search_byte_patternsSearches for instructions
Finds instructions by mnemonic or operand text.
Try: “Find every call to an xor instruction with a constant.”
Read ·
search_instructionsTraces how a value moves through a function
Follows a value forward or backward through a function's P-code.
Try: “Trace where the argument of this function ends up.”
Read ·
analyze_dataflowLooks for well-known crypto constants
Scans for constants used by common encryption and hashing code.
Try: “Does this binary contain crypto constants?”
Read ·
detect_crypto_constantsFlags suspicious behaviors in the program
Looks for behavior patterns that often show up in malware.
Try: “Does this sample show any malware behaviors?”
Read ·
detect_malware_behaviorsPulls out indicators like URLs and IPs
Extracts indicators of compromise along with the code around them.
Try: “Extract the IOCs from this sample.”
Read ·
extract_iocs_with_contextRuns a function in an emulator with inputs you set
Emulates one function with registers and memory you control, without running the real program.
Try: “Emulate this function with r0 set to 5.”
Runs code ·
emulate_functionRenames a function
Renames a function in the Ghidra database. Names that fail the built-in quality rules are rejected unless you switch that off.
Try: “Rename FUN_00401000 to parse_header.”
Write ·
rename_functionRenames any kind of symbol
Renames a symbol of any kind in the database.
Try: “Rename this label to g_config.”
Write ·
rename_symbolSets a function's return and argument types
Changes the prototype of a function: return type, parameter types and calling convention.
Try: “Set the prototype of parse_header to int parse_header(char *buf, int len).”
Write ·
set_function_prototypeAdds a comment to the listing
Writes a plate, pre, EOL, post or repeatable comment at any address.
Try: “Add a comment at 0x401000 saying this checks the license.”
Write ·
set_commentCreates a new structure type
Creates a structure data type, and other tools add, change or remove its fields.
Try: “Create a struct called Header with a magic and a length field.”
Write ·
create_structApplies a data type to an address
Sets the data type of the data at an address.
Try: “Apply the Header struct at 0x404000.”
Write ·
apply_data_typeCreates a function at an address
Defines a new function at an address in the program.
Try: “Create a function at 0x401200.”
Write ·
create_functionDeletes a function definition
Deletes the function defined at an address from the program database.
Try: “Delete the function at 0x401200.”
Delete ·
delete_functionDeletes a data type
Deletes a data type from the program.
Try: “Delete the unused type OldHeader.”
Delete ·
delete_data_typeDeletes a file from the project
Deletes a file from the open Ghidra project. When a file root is set, paths must stay under it.
Try: “Delete the old sample from the project.”
Delete ·
delete_fileDeletes a Ghidra project (headless only)
Deletes an entire Ghidra project. It works only in headless mode.
Try: “Delete the scratch project.”
Delete ·
delete_projectImports a binary from disk into the project
Imports a binary file from your disk into the current project and opens it.
Try: “Import /tmp/sample.exe and open it.”
Write ·
import_fileSaves the current program
Saves your changes to the open program.
Try: “Save the program.”
Write ·
save_programRuns inline script code in Ghidra (off by default)
Runs script code you give it inside the Ghidra process. It does nothing unless you set GHIDRA_MCP_ALLOW_SCRIPTS.
Try: “Run this short script to count the functions.”
Runs code ·
run_script_inlineRuns a Ghidra script (off by default)
Runs a Ghidra script and returns its output. It does nothing unless you set GHIDRA_MCP_ALLOW_SCRIPTS.
Try: “Run my CountStrings script.”
Runs code ·
run_ghidra_scriptResumes the debugged program (GUI only)
Resumes execution of the process under Ghidra's debugger. Other debugger tools set breakpoints, read registers and step.
Try: “Resume the target and break at the next breakpoint.”
Runs code ·
debugger_resumeSearches the full tool catalog
Searches all tools by keyword, since most are loaded on demand.
Try: “Which tools can edit struct fields?”
Read ·
search_toolsLoads another group of tools
Registers a group of tools on demand, because only part of the catalog loads at connect.
Try: “Load the cross-reference tools.”
Read ·
load_tool_group
Read from the source code
Permissions
high risk · 4 things to watch
High risk
It can rename and rewrite your analysis, and its tools include ones that delete functions, files and whole projects. Work on a copy of your project, and set a file root if you ever expose it beyond your own machine.
What it can do
- Read your data
- Create and change things
- Delete things
- Read-only mode
Watch out for
It can delete files and projects
Tools exist to delete project files, functions, data types and, in headless mode, whole projects. Keep a backup of your Ghidra project. github.com
Script tools run code inside Ghidra
Setting GHIDRA_MCP_ALLOW_SCRIPTS turns on tools that run arbitrary Java in the Ghidra process. They are off by default; leave them off unless you need them. github.com
Edits change your analysis database
Renames, types and comments write to the program. Save only when you are happy with the result. github.com
Exposing it on a network is unsafe
The default is local only, with no login. If you bind it to another address, the README says to set an auth token and a file root first. github.com
Security advisories
No published security advisories as of Nov 1, 2026.
Technical details
| Talks to | Local Ghidra plugin at 127.0.0.1:8089 |
|---|---|
| Sign-in and keys | No sign-in by default. The plugin listens on 127.0.0.1:8089. An auth token is required only if you bind it to a non-loopback address. |
Questions
Is the Ghidra MCP server official?
No. It is a community project by bethington, started from LaurieWired's GhidraMCP. It is not made by the NSA, which created Ghidra.
What do I need installed?
Ghidra 12.1.4, Java 21 and uv. You also install the GhidraMCP extension in Ghidra and the bridge program. The extension loads only in the exact Ghidra version it was built for.
Does it need an API key?
No. It talks to Ghidra on your own machine over a local port. A token is only needed if you expose the port beyond localhost.
Can it run in read-only mode?
Not as a single switch. The README describes a small read-only allowlist of four tools you can set in your AI app. Only those four then reach the assistant.
Can it run scripts?
Only if you turn it on. The script tools are off by default and need GHIDRA_MCP_ALLOW_SCRIPTS set.
Why does it show only some tools at first?
The full set of 200+ tools is too big for some AI providers, so the bridge loads about 76 on connect and the rest on demand. Turn that off with the no-lazy option if your app ignores tool list updates.
Is the tool list here complete?
No. The page lists the main tools out of more than 200 that the README documents for version 7.0.0.
Information
updated Nov 2, 2026
- Publisher
- Community
- Transport
- stdio, Streamable HTTP
- Auth
- None
- License
- Apache-2.0
- Last commit
- Oct 31, 2026
- Open issues
- 11
Sources
Docs, issue trackers and discussions this page is built from. Issues, quotes and findings above link to their own source.
Show all 2Hide
- github.com · github.com
- github.com · github.com