Setting up

Getting started with REA (Reverse Engineer Anything)

Install REA, connect it to Claude Code or Codex, pick a native backend if you need one, and run a first analysis on an Electron app or your own binary.

By Updated 10 min readREAClaude CodeCodex CLIGhidra

REA (Reverse Engineer Anything) is an open-source MCP server and command-line tool that lets a coding agent inspect software without its source code. It covers native binaries, JavaScript and Electron apps, .NET assemblies and websites, and returns evidence with each finding. This guide is for people who want to ask Claude Code or Codex "how does this feature work?" about an app they own.

REA changes quickly. Its own README says "new releases include frequent bug fixes". Everything below matches the README and installation docs as of 14 October 2026, when the npm release was 6.4.0. If a command here fails, check those pages first.

Key facts
  • REA needs Node.js 22.19 or later on 22.x, 24.11 or later on 24.x, or 26 and up; Node 23, 25 and prereleases are unsupported.
  • Setup is one command, npx rea-agents@latest setup, which shows the files it will change and waits for approval before writing.
  • For native binaries REA needs one analysis engine: Hopper, Ghidra 12.1.x with a 64-bit JDK 21 or newer, or IDA through an existing IDA MCP server.
  • JavaScript, Electron and .NET inspection need no native analysis engine.
  • The npm release was 6.4.0 on 14 October 2026, and the only official sources are github.com/morluto/rea and rea.tools.

What do I need before I start?

  • Node.js and npm. REA needs Node.js 22.x (22.19 or later), 24.x (24.11 or later), or 26+. The installation docs say Node 23, 25 and prereleases are unsupported.
  • A coding agent with local MCP support. Setup supports Claude Code, Claude Desktop, Codex, Cursor, Gemini CLI and many others; the full list is in the supported agents table.
  • For native binaries only, one analysis engine:
    • Hopper (macOS or Linux). Commercial, with a free demo mode. REA's setup can install it after asking.
    • Ghidra 12.1.x (macOS or Linux; Windows is experimental) with a 64-bit JDK 21 or newer. Free. REA uses your existing install and never installs Ghidra or Java for you.
    • IDA through an existing IDA MCP server. You need your own IDA licence.
  • Nothing extra for JavaScript, Electron or .NET. Per the README, static JavaScript and .NET inspection "work without a native analysis engine".
  • A target you are allowed to examine. REA's licence notes say it is for lawful research, interoperability, preservation and "analysis of software you own or are authorized to examine".

Get REA only from github.com/morluto/rea, rea.tools or the rea-agents npm package. The README warns that look-alike repositories exist.

1. Run setup

bash
npx rea-agents@latest setup

Setup asks which agents to configure, shows the exact files and paths it will change, and waits for your approval. It adds REA's MCP server, installs a matching workflow skill for your agent, and keeps backups of your existing config. Hopper installation is a separate yes/no question. Restart the agents named in the completion message.

If you use Claude Desktop, quit it fully before approving. The installation docs say a running app can overwrite the new registration.

To configure one agent without the menu, or preview changes without writing anything, setup takes --client and --dry-run:

bash
npx rea-agents@latest setup --client claude_code --dry-run
npx rea-agents@latest setup --client codex

The client IDs are claude_code, claude_desktop and codex for the three agents covered here. Setup pins your agent's registration to the exact REA version that ran it, and for Codex it adds startup_timeout_sec = 30.

Manual registration

If you would rather add the server yourself, the installation docs give this config, pinned to a version:

json
{
  "mcpServers": {
    "rea": {
      "command": "npx",
      "args": ["-y", "rea-agents@6.4.0", "mcp"]
    }
  }
}

The same command in Claude Code and Codex syntax (see the Claude Code and Codex MCP docs):

bash
claude mcp add rea -- npx -y rea-agents@6.4.0 mcp
codex mcp add rea -- npx -y rea-agents@6.4.0 mcp

Manual registration skips the workflow skill, so the agent has the tools but not REA's instructions for using them. Setup is the route the README recommends.

2. Set up a native backend (only for binaries)

Skip this step if you only want to look at Electron or .NET apps.

Ghidra. Extract Ghidra 12.1.x and install a JDK, then point REA at them and rerun setup so the paths are saved into your agent's registration:

bash
export GHIDRA_INSTALL_DIR=/absolute/path/to/ghidra_12.1.4_PUBLIC
export JAVA_HOME=/absolute/path/to/jdk-21
npx rea-agents@latest doctor --provider ghidra --json
npx rea-agents@latest setup

REA opens each binary in a temporary, read-only Ghidra project. It never opens your existing Ghidra projects, and any renames it makes in a session are discarded when the session closes.

Hopper. Let setup install it, or point REA at an existing install. On macOS, open Hopper once and choose demo mode or activate a licence before your first analysis, or the first-run dialog blocks REA.

IDA. REA does not include its own IDA server. It adapts an existing one, described in its IDA provider guide. This changed after the guide was first written: REA removed support for the ida-pro-mcp 1.4 attached protocol, and its headless mode now needs an ida-pro-mcp build with the database supervisor tools (idb_open, idb_list, idb_close). The older 1.4.0 idalib-mcp does not work with it. Read that guide before you install anything for IDA.

When several engines are installed, pick one with --provider on the command line or provider_id when the agent opens a binary.

3. First run on an Electron app

Electron apps ship their JavaScript in an app.asar file or an app folder inside the install directory. You can test REA from the terminal before involving an agent:

bash
npx -y rea-agents@latest analyze-javascript-application /absolute/path/to/app.asar --json

The result lists modules, imports and Electron boundaries (renderer, preload and main process) with evidence for each. If that works, ask your agent a feature question. The JavaScript guide on rea.tools uses this pattern:

text
Use REA to find what happens when I export notes in this app.
Where is the CSV created? The app is at /absolute/path/to/app.asar.

REA matches a renderer's IPC call to the main-process handler that receives it, so the agent can follow a button click across processes. The rea.tools guide also points out that this path "is inferred from code"; a runtime capture is what confirms it executes.

4. First run on a native binary

With a backend set up, give the agent a path and a narrow question. The native guide uses DX-Ball's sound panning:

text
Use REA to find how this program calculates <the behaviour you care about>.
Explain the calculation and show the code. The binary is at /absolute/path/to/program.

Use a small program you own or wrote. REA returns pseudocode, assembly, strings, calls and references; the agent stitches them together.

How do I check it works?

bash
npx rea-agents@latest doctor --client claude_code --json

doctor is read-only. Scope it to one agent (--client codex) or one engine (--provider ghidra); without a scope it audits everything, and its overall healthy value can be false even when your chosen workflow is fine. Then, inside the agent, check that the REA tools are listed (/mcp in Claude Code). doctor checks files and prerequisites. It does not check whether the running agent session connected, so restart the agent if the tools are missing.

To update later, run npx rea-agents@latest setup again and restart the agent, or rea update if you installed it globally with npm install --global rea-agents.

Common setup errors

These are the failures people hit first, with the exact words the tools print so you can search for them.

  • Unsupported Node version. rea setup and rea doctor stop with:

    text
    Install Node.js 22.x (>=22.19), 24.x (>=24.11), or 26+ and rerun setup.

    That means the running node is outside REA's supported range (^22.19.0 || ^24.11.0 || >=26.0.0). Install a supported release, check it with node -v, then run rea setup again. Node 23, Node 25 and prereleases are unsupported even when they look newer, and npm prints an EBADENGINE warning when you install the package on an out-of-range Node because the package declares the same range in its engines field.

  • The doctor still reports the remediation after an upgrade. rea doctor prints Install Node.js 22.x (>=22.19), 24.x (>=24.11), or 26+. whenever node -v points at an old runtime, including when a version manager keeps a stale Node on your PATH in the terminal you are using. Check node -v in the same terminal session you run rea from.

  • doctor says the overall state is not healthy. Without a scope, doctor audits every agent and every provider, and its overall healthy value can be false while the one workflow you need is fine. Check the single entry you care about, for example npx rea-agents@latest doctor --provider ghidra --json.

  • Nothing to configure for JavaScript targets. If you only analyse Electron or .NET apps, REA needs no native engine, so a doctor warning about Hopper, Ghidra or IDA can be ignored for that workflow.

Where does the AI go wrong?

  • Inferred links presented as traced ones. In the Notion clipboard trace, the connection between the exposed method and the main-process handler came from reading wrapper code, not a fully automated trace, and probes ran extracted modules rather than a live session. Ask the agent to label which steps are evidence and which are inference.
  • Quietly dropping code to make things build. In the Electron lost-source recovery (Codex without REA), Codex skipped code to make builds pass until the author told it not to worry about compiling. The same risk applies when you ask an agent to rebuild a feature from REA's findings.
  • Partial pseudocode. REA's native guide shows a DX-Ball function whose decompiler output was only a call to __ftol(). The arithmetic had to come from the instructions, the caller and constant bytes. If the pseudocode looks too short, ask for assembly and callers.
  • Matching one function does not finish the job. The DX-Ball reconstruction passes 3,205 behaviour cases for the sound-pan routine, but ball and paddle physics, power-ups and sound integration were still in progress. Test each recovered function against the original before moving on.
  • Timeouts on large binaries. Ghidra's first query triggers import and analysis. The installation docs give a default provider startup deadline of 330,000 ms, adjustable with REA_GHIDRA_STARTUP_TIMEOUT_MS, and warn that your agent's own tool-call timeout can expire first.

Which projects used this?

  • Notion clipboard trace: REA's JavaScript analysis follows a copy from the preload bridge through IPC to the main process.
  • DX-Ball reconstruction: Codex used REA's Ghidra access to rebuild functions as C, checked against the original x86.
  • TH04 bullet patterns: REA on a 16-bit PC-98 DOS binary, recovering bullet-ring maths as C++.
  • REA iPhone app demo: a video comparing Claude Code with and without REA on a compiled iPhone app.
  • Electron app lost source: recovering an Electron app's TypeScript from its bundle with Codex alone, useful for comparison.

Further reading

By

I started this site on 13 October 2026 to keep track of reverse engineering projects where an AI model did real work. I work on it alone, with no investors and no ad networks.

About the site · @whyamas on X

Changes

  • Fixed moved REA documentation links and IDA notes.
  • Added common setup errors with the exact Node version message.

Sources

In practice

Directory projects behind this guide

Notion Desktop 7.6.1: Following a Notion copy-paste from the preload bridge to the main process.
Research
Blog · Apps

Traced how Notion Desktop's rich clipboard works through Electron IPC using REA

Following a Notion copy-paste from the preload bridge to the main process.

Platform Electron
Touhou 4: Lotus Land Story: Touhou 4's aimed bullet rings, recovered as C++ that matches the original bytes.
Partial
Blog / GitHub · Games and mods

Recovered Touhou 4's bullet-ring logic from its PC-98 DOS binary with REA

Touhou 4's aimed bullet rings, recovered as C++ that matches the original bytes.

Platform PC-98 (DOS)
Video: REA demo: rebuilding a compiled iPhone app's screen with and without REA
Research
YouTube · Apps

REA demo: rebuilding a compiled iPhone app's screen with and without REA

REA versus no REA, on rebuilding a compiled iPhone app's screen.

Platform iOSTime About 1 hour 12 minutes with REA, 40 minutes withoutCost About $40 with REA, $12 without
@dotey
宝玉
@dotey

@embirico @OpenAI How I Used Codex to "Recover" Lost Source Code in 5 Days Ever lost your source code? It's a terrible feeling. Years ago, I built an Electron drawing app. Then I lost the source code. All I had left was the compiled version. I thought about rewriting it from scratch, but the