Developer guide / MCP & coding agents

REA MCP tutorial: setup, first analysis, and fixes (Oct 2026)

Install REA for Claude Code, inspect a small JavaScript app, and check the answer against its files.

Updated REA 6.5.0Claude Code setup

In this guide

What is REA MCP, and when would you use it?

REA is an open source project that connects an AI coding assistant to tools for inspecting software. MCP is the connection between the assistant and those tools. You ask a question, the assistant requests an analysis, and REA returns findings with supporting evidence.

Ask about one part of the software: which module handles search, for example, or where an Electron renderer sends an IPC message. You can check the answer against the files and references REA returns. The official REA repository describes the supported target families.

The assistant writes the explanation. REA supplies the observations behind it. Ask for the relevant file, location, or evidence reference whenever the explanation makes a claim about the target.

What should you analyze first?

Start with the JavaScript sample below. You can read every file and compare it with the report without setting up a native analysis engine.

Choose dependencies for the target you have
TargetWhat to prepareWhat you can investigate
JavaScript or Electron filesNode.js, npm, a local directory or ASARModules, imports, entrypoints, static Electron relationships
Native executable or libraryA supported Hopper, Ghidra, or IDA installationFunctions, references, disassembly, pseudocode where available
Website behaviorA Chrome-family browser and the browser workflow's prerequisitesObserved page structure, scripts, and network activity

Keep the first investigation limited to a sample you own. Static JavaScript inspection reads files without executing the application; browser and runtime workflows have different effects. See the JavaScript analysis guide before moving to a larger package.

What do you need before installing REA?

The published 6.5.0 package declares Node.js ^22.19.0 || ^24.11.0 || >=26.0.0. Check the runtime that your terminal actually uses:

shell
node --version
npm --version
npm view rea-agents dist-tags.latest

This guide pins commands to 6.5.0, the published version checked on October 17, 2026. A GitHub main-branch example can describe changes that your installed release does not contain. If npm reports a newer version, read that release's notes before substituting it.

For the client walkthrough, have Claude Code installed and working before adding REA. You can run the standalone JavaScript example below without registering an MCP client.

How do you connect REA to Claude Code?

Use the official npm package, rea-agents. Preview one client's changes first:

shell
npx rea-agents@6.5.0 setup --client claude_code --dry-run

Read the proposed configuration paths and skill destination. Then apply the same scope interactively:

shell
npx rea-agents@6.5.0 setup --client claude_code

Approve the changes you intend to make, then restart Claude Code. Guided setup installs the matching workflow instructions by default. For this JavaScript exercise, leave the optional Hopper installation unselected.

Run these checks after setup:

shell
npx rea-agents@6.5.0 doctor --client claude_code --skill --json
claude mcp list

Doctor checks the registration and prerequisites. After restarting, ask the assistant to find REA's tools and make a read-only call. If it cannot connect, have it report the failure before continuing.

Setup behavior and client IDs: official installation reference. This tutorial's local test covers the standalone CLI, not a live Claude Code session.

How do you run your first JavaScript analysis?

Create a folder named rea-notes-demo with the three files below. The sample has no dependencies. You do not need to run npm install inside it.

text
rea-notes-demo/
  package.json
  index.js
  search.js

package.json

json
{
  "name": "rea-notes-demo",
  "version": "1.0.0",
  "private": true,
  "type": "module",
  "main": "index.js"
}

index.js

javascript
import { searchNotes } from "./search.js";

const notes = [
  { title: "DeepSeek setup", body: "Configure a coding assistant." },
  { title: "REA basics", body: "Inspect local JavaScript files." }
];

export function findNotes(query) {
  return searchNotes(notes, query);
}

search.js

javascript
export function searchNotes(notes, query) {
  const term = query.trim().toLowerCase();
  if (!term) return [];
  return notes.filter((note) =>
    `${note.title} ${note.body}`.toLowerCase().includes(term)
  );
}

Run the analyzer against the folder's absolute path. Save the result outside the target folder so a later scan does not pick up its own report.

Windows PowerShell

powershell
npx --yes rea-agents@6.5.0 analyze-javascript-application "C:/work/rea-notes-demo" --json > application-evidence.json

macOS or Linux

shell
npx --yes rea-agents@6.5.0 analyze-javascript-application "$HOME/work/rea-notes-demo" --json > application-evidence.json

Replace the sample path with the folder you created. On Linux, the analyzer also needs a procps-compatible ps on its PATH. REA writes progress to stderr and the JSON result to stdout, so progress messages can still appear while the file is being saved. These output rules are documented in the static analysis workflow.

Ask the connected assistant a question you can check

After you have connected the MCP server, use a prompt with a bounded task:

text
Use REA to statically analyze the JavaScript directory at
C:/work/rea-notes-demo. Do not execute or modify the sample.

Explain how findNotes reaches the search implementation.
Show the relevant module relationship and source locations.
Separate tool observations from your own reading of the code.
If a claim is outside the returned evidence, say so.
If REA is unavailable, report that instead of using a fallback.

Adapt the path for your system. The prompt describes what to request; it is not a transcript of a completed MCP session.

Looking to try multiple leading AI models in one place? Explore our Coding Plan.

How do you check whether the explanation is correct?

Compare the explanation with the files you just created. index.js imports searchNotes from ./search.js, and findNotes passes the notes and query to that function. In search.js, the code trims and lowercases the query, returns an empty list for an empty term, and checks a lowercased title-and-body string.

You can see that behavior by reading the sample. Check which parts REA actually reported before crediting the tool with the whole explanation. An import relationship shows a static link; it does not show that the function ran or handled every input correctly.

For a larger target, request one feature trace from the actual analysis result. REA's trace_application_feature workflow accepts seeds such as a module or IPC channel. Follow the returned source locations and keep its unknowns in the explanation. The application workflow reference explains why static reachability and observed runtime behavior are different claims.

Read the coverage field too. If coverage is partial, an absent relationship may be something the analyzer never examined.

Can you use REA with DeepSeek?

DeepSeek can provide the model behind a coding assistant, while REA provides tools through that assistant's MCP connection. The client needs a working REA connection, and the model endpoint needs to accept its tool requests.

For Claude Code, set up the model route separately using our DeepSeek in Claude Code guide. Then check REA in the same client session. A working chat response only verifies the model route.

REA's Claude Code troubleshooting notes describe a context problem with third-party endpoints: the client can send the complete REA tool catalog on each request when tool search is disabled. The notes suggest the compact input-schema profile where needed, but explicitly leave a live Claude Code session against DeepSeek's API unverified.

If you encounter that specific problem, preserve the existing REA registration and add this to its env object:

json
{
  "REA_MCP_INPUT_SCHEMA_PROFILE": "compact"
}

This is an environment fragment, not a replacement configuration file. Restart the client and retest. Avoid enabling tool-search features unless the endpoint supports the request blocks they require.

Why is REA installed but still not working?

Check the failing step before reinstalling
SymptomWhat to checkNext action
node or npx is unavailableThe terminal's executable path and Node versionUse a supported runtime; reopen the terminal after changing PATH.
Setup finishes, but the assistant has no REA toolsThe selected client, configuration scope, and active sessionRestart the client, inspect its MCP status, then request a read-only call.
Doctor reports an unhealthy environmentThe failed checks and their scopeRun the check for your selected client or provider. An unused engine failure need not block static JavaScript analysis.
The JavaScript command rejects the inputWhether the input is an absolute directory or ASAR pathUse the application folder for this exercise, rather than a single .js file.
Native analysis cannot startThe selected provider and its installation requirementsCheck that provider's setup. Installing REA alone does not install every engine.
Context fills or compaction repeatsThe client, endpoint, and tool catalog profileFollow the client-specific guidance; for the Claude Code case above, consider the compact profile.
A large MCP result exceeds delivery limitsThe running server's advertised tool schemaIf supported, request summary detail and inspect retained views; keep the returned evidence ID.

Check Windows support for the provider you choose. Windows Ghidra has an experimental scope, and REA cannot install Hopper on Windows. Consult the Windows Ghidra guide before choosing a native target. Large-response handling is covered separately in the MCP contracts.

How do you update or remove REA?

For an npx-based setup, check the published release and preview an update for the client you use:

shell
npm view rea-agents dist-tags.latest
npx rea-agents@latest setup --client claude_code --dry-run

After checking the release notes and proposed changes, rerun without --dry-run, approve the update, and restart the client. Existing registrations stay pinned until refreshed.

The rea update command belongs to an owned global installation. For removal, review the scope of uninstall in the CLI reference; it can remove REA registrations and skills across supported clients. A Claude Code registration created with local scope has a separate removal path. Follow the method you actually used to install it.

Frequently asked questions

Does REA recover the original source code?

REA can inspect supplied source and recover analysis artifacts such as relationships or pseudocode. Treat those as evidence about the supplied target. They do not establish the original source tree, comments, or build process.

Do I need Ghidra to try this tutorial?

No. The sample uses static JavaScript analysis. Add a native engine when your target and investigation require one.

Does local analysis mean my model provider sees no code?

No. The MCP client can send tool results to the model endpoint you selected. Check what the client transmits before analyzing private software. Local tool execution and model-request handling are separate parts of the workflow.

Is installing the REA skill enough?

No. A skill supplies workflow instructions. You still need the MCP server registration for tool calls, or the CLI for a standalone analysis. A native investigation may also require its own engine.

What should you try after the sample?

Try a search handler or a settings loader in a small project you own. Ask which file receives the input and where it passes the value next. Save the report with the project version so you can check the same path again after a change.

For the model setup, continue with DeepSeek in Claude Code. If you are looking for a DeepSeek Coding Plan, check the available offers on pricing.