What your agent can do
Through REA, an agent such as Claude Code, Codex or Cursor can use Ghidra or IDA to:
- list functions and strings in an executable or library;
- decompile a function and read its assembly;
- follow the functions it calls and the cross-references to an address.
Ghidra can also find a function's callers and read the bytes behind an address, such as a numeric constant. IDA can't list a function's direct callers; ask for cross-references to the function instead.
The same tools work with Ghidra, IDA and Hopper. Results keep the target's identity and state what is still unknown, including anything the chosen engine can't answer, which makes the agent's explanation easier to check.
What stays untouched
- Ghidra: REA imports the target into a temporary Ghidra project. The executable's bytes are never changed, and REA does not control the Ghidra window.
- IDA: analysis is read-only. When REA works with a database already open in IDA, it never saves or closes it.
REA works with your existing installations. It does not install, upgrade or license Ghidra or IDA.
Set up Ghidra
Ghidra is free. REA supports Ghidra 12.2 or newer with a 64-bit JDK 25 or newer on Linux and macOS, with experimental support on Windows x64. Point REA at your installation, then run setup:
export GHIDRA_INSTALL_DIR=/absolute/path/to/ghidra_12.2_PUBLIC
export JAVA_HOME=/absolute/path/to/jdk-25
npx rea-agents@latest setup
Setup shows its planned changes before writing anything. The Ghidra setup reference covers Windows, native decompiler requirements and resource limits.
Set up IDA
REA works through an IDA MCP server you install yourself. Choose one way to connect:
- A database already open in IDA: the ida-free-mcp plugin, for IDA Pro and IDA Free. Its 1.1.2 release accepts connections from other computers on your network. Before you start it, block those with your firewall or use a build that only listens on your own computer.
- Headless IDA Pro: ida-pro-mcp or the official Hex-Rays IDA MCP.
Describe that server in a small JSON file, then tell REA to use it. The IDA provider guide shows the file for each option.
export REA_IDA_MCP_CONFIG=/absolute/path/to/ida-mcp.json
export REA_ANALYSIS_PROVIDER=ida
npx rea-agents@latest setup
Ask a question
Restart your agent after setup, then give it the full path to the program and one question about a feature:
Use REA to find how this program reads its settings file. Show the functions involved and explain what each one does.
Ask for addresses and decompiled code with each answer, and follow up on anything it marks as unknown. You can also query one function from the terminal:
npx -y rea-agents@latest function /absolute/path/to/program main \
--provider ghidra --json
If you set up IDA, replace --provider ghidra with
--provider ida.
- Follow a full native investigationRecover a sound calculation from a 1996 Windows game.
- Solve a CTF flag checkerTurn a binary's checks into equations.
- Reverse engineering with AIHow to check what an AI agent tells you.