- Reverse engineer anything games by connecting AI coding agents through REA's local CLI and MCP Server
- Two interfaces: CLI for terminal users, MCP Server for agent tool calls
- Local-first analysis: all evidence stays on your machine with reproducible investigation logs
- Supported targets: native binaries, JavaScript, Electron apps, websites, and browser runtimes
- Start fast: run
npx rea-agents@latest setupto initialize your environment
What Reverse Engineer Anything Games Means in REA
Reverse Engineer Anything (REA) is an open-source reverse engineering toolkit built for AI coding agents. When you reverse engineer anything games, you use REA's CLI + MCP Server combination to let agents like Claude Code, Cursor, Codex, Gemini CLI, Windsurf, or Devin analyze game binaries, JavaScript bundles, Electron packages, and browser runtimes. The project emphasizes local analysis, evidence chains, and reproducible investigations rather than automatic source recovery.
The official site reports roughly 129K GitHub stars, six or more agent integrations, and twenty-plus supported locales, making it one of the most widely adopted toolkits in this space.
| Target Type | What You Analyze | Typical Tools |
|---|---|---|
| Native game binaries | Functions, strings, cross-references, disassembly | Ghidra, objdump, GDB |
| Electron game clients | ASAR archives, main/renderer processes, IPC | ASAR tooling, DevTools |
| JavaScript games | Bundles, source maps, runtime behavior | Browser DevTools, trace tools |
| Browser runtimes | Game loops, speed parameters, rendering logic | Runtime tracing, breakpoints |
| Android APKs | Resources, manifest, DEX code | APK unpackers, decompilers |
REA does not recover original source code or clone software. It builds an evidence-backed understanding of how a game works so you can document behavior or rebuild a similar mechanic cleanly.
Setup: CLI and MCP Server Configuration
Getting started follows two tracks. The CLI serves terminal users directly, while the MCP Server lets coding agents call analysis tools through structured, permission-scoped requests.
| Setup Task | Command or File | Purpose |
|---|---|---|
| Quick install | npx rea-agents@latest setup | Initialize REA and configure agents |
| Environment diagnosis | rea doctor | Detect missing Node.js, paths, dependencies |
| MCP registration | Host MCP config JSON | Register the server via stdio transport |
| Server testing | npx @modelcontextprotocol/inspector | Verify exposed tools and schemas |
| Baseline evidence | sha256sum <target> | Confirm the target never changes |
Prepare an isolated environment
Use a disposable VM or container for unknown game binaries. Keep the original target read-only, record its SHA-256 hash, and separate analysis output from the source file.
Install and verify the toolkit
Run the REA setup command, then use rea doctor to confirm Node.js, permissions, and tool paths are correct before connecting any agent.
Register the MCP Server
Add the server command, arguments, and a restricted workspace path to your agent's MCP configuration, then restart the host so tools appear in the agent's tool list.
Confirm tool discovery
Use the MCP Inspector to connect, review the exposed tools, and test one small read-only call before launching full analysis.
Never pass unrestricted home-directory access to the MCP server. Configure an explicit analysis root, and reject paths outside it to prevent symbolic-link escapes.
The Six-Phase Game Analysis Workflow
A reliable workflow moves from low-risk observation to validated conclusions. The agent coordinates tools and summarizes output; you stay responsible for validating behavior.
Phase 1-2: Identify + Static Analysis
- File type, architecture, SHA-256 hash
- Symbols, imports, strings, sections
- Build a target profile before execution
Phase 3-4: Locate + Dynamic Analysis
- Cross-references and call graphs
- Isolated debugger breakpoints
- Compare runtime behavior with static hypotheses
Phase 5-6: Hypothesis + Report
- Smallest controlled patch on a copy
- Separate observations from interpretations
- Reproducible evidence package
| Phase | Agent Tasks | Deliverable |
|---|---|---|
| Identify baseline | File detection, hash, sections, imports | Target profile |
| Static analysis | Symbol lists, string extraction, entry points | Static overview |
| Trace relationships | Caller/callee queries, reference search | Call relationship map |
| Dynamic analysis | Breakpoints, registers, memory inspection | Runtime evidence |
| Test hypothesis | Minimal patch, before/after comparison | Documented behavior diff |
| Report | Evidence linking, artifact indexing | Final report with limitations |
REA's evidence-chain model exists to stop AI agents from guessing. Every conclusion must link to an address, artifact, or runtime trace you can reproduce yourself.
Case Studies: Game Mechanics Under the Lens
Official showcases demonstrate the workflow on two familiar targets, and both translate directly to game reverse engineering.
| Case | Question Investigated | Method |
|---|---|---|
| Chrome Dino | Speed growth rules, max speed, acceleration parameters | Browser runtime analysis, then rebuild an adjustable-speed version |
| Windows Calculator | Why percent behaves differently in additive vs multiplicative chains | Binary function tracing and logic comparison |
Both cases follow the same pattern: pick a narrow question, gather tool-backed evidence, validate the finding, then optionally rebuild the mechanic to confirm understanding.
Asking an agent "how does this game work" produces noise. Ask "what function controls enemy spawn rate" and map every answer back to a function address or trace.
Troubleshooting Common Failures
Most failures fall into predictable groups. Diagnose by symptom first, then apply the narrowest fix.
| Symptom | Likely Cause | First Fix |
|---|---|---|
| MCP server exits immediately | Wrong path, missing dependency, stdout log corruption | Run the same command manually as the agent user |
| Agent sees no tools | Registration after init, invalid schema, cached capabilities | Restart client; verify schema with Inspector |
| Decompilation unreadable | Stripped binary, wrong architecture, obfuscation | Confirm format with file and readelf first |
| Permission denied | Target outside approved workspace root | Move inputs into the configured analysis directory |
| Analysis times out | Whole-file analysis for a narrow question | Add range, section, or max-result parameters |
| Context too large | Entire disassembly pasted into prompt | Pass artifact paths and retrieve excerpts only |
Before Every Investigation:
- Record the target SHA-256 hash
- Confirm file type and architecture
- Verify the MCP server tool list
- Restrict analysis to an approved workspace root
- Save command outputs to a reports directory
Require manual approval before executing unknown binaries, attaching debuggers to system processes, or writing outside the temporary workspace.
FAQ
Q: Can I use Reverse Engineer Anything on commercial games?
REA can analyze game binaries, JavaScript, and Electron clients, but it is designed for local analysis and evidence-based understanding, not for copying software. Respect the target software's license terms and applicable laws in your jurisdiction.
Q: Which AI agents work with REA?
REA connects through CLI and MCP workflows and supports integrations including Claude Code, Cursor, Codex, Gemini CLI, Windsurf, and Devin, with configuration patterns documented on the official GitHub repository.
Q: Do I need Ghidra or a debugger separately?
REA orchestrates analysis workflows, while dedicated tools such as Ghidra for static analysis and GDB for dynamic debugging handle the heavy lifting. REA's MCP layer exposes those capabilities to your agent with scoped permissions.
Q: How do I stop the agent from hallucinating findings?
Use narrow, tool-backed requests, require every conclusion to cite an address or artifact, and re-verify important results yourself in the disassembler or debugger. The evidence-chain workflow is designed specifically to prevent guess-based conclusions.