Stop Re-Engineering Features from Scratch: How REA Integrates MCP Agents directly into Binary Analysis

Stop Re-Engineering Features from Scratch: How REA Integrates MCP Agents directly into Binary Analysis

By Reggi, 23 Oct 2026

How long does your team spend trying to replicate a slick feature observed in a competitor's closed-source application? Reverse engineering traditionally meant wrestling with separate workflows: launching Ghidra or Hopper for native binaries, running JADX for mobile bundles, unpacking Electron ASAR archives manually, and painstakingly tracing execution paths across fragmented tools.

The morluto/rea project completely alters this workflow by standardizing reverse engineering under a single Model Context Protocol (MCP) server. Written in TypeScript and exploding on GitHub with over 106,000 stars in a single week, REA turns raw application binaries, static JavaScript assets, .NET assemblies, and runtime app behaviors into evidence-backed technical specifications that AI agents can parse, explain, and reimplement.

+-------------------------------------------------------------------+
|                           AI Agent                                |
|   (Claude Code, Cursor, Codex, Gemini CLI, Grok Build, etc.)      |
+-------------------------------------------------------------------+
                                 |
                     Model Context Protocol (MCP)
                                 |
+-------------------------------------------------------------------+
|                         REA MCP Server                            |
|             (Schema Profiles: Compact vs. Full)                   |
+-------------------------------------------------------------------+
        /                        |                        \
       /                         |                         \
+---------------+       +------------------+       +---------------+
| Native Engine |       | Static JS Engine |       | Mobile/Firmware|
| (Ghidra, IDA, |       | (Electron, App   |       | (JADX,        |
|  Hopper)      |       |  Directories)    |       |  Firmware)    |
+---------------+       +------------------+       +---------------+

Bridging Model Context Protocol to Native and Static Analysis

At its core, REA connects your preferred AI agent to deep analysis engines. Instead of forcing an LLM to guess how a binary executes based solely on prompt intuition, REA gives agents structured tools to inspect real runtime behavior and raw compiled code locally.

When you direct an agent to investigate a feature (for example, "Understand how search works in the target app, show me the evidence, and build a similar feature"), REA interfaces with native engines like Hopper, Ghidra, or IDA Pro. It can even prompt setup to automatically install Hopper with explicit user approval. For web and Electron targets, REA executes static JavaScript analysis out of the box without requiring native disassembly engines.

Crucially, analysis runs locally on your development workstation. REA mandates that all generated conclusions include explicit technical evidence alongside stated operational limitations, avoiding hallucinated decompilations.

Context Optimization: Compact vs. Full Schema Profiles

Integrating comprehensive static analysis tools into an agent's context window quickly exhausts available tokens. REA addresses context bloat by implementing compact input schemas by default.

To reduce token overhead during routine agent tool calls, REA strips unnecessary metadata from advertised fields. However, when complex validation logic or deeper schema introspection is required, you can toggle the server's profile during registration:

bash
# Registering REA with full input schema guidance REA_MCP_INPUT_SCHEMA_PROFILE=full npx rea-agents setup

Both the compact and full schema profiles retain access to the complete suite of analytical tools and enforce identical canonical server-side validation. The profile setting strictly optimizes how tool schemas are serialized into the agent's context window.

Static JavaScript and Electron Extraction Pipeline

You do not need native disassemblers installed to evaluate web applications, extracted JS bundles, or Electron packages. REA provides headless CLI workflows that dump structured analysis directly into JSON format for pipeline consumption.

To evaluate an extracted application directory or ASAR package from your terminal:

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

On Windows environments, target paths map straight to system directories (e.g., D:/apps/example). The resulting JSON payload maps:

  1. Target internal JavaScript modules and dependency trees.
  2. Explicit import and export chains across bundle boundaries.
  3. Electron process boundaries (isolating Main, Renderer, and Preload execution contexts).
  4. Concrete line-by-line evidence mapping observed feature behaviors to specific source blocks.

Environment Setup, System Constraints, and CLI Management

Setting up REA registers its MCP server with supported agents, including Claude Code, Codex, Cursor, Gemini CLI, Grok Build, and custom CLI implementations. Setup handles configuration file generation and automatically backs up existing settings prior to applying updates.

The Linux Owned-Process Prerequisite

System engineers running REA on Linux distributions must ensure process tracking tools strictly comply with process ownership checks. When invoking Ghidra, JADX, firmware inspection tools, or static Electron analysis engines, REA verifies process ownership.

bash
# Verify PATH contains a procps-compatible 'ps' binary on Linux which ps ps --version

If your Linux environment uses a stripped-down ps utility (such as minimal BusyBox configurations), native analysis tasks will fail process ownership checks. Installing standard procps restores normal operation.

Agent Configuration and Updating

To register REA with your agent ecosystem, run the interactive bootstrapper:

bash
npx rea-agents setup

For routine terminal usage across your system architecture, install the tool globally via npm or Bun:

bash
# Install globally npm install --global rea-agents # Execute updating workflow rea update

The rea update command (also accessible via the alias rea --update) includes safety bounds for continuous integration environments. Its updater mechanism strictly retains a maximum of 4 MiB of combined stdout and stderr output. Oversized metadata replies exceeding this limit during updates are rejected to prevent memory exhaustion in terminal sessions.

Technical Execution Summary

Feature / DomainSupported Engine / CommandKey Technical Requirement
Agent Setupnpx rea-agents setupNode.js + npm, backups existing agent configs
Native Binary AnalysisHopper, Ghidra, IDA ProLocal installation (Hopper can be auto-installed)
JS/Electron Analysisanalyze-javascript-applicationNo native engine needed; outputs JSON module boundaries
Mobile & FirmwareJADX, Firmware analysis toolsRequires procps-compatible ps binary on Linux
Context Overhead ControlREA_MCP_INPUT_SCHEMA_PROFILESet to full or default compact to manage token size
Global CLI Updaterrea updateCapped at 4 MiB combined stdout/stderr output buffer

REA changes how engineering teams perform reverse engineering. By removing manual disassembler context switching and feeding structural binary analysis directly into agent runtimes via MCP, software engineers can deconstruct app behavior down to the bare metal in a fraction of the time.

References


Popular Reads