- Reverse Engineer Anything is an open-source toolkit that lets AI coding agents analyze apps, websites, JavaScript, Electron packages, and native binaries locally.
- Two interfaces: a CLI for terminal workflows and an MCP server for agent tool calls.
- Quick start: run
npx rea-agents@latest setupto install and configure. - Evidence-first: every conclusion should link to addresses, strings, or runtime traces, not guesses.
- Agent support: works with Claude, Cursor, Codex, Gemini CLI, Windsurf, and Devin.
What Reverse Engineer Anything Is and Who It's For
Reverse Engineer Anything (REA) is an open-source reverse engineering toolkit built for AI coding agents. Instead of recovering original source code automatically, REA gives your agent a structured way to inspect software: it analyzes applications, websites, JavaScript, Electron apps, and native binaries through a local CLI and an MCP server. Everything runs on your machine, with an emphasis on evidence chains and reproducible investigations.
REA does not automatically decompile software into perfect source code. It orchestrates analysis, records evidence, and helps agents ask narrow, answerable questions about a target.
CLI Users
- Terminal-first analysts
- Scripted, repeatable pipelines
- Direct commands like analyze, search, xrefs
MCP Agent Users
- Claude, Cursor, Codex, Gemini CLI
- Windsurf, Devin integrations
- Agent-driven tool calls
Target Types
- Native binaries (ELF, PE, Mach-O)
- Electron apps (ASAR, package.json)
- Websites and JavaScript runtimes
| Interface | Audience | Best For | Key Capability |
|---|---|---|---|
| CLI | Terminal users | Repeatable local analysis | Direct commands, scripted output |
| MCP Server | AI coding agents | Agent-driven investigation | Structured tool calls, evidence records |
Installation and Setup in Five Steps
Setup follows a predictable path: prepare the environment, install REA, diagnose problems, connect your agent, and verify the connection works.
Check prerequisites
Confirm you have Node.js and npm installed, plus a supported operating system. REA runs locally, so no cloud account is required. Keep an isolated working directory for analysis targets.
Run the installer
Execute npx rea-agents@latest setup. The interactive setup confirms your installation plan, detects installed coding agents, and writes the appropriate configuration.
Diagnose the environment
Run rea doctor to check for missing dependencies, path errors, and Node.js or external tool issues. Fix any reported problems before connecting an agent.
Connect your coding agent
Register the MCP server in your agent's configuration (Claude Desktop, Cursor, or another MCP client). Restart the client so it discovers REA's tools.
Verify the connection
Ask your agent to list available REA tools or run a trivial analysis on a known file. If tools appear and return results, setup is complete.
A common failure is installing dependencies in one Python or Node environment while the agent launches the server with another. Always run rea doctor and test the server command manually under the same user the agent uses.
| Setup Task | Command | Purpose |
|---|---|---|
| Install REA | npx rea-agents@latest setup | Install and configure CLI + MCP |
| Diagnose issues | rea doctor | Detect missing dependencies and path errors |
| Verify MCP | Agent tool listing | Confirm the agent discovers REA tools |
Core CLI Commands Reference
The CLI covers the full investigation cycle: identifying a target, searching its contents, tracing relationships, and capturing evidence.
| Category | Command | What It Does |
|---|---|---|
| Target ID | file <target> | Identify format, architecture, executable type |
| Evidence | sha256sum <target> | Record a hash proving the target is unmodified |
| Strings | strings -a -n 6 <target> | Extract printable strings for leads |
| Disassembly | objdump -d -M intel <target> | Generate assembly for executable sections |
| Debugging | gdb -q <target> | Interactive runtime analysis |
| Report capture | tee <report-file> | Save output into a reproducible report |
REA-specific commands such as analyze, inspect, search, function, xrefs, and trace wrap these operations into agent-friendly workflows.
Hash the target before and after analysis. If the hash changes, your findings no longer describe the original file, and the investigation must restart from a clean copy.
The Six-Phase Analysis Workflow
A reliable investigation moves from low-risk observation to focused analysis and validated conclusions.
Identify and preserve
Determine file type, architecture, and imports; record the SHA-256 hash; build a baseline target profile before touching anything.
Static analysis
List symbols, extract strings, inspect sections and entry points. Build an initial map without executing the target.
Locate and trace
Search for references to interesting strings or imports, trace callers and callees, and record addresses with meaningful working names.
Dynamic analysis
Run the target in an isolated debugger, set breakpoints at candidate functions, and capture runtime evidence comparing against static hypotheses.
Test hypotheses
On a copy, apply the smallest controlled modification and compare behavior between original and modified targets.
Validate and report
Separate direct observations from interpretations, link each conclusion to an address or artifact, and save a reproducible report with tool logs and the target hash.
Broad prompts like "explain this binary" produce unreliable output. Ask for one thing at a time: list symbols, find references to a string, decompile one function. Focused requests are easier to validate.
Safety, Permissions, and Troubleshooting
REA emphasizes local analysis and minimal privilege. Follow these practices to keep both your machine and your findings trustworthy.
Safe Analysis Checklist:
- Analyze unknown binaries only in a VM or container
- Record the target hash before and after analysis
- Restrict MCP server access to an approved analysis root
- Require manual approval before executing unknown programs
- Keep secrets and personal files outside the workspace
| Symptom | Likely Cause | Fix |
|---|---|---|
| MCP server exits immediately | Wrong path or missing dependency | Use absolute paths, install deps in the correct environment |
| Tools not discovered | Registration after init, stale cache | Register tools during startup, restart the client |
| Decompilation unreadable | Stripped or obfuscated binary | Load symbols, define code regions, validate dynamically |
| Permission denied | File outside approved root | Move inputs into the configured analysis directory |
| Analysis times out | Whole-file scan for a narrow question | Add range and result-limit parameters, split into jobs |
Only analyze software you own or are authorized to investigate. Respect licenses and terms of service; reverse engineering restrictions vary by jurisdiction.
FAQ
Q: How do I use Reverse Engineer Anything for the first time?
Run `npx rea-agents@latest setup` to install, then `rea doctor` to verify your environment. Register the MCP server with your coding agent, restart the client, and confirm REA tools appear. Start with a simple target like a small JavaScript file before tackling native binaries.
Q: Which AI coding agents work with REA?
REA supports MCP-capable agents including Claude, Cursor, Codex, Gemini CLI, Windsurf, and Devin. Any MCP-compatible client can connect to the local server through its configuration.
Q: Does REA recover original source code?
No. REA focuses on evidence-based analysis and reproducible investigations rather than restoring original source. It helps agents inspect, trace, and document behavior with verifiable references.
Q: Why does my agent say REA tools don't exist?
Usually the server failed to start or the client cached an old capability list. Test the server command manually, confirm dependencies are installed in the environment the agent actually uses, and restart the client after configuration changes.