Skip to main content
Back

Open-Source REA Gives Coding Agents a Full Reverse-Engineering Toolkit

REA ships a local MCP server that lets coding agents decompile, trace and reconstruct features from binaries, Electron apps and websites.

Pro

Repo, Full Access
  • REA is an MIT-licensed MCP server that lets coding agents reverse engineer apps end to end
  • Install with npx rea-agents setup, connects to Claude Code, Cursor, Codex, Gemini CLI and more
  • Routes to Hopper, Ghidra or IDA Pro for native binaries; all are bring-your-own licenses
  • Covers Mach-O, ELF, PE, Electron, .NET, Android APK, firmware and passive browser inspection
  • Every result ships with evidence, confidence and limitations rather than claiming source recovery
  • Repo at github.com/morluto/rea, docs at morluto.github.io/rea

REA, short for Reverse Engineer Anything, is a new MIT-licensed open-source project that exposes reverse-engineering tools to coding agents through one local Model Context Protocol server. MCP is the interface that lets clients such as Claude Code and Cursor call external tools. With REA, an agent can inspect an application without source access, trace how a feature behaves, cite supporting evidence, and generate an implementation for another stack.

The repository currently has 90 GitHub stars. Its pitch centers on a common development task: investigate a feature in an existing application, document the implementation details that can be recovered, and use those findings to build compatible behavior elsewhere.

One MCP, several analysis engines

REA ships as the npm package rea-agents. Running npx rea-agents setup registers the MCP server with selected agents and installs a matching workflow skill. Supported clients include Claude Code, Claude Desktop, Codex, Cursor, Gemini CLI, Windsurf, Devin, OpenCode, Antigravity, GitHub Copilot CLI, Command Code, and VS Code. Other clients can connect through a manual local MCP configuration.

Deep native analysis runs through Hopper, Ghidra, or IDA Pro. REA can install Hopper during setup on macOS and Linux or record an existing Ghidra path. It does not bundle Ghidra, Java, or IDA. Static JavaScript and Electron analysis requires only Node.js.

Target Primary requirement
Native binaries Hopper, Ghidra, or IDA Pro
JavaScript and Electron Node.js
Android APKs Headless JADX adapter
Web applications A running Chrome instance with CDP access

From clues to working code

REA organizes investigations around three stages: decompile, understand, and recreate. A developer might give an agent the following request:

Reverse engineer the Notes app. Find how offline search works, explain it, and build a version for my project using TypeScript and SQLite.

A typical investigation then moves through six steps:

  1. Open the target and collect an overview with open_binary and binary_overview.
  2. Search for clues with search_strings, search_procedures, and list_names.
  3. Trace references into executable code through find_xrefs_to_name, xrefs, and procedure_callers.
  4. Reconstruct control flow with get_call_graph, procedure_callees, and procedure_info.
  5. Inspect relevant routines through procedure_pseudo_code, procedure_assembly, and batch_decompile.
  6. Pass the recovered behavior and evidence back to the agent, which writes code with its normal editing tools.

The catalog exposes 41 native-inspection tools covering functions, pseudocode, assembly, strings, symbols, calls, references, annotations, byte reads, and file offsets. Additional tool families handle Android packages, .NET assemblies, firmware, browser observation, Electron applications, process capture, and workspace evidence.

Analysis beyond native binaries

  • Native binaries: Inspect Mach-O, ELF, PE, and macOS .app targets through Hopper, Ghidra, or IDA.
  • JavaScript and Electron: Map modules, imports, source maps, routes, IPC channels, storage, and native add-ons through static analysis.
  • Web applications: Attach through the Chrome DevTools Protocol to inspect an already-running browser, collecting document structure, network metadata, scripts, and screenshots without navigating the page or invoking its JavaScript.
  • .NET assemblies: Inspect metadata and Common Intermediate Language instructions, then compare findings across builds without loading the assembly.
  • Android APKs: Run static analysis through a headless JADX adapter without an emulator or APK execution.
  • Process behavior: Run a declared scenario, record filesystem changes, exit behavior, and interactions, then compare two captures.

Developers can also run JavaScript analysis without configuring an agent:

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

The command returns a JSON result containing an inline Evidence record, a recovered graph, limitations, and unresolved questions. It requires neither MCP setup nor a native decompiler and does not execute the target application.

Provenance in every result

REA wraps findings in evidence records that identify the provider, source locations, confidence, and known limitations. Original source code remains unrecoverable from decompiler output, so the system presents pseudocode and inferred behavior as analysis rather than an exact reconstruction.

Reconstruction checks return pass, fail, or unknown. Missing evidence therefore remains visible instead of being counted as a successful match, which helps developers review code generated from uncertain pseudocode or incomplete runtime observations.

Snapshot caching reduces repeated analysis work. Passing --snapshot /path/to/analysis.json reuses a result only when the target bytes, operation, parameters, tool, and settings match. A changed input forces a fresh run instead of silently serving stale output.

Limits that affect adoption

Area Current limitation
Ghidra The documented integration accepts Ghidra 12.1.x with the 64-bit full JDK declared by that installation. Current 12.1 releases require JDK 21 or newer.
Windows Support is partial. The experimental Ghidra P0 path is read-only and limited to native x86 and x86-64 PE applications stored on local NTFS volumes.
Process capture Native Windows capture is unavailable. Linux targets require WSL when the host runs Windows.
JavaScript Static analysis cannot reliably resolve dynamic imports or ambiguous module relationships.
Browser observation REA can inspect only activity visible after it attaches to Chrome.
Runtime findings Captures establish observed correlations. Causal conclusions require additional evidence.

Local tools, agent-dependent privacy

REA executes its analysis providers locally, and the connected agent’s privacy settings govern whether prompts, evidence, or generated code leave the machine. Teams handling proprietary binaries should review the agent client’s data controls before sending recovered strings, pseudocode, or application metadata to a hosted model.

Reverse-engineering permissions vary by jurisdiction, license, contract, and purpose. Developers should confirm that they own the target or have authorization to inspect it, especially when analyzing third-party applications, bypassing access controls, or recreating protected interfaces and assets.

From disassembler output to working code

REA packages the scripting capabilities of Hopper, Ghidra, and IDA behind one MCP contract with consistent tool names, evidence records, provider selection, and caching. An agent can investigate a native binary, an Electron ASAR, or a .NET assembly in the same session that it edits a TypeScript project.

That shared interface reduces the custom integration work required to connect coding agents with reverse-engineering tools. Developers still need to validate decompiler output, resolve uncertainty, and test generated implementations, but REA gives the agent a structured path from strings and cross-references to reviewable code.

REA is available under the MIT license, with setup documentation on the project site and published releases in the npm package.