- Reverse Engineer Anything (REA) is an open-source toolkit that lets AI coding agents inspect apps, websites, JavaScript, Electron packages, and native binaries.
- Two interfaces: a local CLI for terminal users and an MCP Server for agent tool calls.
- Local-first design: analysis runs on your machine with evidence chains, not on remote services.
- Evidence-driven: REA emphasizes reproducible investigation over guessing or auto-copying source code.
- Getting started takes one command:
npx rea-agents@latest setup.
What Is Reverse Engineer Anything for Coding Agents?
Reverse Engineer Anything, commonly abbreviated REA, is an open-source reverse engineering toolkit built specifically for AI coding agents. Instead of forcing you to choose between manual disassembly work and fully automated "decompile everything" tools, REA provides a CLI + MCP Server pair that lets agents such as Claude Code, Cursor, Codex, Gemini CLI, Windsurf, and Devin perform structured, evidence-backed analysis of real software targets.
The project's official positioning matters: REA focuses on local analysis, evidence chains, and reproducible investigation workflows. It is not designed to recover original source code or automatically clone commercial software. Every conclusion an agent produces should be traceable to a function, address, string, or runtime observation.
| Concept | Role in REA | Who Uses It |
|---|---|---|
| CLI | Terminal commands like analyze, inspect, search, xrefs, trace | Human analysts, scripts |
| MCP Server | Exposes analysis tools to AI coding agents over MCP | Claude, Cursor, Codex, Gemini CLI, Windsurf, Devin |
| Evidence | Recorded observations, call graphs, runtime traces | Anyone validating agent conclusions |
| Targets | Native binaries, Electron apps, JavaScript, websites, APKs | Analysts choosing what to inspect |
Use npx rea-agents@latest setup for guided installation, then rea doctor to diagnose missing dependencies such as Node.js or disassembler tooling before your first analysis session.
Installation and Setup Flow
REA's setup is agent-centric: the goal is to get your coding agent connected to the analysis toolkit as quickly as possible, then verify the environment before pointing it at a target.
Install the toolkit
Run npx rea-agents@latest setup to install the CLI, review the installation plan, and register the MCP Server configuration for your coding agent.
Diagnose the environment
Run rea doctor to detect missing runtimes, wrong paths, Node.js version problems, or absent disassembler dependencies before they break an analysis session.
Connect your coding agent
REA integrates with Claude Code, Cursor, Codex, Gemini CLI, Windsurf, and Devin. The setup flow writes the MCP configuration your agent needs to discover REA's tools.
Choose a target
Point the agent at a native binary, an Electron app's ASAR package, a JavaScript bundle, a website, or an APK.
Run an investigation
Submit focused questions, let the agent collect Evidence, then review the recorded call relationships and runtime results before accepting conclusions.
| Setup Task | Command or Action | Purpose |
|---|---|---|
| Install | npx rea-agents@latest setup | Install CLI and MCP config |
| Diagnose | rea doctor | Find missing dependencies and path errors |
| Agent link | MCP config per agent docs | Let agent discover REA tools |
| First run | Analyze a sample target | Verify the full pipeline works |
For unknown binaries, use a disposable VM or container, keep the target read-only, and record its SHA-256 hash before and after analysis. Never let an agent execute unknown software outside an isolated environment.
Core Workflow: From Target to Evidence
A reliable REA investigation moves from low-risk observation to focused validation. The workflow below mirrors how the official documentation structures an investigation, and it works identically whether you drive it from the CLI or let a coding agent orchestrate it through MCP.
| Phase | Key Actions | Typical Tools |
|---|---|---|
| 1. Identify target | File type, architecture, hash, sections, imports | file, sha256sum, metadata tools |
| 2. Static analysis | Symbols, strings, entry points, candidate functions | Disassembler, string extraction |
| 3. Trace relationships | Cross-references, callers/callees, call graphs | xrefs, call graph queries |
| 4. Dynamic analysis | Breakpoints, registers, memory, traces | Debugger, runtime capture |
| 5. Validate | Reproduce findings, separate facts from guesses | Evidence records, report export |
| 6. Reconstruct | Rebuild the behavior from confirmed evidence | Your own code, agent-assisted |
Evidence Chains
- Every conclusion links to addresses, functions, or traces
- Prevents agents from guessing
- Reports are reproducible
Focused Queries
- Ask for one function, string, or reference at a time
- Keeps context windows manageable
- Results are easier to validate
Human Review
- Agent proposes, you confirm
- Sensitive operations need approval
- Confirmed facts feed an investigation ledger
The official showcases include analyzing the Chrome Dino game's speed and acceleration rules and the Windows Calculator's percent-key logic, then rebuilding adjustable versions from confirmed evidence.
Supported Targets and Agent Integrations
REA's target coverage spans the most common reverse engineering scenarios developers encounter, and its agent integrations cover the major AI coding tools in use in 2026.
| Target Type | Analysis Focus | Key Artifacts |
|---|---|---|
| Native binaries | Functions, strings, cross-references, disassembly | Call graphs, pseudocode |
| Electron apps | ASAR files, package.json, Main/Renderer/Preload, IPC | Entry points, IPC map |
| JavaScript | Bundles, source maps, module structure | Dependency graph |
| Websites | Browser runtime behavior | Runtime traces |
| Android APKs | Package structure and logic | Manifest, smali/dex analysis |
REA supports six or more coding agent integrations including Claude Code, Cursor, Codex, Gemini CLI, Windsurf, and Devin, with per-agent configuration guides covering MCP registration and skill installation.
For safety, apply the same boundaries regardless of which agent drives the analysis: read-only access to target files, a separate writable output directory for reports, human approval before executing or patching anything, and no network access unless a specific workflow requires it.
Troubleshooting and Best-Practices Checklist
The most common REA problems cluster into a few predictable groups. Match the symptom to the fix before escalating.
| Symptom | Likely Cause | First Fix |
|---|---|---|
| MCP Server exits immediately | Wrong path, missing dependency, stdout pollution | Run the server command manually as the same user |
| Agent finds no tools | Registration after init, stale capability cache | Restart agent, verify tool schemas |
| Decompilation unreadable | Stripped binary, wrong architecture | Confirm format and endianness with file |
| Analysis times out | Whole-file analysis for narrow questions | Add range or function-level parameters |
| Context window overflow | Entire disassembly pasted into prompt | Pass artifact paths, retrieve excerpts |
Investigation Best Practices:
- Record target SHA-256 hash before and after analysis
- Keep targets read-only and work in an isolated VM or container
- Ask focused questions mapped to single tools
- Separate confirmed facts from open questions
- Save reports, tool logs, and config snapshots together
Reject paths outside the approved analysis root, require confirmation before running or patching targets, and keep credentials outside the server's working directory. These rules apply whether a request comes from an agent, a test harness, or a local script.
FAQ
Q: Does Reverse Engineer Anything recover original source code?
No. REA is built around local analysis, evidence chains, and reproducible investigation. It helps you understand and reconstruct behavior, but it does not recover original source or automate copying software.
Q: Which coding agents work with REA?
REA connects through MCP and supports Claude Code, Cursor, Codex, Gemini CLI, Windsurf, and Devin, with configuration guidance for each agent in the official docs.
Q: What is the difference between the CLI and the MCP Server?
The CLI serves terminal users and scripts with commands like analyze, inspect, search, xrefs, and trace. The MCP Server exposes those capabilities as tools that AI coding agents can discover and call during an investigation.
Q: How do I stop my agent from hallucinating analysis results?
Use focused queries, require every conclusion to cite an address, function, string, or trace, and reproduce important findings with the underlying tool. REA's Evidence system is designed to make this review loop practical.