rea.run

2026-10-12

Using Ghidra with REA (MCP)

For native binaries, REA can drive an existing Ghidra install as an MCP-backed provider. REA does not download Ghidra or Java. You install those outside REA, export absolute paths, then doctor + setup.

Wiring table

ItemTypical valueCheck
GHIDRA_INSTALL_DIRAbsolute path to Ghidra PUBLIC treeExists; version documented upstream (often 12.1.x)
JAVA_HOMEAbsolute path to 64-bit JDK 21+java -version matches
Doctordoctor --provider ghidra --jsonNative decompiler present for your OS
Setupnpx rea-agents@VERSION setupReconnect MCP client after
export GHIDRA_INSTALL_DIR=/absolute/path/to/ghidra_PUBLIC
export JAVA_HOME=/absolute/path/to/jdk-21
npx -y [email protected] doctor --provider ghidra --json
npx -y [email protected] setup

macOS note (verifiable issue)

Ghidra 12.1.4 PUBLIC commonly ships native decompilers for linux_x86_64 and win_x86_64 only. On macOS, doctor may report native_decompiler missing; REA refuses to auto-build. Community recipe: build via Ghidra’s make ghidra_opt (or current equivalent) and copy into os/mac_x86_64/ / mac_arm_64/. Details: /faq/macos-ghidra-decompiler/ (issue #1994).

Windows note

Windows × Ghidra is a P0 wiring story — env vars, read-only PE/DLL posture, cold-start windows. See /docs/windows-ghidra/ and community lab /showcase/rea-lab/ (pins Ghidra 12.1.4 + rea-agents 6.4.0 in that repo’s narrative).

Large binaries

First queries can time out while Ghidra cold-starts. Timeouts, heap, and pre-import ideas: /docs/ghidra-large-binaries/. 6.4 also adds import language/compiler seeding before auto-analysis (release notes).

Steps

  1. Install Ghidra + JDK outside REA.
  2. Export absolute GHIDRA_INSTALL_DIR / JAVA_HOME.
  3. Run doctor; fix decompiler OS folder if needed.
  4. Setup + reconnect agent.
  5. Analyze only authorized targets with absolute paths.

Compliance

Sources

  • Upstream installation docs in morluto/rea
  • #1994 macOS decompiler
  • 6.4.0 release Ghidra seeding notes

Path checklist

StepCheck
JDKVersion Ghidra 12.x docs require
GHIDRA_INSTALL_DIRAbsolute, stable across shells
doctor--provider ghidra --json green
MCPHost config points at same install

Compliance

Analyze only authorized programs. Teaching labs should seed challenges, not scrape production malware without containment policy.