rea-mcp
by Muwei-TA
README.md
# rea-mcp
MCP server wrapping the [rea-agents](https://github.com/Muwei-TA/rea) CLI
(REA: Reverse Engineer Anything) using [FastMCP](https://github.com/PrefectHQ/fastmcp).
Every `rea` CLI command is exposed as an MCP tool. Tool names, descriptions and
JSON Schemas are generated dynamically from `rea --llms` and
`rea <command> --schema`, so a rea release upgrade adds tools without any code
change here.
## Prerequisites
- Python 3.10+
- Node.js 22.19+ (or 24.11+ / 26+) — required by the rea CLI
- The `rea` CLI: `npm i -g rea-agents`
The server resolves the CLI in this order:
1. `REA_MCP_CLI` environment variable (path to `rea`/`rea-agents` executable or
the package's `scripts/rea.mjs`)
2. `rea` / `rea-agents` on `PATH`
3. A cached `npx` install under the npm cache (`npm_config_cache` or `~/.npm`)
## Install
```bash
pip install -e .
```
## Run
```bash
# stdio (for MCP clients)
rea-mcp
# HTTP
rea-mcp --transport http --host 0.0.0.0 --port 8000
```
## Tools
One tool per rea CLI command (145+ in rea 6.5.0), named `rea_<command>` with
dashes replaced by underscores, e.g.:
- `rea_analyze` — app overview
- `rea_analyze_javascript_application` — statically reconstruct a JS/Electron app
- `rea_inspect_go_binary` / `rea_inspect_rust_binary` — embedded build metadata
- `rea_search` / `rea_function` / `rea_decompile` / `rea_xrefs` — native analysis
- `rea_inspect_sqlite_database` — SQLite snapshots
- `rea_inspect_managed_artifact` / `rea_inspect_managed_members` — .NET assemblies
- `rea_inspect_wasm_artifact` / `rea_inspect_evm_interface` — WASM / EVM
- ADB/Android, browser observation, packet captures, Evidence import/export/compare …
Arguments map directly to the CLI: positional arguments keep their names, and
camelCase options become kebab-case flags (e.g. `caseSensitive: true` →
`--case-sensitive`, `sourcePath: ["a.js"]` → repeated `--source-path a.js`).
All tools return the command's JSON output.
### Provider-dependent commands
Native deep-analysis commands (`analyze`, `search`, `decompile`, …) require an
analysis engine: Ghidra (`GHIDRA_INSTALL_DIR`), Hopper, or IDA
(`REA_IDA_MCP_CONFIG`). Commands that need no engine (`inspect-go-binary`,
`inspect-sqlite-database`, `inspect-managed-*`, JavaScript reconstruction, …)
work out of the box. Run `rea doctor` through your MCP client, or check
`rea providers`, to see what is available.
### Skipped commands
`setup`, `uninstall`, `update`, `completions` and `mcp` are lifecycle/integration
commands and are intentionally not exposed as tools.
## License
MIT
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo issues