re-code-mode
Provides Android APK analysis capabilities, including framework fingerprinting and extraction of endpoints from DEX files, plus Android-specific reverse-engineering playbooks.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@re-code-mode triage ./samples/app and list network-related imports and URLs"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
re-code-mode
A layered reverse-engineering toolbox for AI agents, served through UTCP Code Mode so that big outputs are filtered inside a sandbox instead of flooding your model's context window.
Disassembling a binary, listing imports or dumping strings can easily produce tens of thousands of lines. Classic MCP tool-calling pushes all of that into the model. With Code Mode the agent writes a few lines of TypeScript, the filtering happens locally, and only the answer comes back.
// one round-trip: triage + capability filter + selective strings
const t = await re.re_triage_binary({ path: "/samples/app" });
const imps = await re.re_imports_exports({ path: "/samples/app", filter: "socket|ssl|crypt", kind: "imports" });
const urls = await re.re_extract_strings({ path: "/samples/app", preset: "urls", limit: 10 });
return { arch: t.binary_info.arch, hardening: t.binary_info.security,
net_imports: imps.imports.map(i => i.name), urls: urls.strings.map(s => s.string) };Responsible use. This project is for analysing software you own or are authorised to analyse: security research, malware triage, interoperability, CTFs, education. See DISCLAIMER and SECURITY.md.
Architecture
flowchart LR
A[AI agent] -->|TypeScript| B[UTCP Code Mode sandbox]
B -->|MCP stdio| C[re-code-mode server]
C --> L1[Layer 1: local engines<br/>radare2 · rabin2 · binwalk · upx · unzip]
C --> L2[Layer 2: catalog<br/>300+ community tools, clone on demand]
C --> L3[Layer 3: playbooks and agent skills]
C -.optional.-> R[REA engine<br/>200+ tools]Layer | What it gives you |
1 – Engines |
|
2 – Catalog |
|
3 – Playbooks & skills |
|
Inside Code Mode every tool is prefixed with the manual name, so triage_binary is called as re.re_triage_binary(...).
Related MCP server: Antardrishti
Requirements
Node.js ≥ 18, Python 3, git
radare2(providesr2/rabin2),binwalk,upx,unzip,fileOptional:
jadx,apktool,gdb,frida
Quick start
git clone https://github.com/sosiman/re-code-mode.git
cd re-code-mode
bash scripts/setup.sh --install-system-deps # Debian/Ubuntu; on macOS: brew install radare2 binwalk upx
# optional extras
bash scripts/setup.sh --with-skills # clone third-party agent skills into ./skills-repos
bash scripts/setup.sh --with-rea # install the optional REA engine
npm test # smoke + security regression tests
bin/re-run.sh list
bin/re-run.sh triage ./some-binarysetup.sh writes machine-local .utcp_config.json (git-ignored). If your npm blocks install scripts, approve isolated-vm (the V8 sandbox used by Code Mode) with npm install-scripts approve.
CLI cheat-sheet (bin/re-run.sh)
bin/re-run.sh catalog "ghidra" 5 # search the tool catalog
bin/re-run.sh playbook android_apk # methodology for a target type
bin/re-run.sh triage ./bin # arch, hardening, libs, SHA-256 (<1s)
bin/re-run.sh imports ./bin "socket|ssl" # filtered imports/exports
bin/re-run.sh strings ./bin "https?://" # filtered strings
bin/re-run.sh funcs ./bin "main|auth" # functions (radare2 analysis)
bin/re-run.sh decompile ./bin main # pdf + pdc for one function
bin/re-run.sh apk ./app.apk apis # framework fingerprint + endpoints from DEX
bin/re-run.sh firmware ./fw.bin # embedded files + UPX check
bin/re-run.sh fetch radareorg/radare2-mcp # shallow clone into ./tools-cache
bin/re-run.sh skills android; bin/re-run.sh skill-read leanrea
bin/re-run.sh run 'return await re.re_catalog_categories({});'All arguments are JSON-encoded before being placed in the generated TypeScript, so file names and patterns cannot inject code.
Use it from an agent
Copy skills/re-code-mode into your agent's skills directory (Claude Code, Gemini CLI, Codex, Hermes, … — anything that reads SKILL.md) and set RE_CODE_MODE_HOME to this checkout. The skill teaches the agent the workflow and the Code Mode idioms.
Configuration (environment variables)
Variable | Effect |
| Override the project root (default: auto-detected). |
|
|
| Expose the free-form |
| Keep the offensive-security modules when cloning |
Security notes (short version)
Run it locally for a user you trust; it is not a multi-tenant service.
Analysing hostile samples with any disassembler is risky — use a VM/container.
radare2 command injection, option injection in
git clone, code injection through shell arguments and ReDoS are covered by tests intest/smoke.mjs.
Full details and reporting instructions: SECURITY.md.
Third-party material
Nothing from the projects below is redistributed here. They are fetched on your machine, under their licences:
Catalog sources: zhuyansen/awesome-ai-reverse-engineering, morluto/awesome-reverse-engineering
Skills (optional): aicodeking/leanrea, SimoneAvogadro/android-reverse-engineering-skill, zhaoxuya520/reverse-skill
Engine (optional): morluto/rea (
rea-agentson npm)Runtime: radare2, UTCP code-mode CLI, Model Context Protocol SDK
Contributing
See CONTRIBUTING.md. New engines, playbooks and fixes are welcome.
Disclaimer
This software is provided for lawful, authorised security research, education and interoperability work. You are solely responsible for complying with applicable laws, licences and terms of service. The authors accept no liability for misuse. Do not use it to analyse systems or software you are not permitted to analyse.
License
Available Tools
13 toolsapk_inspectC
Fingerprint an APK/AAR (Flutter, React Native, Hermes, Unity IL2CPP, Kotlin, native libs) and optionally harvest URLs / API routes from its DEX files.
Inputs: path (required), mode.
catalog_categoriesB
List catalog categories and counts.
Inputs: no named parameters.
catalog_searchC
Search the indexed catalog of community reverse-engineering tools, MCP servers and agent skills.
Inputs: type, limit, query, category, +1 more.
disassemble_functionC
Disassemble (pdf) and/or pseudo-decompile (pdc) one function by name or 0x address using radare2.
Inputs: path (required), target (required), mode, max_lines.
extract_stringsC
Extract strings from a binary (rabin2 -zzj) and filter by regex or preset before returning them.
Inputs: path (required), limit, regex, preset, +1 more.
fetch_toolA
Shallow-clone a GitHub repository (from the catalog, 'owner/repo' or a github.com URL) into ./tools-cache. Clone only: nothing is built or executed.
Inputs: repo_or_query (required), mode.
firmware_scanC
Scan a firmware image or packed binary for embedded files/filesystems (binwalk) and UPX packing.
Inputs: path (required).
get_playbookB
Get the step-by-step triage playbook for a target type.
Inputs: scenario.
imports_exportsB
List imports/exports of a binary, filtered with a regex (done in-process so only matches reach the caller).
Inputs: path (required), kind, limit, filter.
list_functionsB
Run radare2 analysis (aa; aflj) and return a filtered function list. only_leaf=true gives call-graph leaves for bottom-up review.
Inputs: path (required), limit, filter, min_size, +1 more.
skill_listB
List markdown/scripts of the agent-skill repositories cloned into ./skills-repos (see scripts/fetch-skills.sh).
Inputs: filter.
skill_readC
Read a file from ./skills-repos by (partial) relative path, optionally filtering lines with a regex.
Inputs: target (required), grep, max_lines.
triage_binaryA
Fast static triage of ELF/PE/Mach-O/DEX: arch, bits, language, hardening flags, linked libs, sections, SHA-256.
Inputs: path (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
The tools split into a discovery tier (catalog_*, get_playbook, skill_*, fetch_tool) and an analysis tier (triage_binary, imports_exports, extract_strings, list_functions, disassemble_function, apk_inspect, firmware_scan), each targeting a distinct artifact or action. Minor overlap: apk_inspect's URL harvesting duplicates extract_strings territory, and triage_binary overlaps with apk_inspect for Android binaries, but descriptions make the intended split clear.
All names are snake_case, but verb placement is inconsistent: verb_noun (list_functions, extract_strings, fetch_tool, triage_binary, disassemble_function) mixed with noun_verb (skill_list, skill_read, apk_inspect, firmware_scan) and noun_noun (catalog_categories, imports_exports). Still readable, but an agent can't predict the prefix from the resource.
13 tools sits comfortably in the well-scoped range, forming a coherent pipeline from catalog discovery through skill reading and repo fetching to binary triage and function-level analysis. Each tool covers a distinct stage or artifact type without filler.
The surface covers the full workflow: find a tool, fetch it, fingerprint it, list imports/strings/functions, and disassemble. Gaps are minor but real: no cross-reference/xref tool (only leaf detection in list_functions), no raw byte read or byte-pattern search, and no way to inspect a function not reachable by name or address.
Related MCP Connectors
Autonomous agent guardrails, bash sandboxing, MCP rugpull diffing & prompt firewalls.
Pre-execution governance for AI agents. Deterministic PASS/FAIL/REVIEW verdicts, replayable proof.
Formally-verified injection/exfiltration detector for AI agents (MCP-02).
Hunt zero-days by talking to binaries. 40+ tools. Hosted, OAuth + SSO, invite: hi@byteray.ai
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA headless Ghidra server that enables AI agents to perform deep reverse-engineering tasks such as disassembly, decompilation, and patching via the Model Context Protocol. It supports extensive automation of analysis workflows in sandboxed environments through a catalog of over 200 specialized tools.200GPL 2.0
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to locally analyze and reverse engineer binaries through a compact 12-tool MCP interface for triage, function discovery, disassembly/decompilation, cross-references, strings/imports, call graphs, memory reads, annotations, and binary diffs.1MIT
- AlicenseAqualityBmaintenanceEnables AI agents to run read-only static reverse-engineering tasks — binary triage, symbol and import inventory, per-function decompilation, and Android native-lib analysis — with untrusted samples confined to a no-network bubblewrap chamber that never executes the target.7MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to reverse-engineer binaries they own or are authorized to test, exposing static analysis through Ghidra or IDA (functions, strings, xrefs, decompilation, disassembly, raw bytes) plus controlled Windows Sandbox runs. Every recorded claim must cite quoted evidence and addresses, which a verifier checks, and unexamined areas are reported as unknown rather than clean.26 PyPIApache 2.0