- 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 agents like Claude, Cursor, Codex, and Gemini CLI.
- Evidence-first workflow: every conclusion is tied to recorded evidence, not AI guesswork.
- Local analysis keeps targets, reports, and tool calls on your own machine.
- Quick start: run
npx rea-agents@latest setupto install and configure.
What Is Reverse Engineer Anything?
Reverse Engineer Anything (REA) is a developer toolkit built specifically for AI coding agents. Instead of manually clicking through a disassembler, you connect an agent through a CLI or an MCP server, and the agent performs the investigation: identifying file formats, extracting strings, tracing cross-references, and summarizing functions. The project emphasizes local analysis, an evidence chain, and reproducible investigation workflows rather than automatic source-code recovery.
The toolkit supports several target categories, each with its own analysis approach:
| Target Type | What You Analyze | Typical Tools |
|---|---|---|
| Native binaries | Functions, strings, cross-references, disassembly | Ghidra, objdump, GDB |
| Electron apps | ASAR files, package.json, Main/Renderer/Preload, IPC | ASAR extraction, source maps |
| JavaScript | Bundles, minified code, module structure | String search, call graphs |
| Websites | Runtime behavior, network requests, scripts | Browser runtime inspection |
| Android APK | Manifest, resources, dex code | APK parsers, decompilers |
REA assists with analysis and reconstruction for learning and interoperability. It is not designed to recover original source code or bypass software licensing. Only analyze software you own or are authorized to investigate.
Installation and First Run
Getting REA running takes one command plus a short configuration check. The setup wizard confirms your Node.js environment, installs the CLI and MCP server, and detects connected coding agents.
Check prerequisites
Verify Node.js and npm are installed and up to date, and confirm your operating system is supported. Keep a dedicated working directory ready for analysis targets and reports.
Run the setup wizard
Execute npx rea-agents@latest setup. The wizard installs the CLI, registers the MCP server, and walks through an installation plan with confirmation prompts.
Run diagnostics
Use rea doctor to detect missing dependencies, path errors, or agent-configuration problems before your first investigation.
Connect a coding agent
Follow the generated configuration for your agent, such as Claude Desktop, Cursor, Codex, Gemini CLI, or Windsurf, and confirm the REA tools appear in the agent's tool list.
| Checkpoint | Command | Expected Result |
|---|---|---|
| Environment | node --version | Supported Node.js version prints |
| Install | npx rea-agents@latest setup | Wizard completes, config written |
| Diagnose | rea doctor | No missing dependencies reported |
| Verify MCP | Agent tool list | REA analysis tools visible |
Keep original binaries read-only in a dedicated targets/ directory and write all reports to a separate reports/ directory. Record the SHA-256 hash of every target before and after analysis to prove the file was never modified.
Core CLI Commands
The CLI gives terminal users direct access to REA's analysis pipeline. These commands form the backbone of most investigations.
| Command | Purpose | Example Use |
|---|---|---|
analyze | Full static analysis pass on a target | rea analyze ./targets/app.exe |
inspect | Non-invasive target identification | Format, architecture, imports, strings |
search | Find strings or symbols across the target | Locate error messages, URLs, keys |
function | Summarize a specific function | Inputs, outputs, control flow |
xrefs | Trace cross-references | Find callers and callees of an address |
trace | Runtime observation of selected behavior | Capture execution evidence |
Always begin with inspect before deeper analysis. Determining the file type, architecture, and imported libraries first prevents wasted effort on the wrong assumptions and guides which later commands make sense.
MCP Server Configuration
The MCP server is what lets coding agents call REA tools directly. A typical local registration uses the stdio transport, where the agent launches the server as a child process.
{
"mcpServers": {
"reverse-tools": {
"command": "node",
"args": ["/opt/reverse-tools/dist/index.js"],
"env": {
"REVERSE_WORKSPACE": "/analysis/workspace",
"PATH_ALLOWLIST": "/analysis/workspace/targets"
}
}
}
}
Key configuration principles that keep the setup safe and predictable:
Scope the filesystem
- Allowlist only the targets/ and reports/ directories
- Reject path traversal and symlink escapes
- Keep credentials outside the workspace
Expose narrow tools
- One tool per operation, such as
list_symbolsorfind_strings - Bounded outputs with size and time limits
- Descriptive names and validated input schemas
Gate risky operations
- Auto-approve read-only extraction
- Manual approval for running targets or writing files
- Log every tool call with inputs and exit status
Validate your server with the MCP Inspector before connecting it to an agent. A server that passes a minimal health-check tool in the Inspector will behave predictably inside Claude, Cursor, or Gemini CLI.
The Evidence-First Investigation Workflow
A reliable reverse engineering session moves from low-risk observation to focused investigation to validated conclusions. The agent coordinates tools and summarizes output; you remain responsible for validating behavior.
Identify the target
Request file type detection, compute the SHA-256 hash, and collect size, sections, and imported libraries into a baseline profile.
Map statically
List symbols, extract printable strings, and identify likely initialization, input handling, and error paths without executing anything.
Locate and trace
Use string references and cross-references to narrow a large binary into a focused set of relevant functions, then build a call relationship map.
Observe at runtime
Launch the target in an isolated debugger environment, set breakpoints at selected functions, and capture execution traces tied to specific inputs.
Validate and report
Separate direct observations from interpretations, link each conclusion to an address or artifact, and save a reproducible report package.
Investigation Quality Checks:
- Target hash recorded before and after analysis
- Static map includes symbols, strings, and imports
- Runtime observations link to specific functions and inputs
- Conclusions separated from open questions
- Report, tool logs, and config snapshot saved together
Treat every AI-generated conclusion as a hypothesis until you reproduce it in the disassembler or debugger. Evidence chains exist precisely to prevent plausible-sounding but unsupported claims from entering your final report.
Practical Examples and FAQ
REA's official showcases include analyzing the Chrome Dino game's speed and acceleration rules and reconstructing the Windows Calculator's percentage logic. Both follow the same pattern: ask a narrow question, collect tool-backed evidence, rebuild the behavior, and verify.
Q: What does Reverse Engineer Anything actually recover from a binary?
REA produces an evidence-backed understanding of behavior: function inventories, string references, call relationships, and runtime observations. It does not recover original source code or automate copying of proprietary software.
Q: Do I need both the CLI and the MCP server?
No. The CLI serves terminal-first users, while the MCP server is for AI coding agents. Many workflows use both: the CLI for deterministic stages and the agent for interpretation, planning, and report generation.
Q: Which coding agents work with REA?
The project supports configuration or integration for tools including Claude Code, Cursor, Codex, Gemini CLI, Windsurf, and Devin. Each uses the same local MCP server with its own configuration format.
Q: Why do my agent's conclusions sometimes seem wrong?
The agent only sees the context you provide. If the entire disassembly is dumped into the prompt, unrelated instructions dominate and results degrade. Use narrow, function-level requests and validate important findings directly in the debugger.