Show HN: A MCP for Agents to reverse engineer binary code REA, a new open-source tool, enables AI agents to reverse engineer binary code from apps without source code, allowing them to understand and recreate features. The tool provides 68 investigation tools and integrates with agents via CLI and MCP, running locally on Mac. English · 简体中文 /morluto/rea/blob/main/README zh.md · 日本語 /morluto/rea/blob/main/README ja.md · 한국어 /morluto/rea/blob/main/README ko.md · العربية /morluto/rea/blob/main/README ar.md See a feature you like. Understand how it works, down to the binary level. Quick start quick-start · Current status current-status · Investigation model the-investigation-model · 68 tools 68-tools-for-investigation · Roadmap roadmap · How it works how-it-works npm install --global rea-agents && rea setup See a feature in an app that you want in your own product? Give the app to your agent—even without its source code. With REA, the agent can investigate the feature, explain how it works, show its evidence, and build a version adapted to your stack and requirements. REA gives agents one consistent way to investigate software. Today that includes deep native analysis through Hopper, complete function dossiers, reproducible Evidence v2 records, and controlled process capture. The longer-term toolkit extends the same agent workflow to packaged apps, JavaScript bundles, websites, APIs, protocols, mobile artifacts, firmware, runtime behavior, and differences between versions. Reverse engineering normally makes the operator choose a tool, learn its API, move evidence between programs, and decide what to inspect next. REA gives that work to the agent through commands, skills, structured results, and repeatable investigation workflows. Install the REA skill: npx skills add morluto/rea Then ask: Use REA to understand how search works in the Notes app, show me the evidence, and build a similar feature for my project. Notes is only an example. Name any app you want to understand, or ask the agent to start with an overview. DecompileOpen an app and recover readable code, strings, names, and other clues about how it works. | UnderstandFollow the code from one part of the app to another until the agent can explain how a feature actually works. | RecreateTurn what the agent learned into a feature for your own product, adapted to your stack, interface, and requirements. | REA shows how it reached its conclusions. It does not claim to recover original source code or automatically clone an application. Built for agents | Ask what an app does and let your agent inspect it instead of guessing. | CLI and MCP | Run the same reverse-engineering capabilities from your terminal or agent. | Complexity handled | REA installs and manages the reverse-engineering tools behind the scenes. | From insight to code | Understand a feature, then build your own version in the same coding session. | Local by design | Analysis runs on your Mac. REA does not upload the app to a hosted analysis service. | Keeps context | Investigate several apps without starting over for every question. | npm install --global rea-agents rea setup Installing the CLI does not update Homebrew, Node.js, npm, Hopper, or agent configuration. rea setup detects what is already present, prints every proposed change, and asks before applying it. REA detects Claude Code, Claude Desktop, Codex, Cursor, Gemini CLI, Windsurf, and Devin. Registrations are additive, backup-first, and read back after writing. You can safely rerun setup. An optional curl wrapper installs the same CLI package and starts setup only when a terminal is available: curl -fsSL https://raw.githubusercontent.com/morluto/rea/main/install.sh | bash Pass installer options after bash -s -- , for example --dry-run , --no-setup , or --version 1.0.0 . The curl wrapper never installs prerequisites or configures integrations itself. See Installation and setup /morluto/rea/blob/main/docs/installation.md for its exact mutation boundary. npx skills add morluto/rea Ask your agent to set up REA. It will check your Mac, explain anything it needs to install, ask for approval, and guide you through system prompts. After setup, restart the agent if it asks you to load the full REA toolset. Review the setup plan, approve it if appropriate, then describe the app or feature you want to understand. Hopper can run in its free demo mode; if it shows a first-run prompt, choose the demo or enter an existing license. npx -y rea-agents setup npx -y rea-agents doctor npx -y rea-agents analyze /Applications/Notes.app Review the setup plan before confirming it. Restart a configured agent so it loads REA. npm install --global rea-agents rea setup rea doctor rea analyze /Applications/Notes.app Update that global installation in place: rea upgrade REA checks npm for the latest release and verifies that the running package is the global installation it will replace. Source, local, and npx copies report the manual npm install --global rea-agents@latest command instead of updating an unrelated global package. Choose either the no-install commands or the global installation. You do not need both. - macOS 12 or newer - Ubuntu 24.04+, Fedora 41+, or 64-bit Arch Linux - Node.js 22.19+ or 24.11+ including newer releases - npm; REA does not require or install a particular npm version Deep binary analysis currently uses Hopper https://www.hopperapp.com/ , a separate desktop application with its own license. Setup reuses an existing installation. If Hopper is missing, interactive setup proposes the official package and includes it in the confirmation plan. Unattended installation requires rea setup --yes --install-hopper . If something is not working, run: npx -y rea-agents doctor rea doctor --json is read-only and distinguishes unsupported hosts, missing dependencies, a missing local analysis engine, configuration drift, and healthy checks. Paid-license activation is optional: on Linux, REA runs the supported Hopper demo build on a private Xvfb display and selects Hopper's offered demo mode for each analysis session. On macOS, approved setup downloads Hopper's official DMG, verifies it, and installs the app into ~/Applications without Homebrew or administrator privileges. Hopper may show its demo or license prompt when first opened; no manual drag-and-drop is required. On Ubuntu 24.04+, Fedora 41+, and 64-bit Arch Linux, approved setup downloads the pinned official Hopper 6.4.2 package, restricts downloads to Hopper's public origin, verifies the published size and checksum, and invokes apt-get , dnf , or pacman to install Hopper and the Xvfb, Python, X11, and XTEST packages used by demo sessions. When REA is not already running as root, pkexec presents the system authorization prompt. REA never invokes sudo . Demo sessions run on an isolated 1280×1024 Xvfb display. REA verifies the exact supported Hopper binary, its owned process ancestry, the expected dialog geometry, and bridge state before selecting Try the Demo ; any mismatch fails closed. The normal Linux launcher is /opt/hopper/bin/Hopper . If Hopper was installed elsewhere: export HOPPER LAUNCHER PATH=/absolute/path/to/Hopper rea doctor --json If doctor reports a missing analysis engine even though the file exists, inspect shared-library resolution with: ldd /opt/hopper/bin/Hopper | grep 'not found' Install the missing distribution packages and rerun rea setup . Linux demo automation requires Xvfb , Python 3, libX11.so.6 , and libXtst.so.6 ; approved setup installs those direct runtime dependencies and does not interact with the user's desktop display. Hopper's free demo supports analysis with vendor-defined limits, and a paid license is optional. The curl installer places the rea command in ~/.local/bin on Linux; add that directory to future shell PATH values if it is not already present. REA defaults HOPPER LAUNCHER PATH to /Applications/Hopper Disassembler.app/Contents/MacOS/hopper on macOS and /opt/hopper/bin/Hopper on Linux. Explicit configuration always takes precedence. To remove only REA-owned MCP registrations and the managed skill: rea uninstall rea uninstall --purge-data also removes only ~/.rea/cache and ~/.rea/state Uninstall preserves Hopper, Node.js, evidence, captures, external evidence roots, unrelated skills, and other MCP servers. It refuses malformed client configuration and never follows purge-data symlinks. | If you want to… | Use | |---|---| | Ask an agent to investigate an app and build a feature | Install the skill, then talk to your agent | | Inspect or decompile one part of an app from the Terminal | rea analyze or rea decompile | | Validate, canonicalize, or compare Evidence v2 bundles | rea evidence-import , rea evidence-export , or rea compare | | Run or resume a persistent two-version artifact analysis | rea investigate-versions | | Reuse immutable analysis results without relaunching a provider | Pass --snapshot /approved/path/analysis.json to a deep-analysis command | | Import source as historical reference | rea import-reference-source | | Capture or compare controlled process behavior | rea capture-process or rea compare-process-captures | Filesystem evidence commands and MCP file tools are disabled until the operator approves absolute roots: export REA EVIDENCE ROOTS JSON=' "/absolute/path/to/evidence" ' export REA INVESTIGATION INPUT ROOTS JSON=' "/absolute/path/to/releases" ' rea evidence-import /absolute/path/to/evidence/bundle.json rea evidence-export /absolute/path/to/evidence/bundle.json /absolute/path/to/evidence/canonical.json rea compare /absolute/path/to/evidence/left.json /absolute/path/to/evidence/right.json rea investigate-versions /absolute/path/to/releases/v1 /absolute/path/to/releases/v2 /absolute/path/to/evidence/releases.json --yes --workspace-name releases investigate-versions inventories both versions, checkpoints their observed Evidence, derives an artifact comparison, and records a changed-behavior report. Both input paths must resolve beneath REA INVESTIGATION INPUT ROOTS JSON ; workspace files remain independently restricted by REA EVIDENCE ROOTS JSON . The workspace uses deterministic content identities and monotonic CAS-linked revisions, so the same request resumes an interrupted run or reuses a completed run without replacing earlier investigations. It currently compares static artifact structure only; it does not execute either version, and its report keeps every difference labeled as a behavior candidate. See Persistent investigation workspaces /morluto/rea/blob/main/docs/investigation-workspaces.md . Historical source import requires a separate allowlist and never treats source as current behavioral authority: export REA REFERENCE ROOTS JSON=' "/absolute/path/to/source" ' rea import-reference-source /absolute/path/to/source Exports never replace an existing file unless --overwrite is explicit. Imports are size/depth bounded, validate every Evidence v2 ID and manifest, and never execute bundle content. Provider-neutral analysis snapshots persist successful, immutable REA calls and their Evidence v2 records. They are exact caches rather than Hopper databases: REA reuses an entry only when the binary digest, format, architecture, operation parameters, loader arguments, and provider identity match. Custom Hopper loader overrides disable snapshots because their provider configuration cannot be replayed safely. Cursor-dependent and mutating calls are never cached. Snapshot files can contain proprietary analysis results and local paths, so REA keeps them local, writes them with owner-only permissions, and requires a separate approved root: export REA ANALYSIS SNAPSHOT ROOTS JSON=' "/absolute/path/to/analysis" ' rea analyze /absolute/path/to/app --snapshot /absolute/path/to/analysis/app.json The same exact query can now be answered from the snapshot. rea analyze /absolute/path/to/app --snapshot /absolute/path/to/analysis/app.json Exact CLI evidence replays happen before any provider starts. In MCP sessions, pass snapshot path to open binary to import a snapshot atomically while opening its matching target; MCP providers may still start before a cached call is replayed. Pass snapshot path and, when required, overwrite: true to close binary to save atomically before Hopper resources are released. If the save fails, REA deliberately leaves the session open. Reverse engineer the Notes app. Find how offline search works, explain it, and build a version for my project using TypeScript and SQLite. REA gives the agent a clear path from that request to working code: | Step | What the agent does | REA tools | |---|---|---| | 1 | Opens and identifies the binary | open binary , binary overview | | 2 | Finds likely offline-search clues | search strings , search procedures , list names | | 3 | Connects those clues to executable code | find xrefs to name , xrefs , procedure callers | | 4 | Reconstructs the relevant control flow | get call graph , procedure callees , procedure info | | 5 | Decompiles the relevant routines | procedure pseudo code , procedure assembly , batch decompile | | 6 | Builds the feature in your project | code adapted to your stack, product, and requirements | REA handles the app analysis in steps 1–5. The agent performs step 6 with its normal file-editing and test tools, using what it learned about the app. - Investigate a feature you like and build a version tailored to your own product. - Explain how a feature works when its source code is unavailable. - Reconstruct an app's authentication, storage, update, or networking flow. - Recover enough structure to document an undocumented format or interface. - Trace a suspicious behavior from a string or symbol to the code that implements it. - Run, checkpoint, resume, and reuse a content-addressed artifact investigation across two versions. - Turn recovered behavior into product features, tests, migration notes, ports, or interoperable replacements. - Analyze Swift and Objective-C metadata without manually untangling every mangled symbol. - Leave names, comments, and bookmarks in Hopper so human and agent analysis reinforce each other. | Tool family | Count | Examples | |---|---|---| | Native inspection | 33 | procedures, pseudocode, assembly, strings, names, segments, callers, callees, xrefs, annotations | | Investigation workflows | 10 | binary overview , analyze function , batch decompile , trace feature , call graphs, Swift and Objective-C discovery | | Native macOS utilities | 5 | Mach-O metadata, code signatures, plists, architectures, Swift demangling; Hopper-free and provenance-bearing | | Artifact graph | 2 | deterministic directory, ZIP/APK/IPA, and ASAR inventory; explicitly selected extraction into an absent owned tree | | Workspace and observation | 18 | target lifecycle, Evidence v2 bundles, process/artifact/function comparison, evidence-linked residual-unknown lifecycle | The public interface describes what the agent is trying to learn. Providers decide how to answer. macOS utilities handle common semantic inspection without launching Hopper; Hopper handles deeper native analysis; the process harness implements controlled behavioral capture. REA is already useful for native application investigation on macOS: - Open Mach-O, ELF, PE, .app , ZIP, APK, IPA, ASAR, plist, JavaScript, source-map, and Hopper database targets. - Traverse content-addressed artifact graphs without extraction; on macOS, read-only DMG traversal additionally requires native mount approved: true and REA ARTIFACT NATIVE MOUNT ENABLED=true . Materialize only approved occurrences into absent output roots. - Build bounded function dossiers with pseudocode, assembly, CFG edges, comments, calls, references, strings, and names. - Search and trace features across symbols, strings, metadata, references, and call paths. - Record every successful result as deterministic Evidence v2 with artifact and provider identity, confidence, authority, limitations, and locations. - Export and import evidence bundles across sessions. - Persist automatic cross-version artifact runs as canonical, lock-protected workspaces with tamper-evident revision commitments. - Capture approved PTY scenarios as Process Capture v4 Evidence, including committed run manifests, raw and rendered terminal frames, scripted interactions, descendant settlement, named filesystem checkpoints, deterministic command shims, and loopback HTTP/WebSocket exchanges. - Compare complete artifact inventories by stable path, content, metadata, and relations; incomplete evidence never implies equivalence. - Compare explicit function dossiers across text, calls, references, strings, and address-normalized CFG topology with per-facet unknowns. - Compare canonical Evidence bundles by exact membership, explicit observation pairs, and residual-unknown histories without turning omissions into behavioral absence. - Aggregate runtime comparisons into observed behavior changes while keeping static artifact/function differences labeled as candidates. - Build bounded, Evidence-cited direct call paths by exact address without treating missing dossiers as graph leaves. - Correlate exact static/runtime findings through explicit hypotheses without claiming causality from cochange. - Verify finite behavioral and structural reconstruction specifications with pass, fail, and unknown kept distinct. - Track residual unknowns through immutable CAS revisions, evidence-qualified resolution, contradictions, probes, and validated dependency relationships. - With explicit unknown registry approved: true , record bounded trace/capture residuals, typed provider unavailability, and capture disagreements automatically. - Start six guided MCP workflows /morluto/rea/blob/main/docs/mcp-prompts.md with live, session-aware completion for documents, procedures, providers, evidence, captures, artifact IDs, and active unknowns. Hopper is the first provider, not the boundary of the project. Some current workflows still require Hopper and macOS; every evidence record identifies the provider and limitations behind its result. REA is growing into a toolkit for understanding software across static artifacts and observed behavior. The next capability families are: Artifact decomposition — DMG, ASAR, ZIP, packages, universal-binary slices, application resources, embedded frameworks, mobile packages, and artifact graphs. Web and Electron investigation — Playwright/CDP capture of DOM, accessibility trees, screenshots, storage, console, IPC, HTTP, WebSocket, routes, and visual or structural differences. Deterministic behavior harnesses — stronger process-tree ownership, protocol fixtures, network policy, filesystem tracing, signals, reconnects, and cross-version comparison. JavaScript and source recovery — bundle indexing, AST/module reconstruction, source-map discovery, historical-source matching, and CodeDB-backed cross-references. Runtime observation — approval-gated LLDB, Frida, system logs, process and filesystem observers, and native API tracing. More static-analysis providers — native platform utilities first, followed by Ghidra, IDA/Hex-Rays, Binary Ninja, Rizin, LIEF, and other engines behind provider-neutral capabilities. More targets and platforms — Windows-native providers and ConPTY verification, Linux parity, websites and APIs, mobile artifacts, firmware, document formats, and other software-defined systems. Differential reconstruction expansion — add automatic function matching, protocol/UI comparison, controlled replay, residual-unknown planning, and reconstruction verification to persistent version runs. Roadmap items describe direction, not shipped support. New providers must produce the same evidence and safety metadata as existing capabilities before they become part of the public workflow. Once REA has multiple optional toolchains, setup can become capability-selective; the consent rules for that future work are recorded in the installation roadmap /morluto/rea/blob/main/docs/roadmap.md . See the static-analysis provider evaluation /morluto/rea/blob/main/docs/provider-evaluation.md for the current research matrix and admission gate. Setup currently configures Claude Desktop and Cursor automatically. Any agent that supports local MCP servers can use REA with the configuration below. { "mcpServers": { "rea": { "command": "npx", "args": "-y", "rea-agents", "mcp" } } } MCP clients that support prompts can also discover six ordered investigation workflows through prompts/list . Their optional identifier arguments use the current session for bounded completion/complete suggestions; see Guided MCP prompts and completion /morluto/rea/blob/main/docs/mcp-prompts.md . php flowchart LR Agent "Agent" -- REA "REA