1
Add it to Claude Code
claude mcp add -e "GHIDRA_PATH=${GHIDRA_PATH}" -e "JAVA_HOME=${JAVA_HOME}" ghidra-mcp -- python path/to/ghidra-mcp/main.pyRequired:
GHIDRA_PATHJAVA_HOMEEnvironment Variables
Set these before running Ghidra MCP Server.
VariableDescriptionRequired
GHIDRA_PATHPath to the local Ghidra installation directory.YesJAVA_HOMEPath to the Java 21 JDK installation.YesAvailable Tools (4)
Once configured, Ghidra MCP Server gives your AI agent access to:
analyze_functionPerforms deep analysis on a specific function including decompilation and cross-reference mapping.function_addressdepthrename_functionRenames a function within the Ghidra project.addressnew_namecreate_structureDefines a new data structure in the Ghidra project.namefieldsrun_scriptExecutes a specified Ghidra script file.script_pathargsTry It Out
After setup, try these prompts with your AI agent:
→Analyze the function at 0x00401000 and suggest a descriptive name based on its logic.
→Find all orphaned code blocks in the current binary and list their entry points.
→Create a new structure definition for the network packet header found at 0x00405000.
→Run the standard function documentation workflow on the current program.
→Compare the function at 0x00401000 with the same function in the previous binary version.
Alternative installation methods
Windows Setup
.\mcp4ghidra-setup.ps1Keep this setup from going cold
Save the docs, env vars, and workflow around Ghidra MCP Server in Conare so Claude Code, Codex, and Cursor remember it next time.