Reverse Engineer Anything AI: Setup Guide for MCP & CLI - Agentes

Reverse Engineer Anything AI: Setup Guide for MCP & CLI

Learn how Reverse Engineer Anything AI connects coding agents to apps, JavaScript, Electron packages, and native binaries through local CLI and MCP...

2026-10-18
reverse engineer anything Wiki Team
Quick Guide
  • Reverse Engineer Anything AI (REA) is an open-source toolkit that lets AI coding agents analyze software locally.
  • Two interfaces: a CLI for terminal users and an MCP Server for agent tool calls.
  • Supported targets: websites, JavaScript, Electron apps, Android APKs, and native binaries.
  • Evidence-first design: every conclusion must link to recorded evidence, not AI guesses.
  • Quick start: run npx rea-agents@latest setup to install and configure your agent.

What Is Reverse Engineer Anything AI?

Reverse Engineer Anything AI, commonly shortened to REA, is an open-source reverse engineering toolkit built specifically for AI coding agents. It works through two interfaces: a CLI for direct terminal use and an MCP Server that lets agents like Claude Code, Cursor, Codex, Gemini CLI, Windsurf, and Devin request focused analysis operations. The project emphasizes local analysis, evidence chains, and reproducible investigation workflows rather than automatically recovering original source code.

The core idea is simple: instead of giving an AI agent unrestricted access to your system, REA exposes small, clearly scoped tools. The agent can list symbols, find string references, disassemble regions, and summarize call relationships, but every operation passes through a controlled interface you configure.

FeatureDescription
InterfacesCLI + MCP Server
Agent integrationsClaude Code, Cursor, Codex, Gemini CLI, Windsurf, Devin
Target typesNative binaries, Electron apps, JavaScript, websites, APKs
Analysis modeLocal, evidence-based, reproducible
GitHub stars129K+ snapshot listed on the official site

REA's philosophy separates the AI host from the tools that perform analysis. An agent can request a specific operation, such as decompiling one function, without ever receiving unrestricted filesystem or process access.

Design Principle

REA is not a source-code recovery tool. It records evidence chains and supports reproducible investigation, so treat the agent as an analysis assistant rather than an authority on final conclusions.

Core Components: CLI and MCP Server

REA provides two complementary entry points, and understanding when to use each is the foundation of an efficient workflow.

ComponentAudienceBest ForAccess Model
CLITerminal usersScripted triage, batch analysis, quick inspectionDirect commands
MCP ServerAI coding agentsInteractive investigation, tool discovery, agent-driven analysisScoped tool calls

CLI Workflow

  • Deterministic, repeatable commands
  • Ideal for analyze, inspect, search, xrefs, trace
  • Output saved as reports for later review
  • Fits shell pipelines and automation

MCP Workflow

  • Agent discovers tools via MCP configuration
  • Narrow, schema-validated tool calls
  • Evidence returned as structured results
  • Human approval gates for sensitive operations

A typical MCP registration passes only what the server needs: an absolute path to the server entry point, a constrained analysis workspace, and an allowlist for accessible directories. Never grant unrestricted home-directory access to an analysis server.

Security Boundary

Keep credentials and unrelated personal files outside the analysis root. Configure read access for target files and write access for reports only, and disable network access unless a specific workflow requires it.

Step-by-Step: First Analysis with REA

Follow this sequence to go from a clean environment to a validated, evidence-backed analysis report.

1

Prepare an isolated environment

Use a disposable virtual machine or container for unknown binaries. Keep the original target read-only, record its SHA-256 hash, and store analysis output separately from the source file.

2

Install REA and configure your agent

Run npx rea-agents@latest setup, then use rea doctor to diagnose missing dependencies, Node.js version problems, or path errors before your first investigation.

3

Identify the target non-invasively

Determine file format, architecture, imported libraries, symbols, and obvious strings before opening a debugger. This builds a target profile that guides deeper analysis.

4

Request focused analysis

Ask the agent narrow questions: list symbols for a binary, locate references to a specific string, decompile one function, or trace callers of a selected address. Focused requests produce context you can actually validate.

5

Validate and preserve evidence

Recheck important conclusions with the underlying tool, separate confirmed behavior from open questions, and save the report with the target hash so another researcher can reproduce the investigation.

Evidence Rule

Every conclusion should link to a concrete address, function, string reference, or runtime trace. If the agent cannot cite evidence, treat the claim as a hypothesis, not a finding.

Tool Tier List for AI-Assisted Analysis

REA coordinates with established reverse engineering tools. The ranking below uses transparent criteria: platform coverage, automation potential, MCP adaptation difficulty, output quality, and learning cost.

TierToolPrimary RoleAutomationMCP Adaptation
SGhidraIntegrated static analysis and decompilationHighMedium
SGDBInteractive runtime debuggingHighMedium-High
ALLVM ToolchainCompiler infrastructure, binary inspectionVery highLow-Medium
AGNU binutilsCLI symbols, sections, disassembly, stringsVery highLow
BCustom Python scriptsTask-specific parsing and reportsVery highLow
BAI-assisted analysisExplanation and hypothesis generationHighHigh

A tool can rank highly for one stage and lower for another. A decompiler excels at broad static investigation, a debugger at runtime behavior, and compiler utilities at custom automation pipelines. Match the tool to the investigation phase rather than searching for a single winner.

AI's Real Strength

AI-assisted analysis earns its place in Tier B for explanation and planning, not authority. It performs best when supplied with explicit code, metadata, and tool output, and its conclusions always require evidence review.

Troubleshooting Common Issues

Most REA problems fall into predictable categories. Use the symptom-first table below to narrow the cause before applying fixes.

SymptomLikely CauseFirst Check
MCP server exits immediatelyWrong path, missing dependency, stdout pollutionRun the server command manually
Tools not discoveredRegistration after init, invalid schema, client cacheInspect initialization exchange
Incomplete decompilationStripped binary, wrong architecture, obfuscationreadelf -h and section review
Permission deniedFile outside approved workspacels -ld on analysis root
Analysis times outWhole-file analysis for narrow questionAdd range and result limits
Context window overflowEntire binary pasted into promptPass artifact paths, retrieve excerpts

For cross-platform issues, prefer path libraries over manual separator concatenation, and record tool versions, operating system, and environment variables in every report so results remain reproducible across machines.

Keep Context Small

Pass artifact paths and request function-level or address-range excerpts instead of entire disassemblies. A compact investigation ledger with names, addresses, evidence, and open questions keeps long analyses coherent.

Before You Conclude an Investigation:

  • Reproduce key observations with the underlying tool
  • Record target SHA-256 hash with the report
  • Separate confirmed facts from open questions
  • Verify no write access touched the original target
  • Save tool logs and configuration snapshot

FAQ

Q: Does Reverse Engineer Anything AI recover original source code?

No. REA is designed for local analysis, evidence recording, and reproducible investigation workflows. It helps agents understand and document software behavior rather than automatically reconstructing original source code or copying applications.

Q: Which AI coding agents work with REA?

REA supports MCP and CLI connections with tools including Claude Code, Cursor, Codex, Gemini CLI, Windsurf, and Devin. Any MCP-compatible host can register the REA server and discover its exposed analysis tools.

Q: What kinds of targets can REA analyze?

Supported targets include native binaries, Electron applications (ASAR files, package.json, main and renderer processes), JavaScript, websites and browser runtimes, and Android APKs, as demonstrated in official showcases like the Chrome Dino and Windows Calculator cases.

Q: How do I get started with REA?

Run npx rea-agents@latest setup to install the toolkit, then use rea doctor to verify your environment. The official site at rea.tools and the GitHub repository provide documentation, and the Discord community handles installation questions.

Related Articles