← Back to Ghidra Headless MCP

Install Ghidra Headless MCP

Pick your client, copy the command, done.

Manual setup required. The maintainer's config contains paths only you know - edit the placeholders below before adding it to Claude Code.
1

Prepare the server locally

Run this once before adding it to Claude Code.

python3 -m venv .venv
. .venv/bin/activate
pip install .
2

Register it in Claude Code

claude mcp add -e "GHIDRA_INSTALL_DIR=${GHIDRA_INSTALL_DIR}" ghidra-headless-mcp -- python3 ghidra_headless_mcp.py --ghidra-install-dir /ABSOLUTE/PATH/TO/ghidra

Replace any placeholder paths in the command with the real path on your machine.

Required:GHIDRA_INSTALL_DIR

Environment Variables

Set these before running Ghidra Headless MCP.

VariableDescriptionRequired
GHIDRA_INSTALL_DIRAbsolute path to the Ghidra installation directoryYes

Available Tools (2)

Once configured, Ghidra Headless MCP gives your AI agent access to:

program.openOpens a program for analysis in the Ghidra environment.
path
health.pingChecks the connectivity and status of the Ghidra server.

Try It Out

After setup, try these prompts with your AI agent:

Open the binary at /samples/ls and provide a summary of the main function.
Decompile the entry point of the loaded program and identify any suspicious system calls.
Apply a patch to the function at address 0x401000 to bypass the license check.
List all cross-references to the 'password_check' function in the current program.
Prerequisites & system requirements
  • An MCP-compatible client (Claude Code, Cursor, Windsurf, Claude Desktop, or Codex)
  • Python 3.8+ with pip installed
  • GHIDRA_INSTALL_DIR — Absolute path to the Ghidra installation directory
Alternative installation methods

Development

pip install -e ".[dev]"

Keep this setup from going cold

Save the docs, env vars, and workflow around Ghidra Headless MCP in Conare so Claude Code, Codex, and Cursor remember it next time.

Remember this setup