Reverse Engineer Anything with Claude Code: Setup - エージェント

Reverse Engineer Anything with Claude Code: Setup

Learn how to use Reverse Engineer Anything (REA) with Claude Code through MCP setup, CLI commands, evidence-based workflows, and practical analysis tips.

2026-10-18
reverse engineer anything Wiki Team
Quick Guide
  • Reverse Engineer Anything (REA) connects Claude Code to reverse engineering tools via MCP and CLI.
  • Two interfaces: run terminal commands directly or let the agent call MCP tools.
  • Evidence-based workflow: every conclusion links to addresses, strings, or runtime traces.
  • Local-first analysis: targets stay on your machine; work in an isolated workspace.
  • Start fast: npx rea-agents@latest setup bootstraps the environment.

Why Use Claude Code with Reverse Engineer Anything?

Reverse Engineer Anything is an open-source toolkit built for AI coding agents. Instead of manually wrestling with disassemblers and string dumps, you let Claude Code coordinate the investigation while REA supplies the tooling through a local MCP server and CLI. The project supports multiple agents, including Claude Code, Cursor, Codex, Gemini CLI, Windsurf, and Devin, but Claude Code's MCP client support and skill system make it one of the smoothest integrations.

The core value is the evidence chain. REA is designed around reproducible investigations: the agent records what it observed, where it found it, and how conclusions were validated, rather than guessing at behavior. Everything runs locally, which keeps your analysis targets and findings on your own machine.

MCP Server

  • Agent calls typed tools
  • Scoped filesystem access
  • Structured, bounded results

CLI

  • Direct terminal commands
  • Scriptable pipelines
  • Human-in-the-loop control

Evidence Records

  • Address-linked findings
  • Reproducible reports
  • Separates fact from inference
Integration Note

REA also works with Cursor, Codex, Gemini CLI, Windsurf, and Devin. The MCP configuration pattern is nearly identical across hosts, so skills you build for Claude Code transfer easily.

Setup: Connecting REA to Claude Code

Getting REA running with Claude Code follows the same pattern as any MCP server registration. The recommended entry point is the setup command, which handles environment checks and agent configuration detection.

1

Verify prerequisites

Confirm Node.js and npm are installed and up to date. REA also relies on local analysis tooling, so check that your platform's disassembler or debugger dependencies are present before the first run.

2

Run the setup command

Execute npx rea-agents@latest setup. This initializes the workspace, confirms the installation plan, and detects which coding agents are available for configuration.

3

Register the MCP server

Add the REA server to Claude Code's MCP configuration, pointing it at your approved analysis root. Pass only the directories and environment variables the server actually needs.

4

Confirm tool discovery

Restart the host and verify that REA's tools appear in Claude Code. Test with a minimal, read-only call before launching any real investigation.

5

Diagnose if needed

If anything fails, run rea doctor to check for missing dependencies, path errors, or Node.js version problems, then retry.

Setup StageCommand / ActionExpected Result
Installnpx rea-agents@latest setupInitialized workspace, agent detected
Diagnoserea doctorDependency and path report
VerifyRestart Claude Code, list toolsREA tools visible to agent
TestMinimal read-only tool callStructured result returned
Security First

Only expose the analysis workspace to the MCP server. Keep credentials, personal files, and unrelated repositories outside the server's working directory, and require manual approval before executing unknown binaries.

What REA Can Analyze with Claude Code

REA covers a wide range of targets. The analysis method changes per target type, so match your questions and tools accordingly.

Native Binaries

  • Functions and symbols
  • Strings and xrefs
  • Disassembly, call graphs

Electron Apps

  • ASAR extraction
  • Main/Renderer/Preload
  • IPC and source maps

JavaScript / Sites

  • Bundle inspection
  • Runtime behavior
  • Browser execution paths

APKs & Games

  • Package structure
  • Assets and logic
  • Parameter discovery

Official showcases illustrate the depth: analyzing the Chrome Dino game's speed growth rules and maximum speed parameters, and reconstructing the Windows Calculator percent-key logic across addition and multiplication contexts. Both cases demonstrate the pattern of locating behavior, collecting evidence, then rebuilding a verifiable version.

Target TypeKey Analysis FocusTypical Evidence
Native binaryFunctions, imports, call relationshipsAddresses, xrefs, traces
Electron appEntry points, IPC channelsASAR contents, source maps
Website / JSBundles, network calls, runtime stateScripts, console traces
APKManifest, resources, logicPackage files, smali/JS
Evidence Over Guesswork

Ask Claude Code for focused, tool-backed observations. A request like "find references to this string" produces verifiable output; asking it to "explain the whole program" invites speculation.

The Investigation Workflow

A reliable REA session with Claude Code moves from low-risk observation to validated conclusions across six phases.

1

Identify the target

Record file type, architecture, size, and SHA-256 hash. Create a baseline profile before any deep analysis.

2

Static analysis

List symbols and imports, extract strings, inspect sections and entry points to build an initial code and data map.

3

Locate and trace

Search for references to selected strings or imports, then trace callers and callees to narrow the binary to relevant functions.

4

Dynamic analysis

Run the target in an isolated, controlled environment with breakpoints. Compare observed runtime behavior against static hypotheses.

5

Test hypotheses

Apply the smallest controlled modification to a copy, then compare behavior between original and modified versions.

6

Report and validate

Separate direct observations from interpretations, link each conclusion to an address or artifact, and save a reproducible report.

Useful CLI commands that pair well with agent-driven analysis:

CommandPurposeOutput
file <target>Identify format and architectureELF, PE, Mach-O classification
sha256sum <target>Preserve integrity baselineStable digest for comparison
strings -a -n 6 <target>Discover readable stringsPaths, messages, URLs
objdump -d -M intel <target>Quick disassembly reviewAssembly text
gdb -q <target>Runtime inspectionInteractive debug session
Context Management

Pass artifact paths and retrieve excerpts instead of pasting full disassembly into the conversation. Keep a compact investigation ledger with names, addresses, evidence, and open questions so long sessions stay coherent.

Troubleshooting Common Issues

SymptomLikely CauseFix
MCP server exits immediatelyWrong path, missing dependency, stdout pollutionUse absolute paths; send logs to stderr; test manually
Tools not discoveredRegistration after init, invalid schemaRegister tools at init; validate schemas; restart client
Decompilation incompleteStripped or obfuscated binaryConfirm architecture; load symbols; verify dynamically
Permission deniedFile outside approved workspaceMove inputs into the analysis root; grant least access
Analysis times outWhole-file jobs, no limitsAdd range and result limits; split into bounded jobs
Context window overflowEntire binary in promptUse path references and function-level queries
Reproduce Before You Trust

Treat Claude Code as an analysis assistant, not an authority. Reproduce important conclusions with the underlying tool—a debugger, disassembler, or test input—before treating them as confirmed behavior.

Every REA Investigation Should End With:

  • Baseline profile with hash and format recorded
  • Evidence linked to specific addresses or artifacts
  • Confirmed behavior separated from open questions
  • Reproducible report saved with tool logs
  • Original target verified unchanged via hash

FAQ

Q: Does Reverse Engineer Anything recover original source code?

No. REA is built around evidence-based analysis and reproducible investigation workflows. It helps agents understand and document how software works locally, rather than automatically recovering original source or copying software.

Q: How does Claude Code connect to REA?

Through REA's MCP server registered in Claude Code's MCP configuration, plus the CLI for direct terminal work. Run `npx rea-agents@latest setup` to initialize, then confirm the server's tools appear in the agent.

Q: Is analysis done locally?

Yes. The project emphasizes local analysis with evidence chains and reproducible investigation flows. Targets and findings stay on your machine inside an approved workspace.

Q: Where do I get help with setup problems?

Run `rea doctor` for dependency and path diagnostics first. For further support, use the official GitHub Issues, the rea.tools website, or the official Discord community linked on the site.

Related Articles