sandboxed-re-mcp
Summary: A read-only, security-first reverse-engineering MCP server that statically triages native binaries and APKs (isolating untrusted samples in a no-network bubblewrap chamber), orchestrating Ghidra, r2/rizin, capa, floss and angr behind 7 tools.
re_capabilities— health check reporting which RE backends (Ghidra, r2, capa, floss, angr, jadx, apktool, bwrap) are installed and their versions; call it first.analyze_binary— full host-side static triage of your own/in-scope native binaries (ELF/PE/Mach-O/.so): Ghidra decompilation → capa capabilities → optional floss strings → sink ranking → optional angr symbolic analysis, returning structured JSON of top suspicious functions, capabilities and strings.sandbox_analyze_binary— the same triage but inside a throwaway bubblewrap chamber (--unshare-all, no network, dropped capabilities, cgroup memory/PID/CPU caps, host read-only) for untrusted third-party samples that are never executed.sandbox_selftest— live proof of the shipped sandbox's guarantees (egress fails, host writes fail) without needing an analysis target; reports PASS/FAIL per check.decompile_function— decompile exactly one function (by name or0x...entry address) to C text plus signature via Ghidra headless.list_symbols— fast r2/rizin inventory of functions, imports or strings (seconds, no Ghidra) for a first overview and to pick decompilation targets.analyze_apk— Android APK triage: extractslib/*/*.sonative libraries (optionally filtered by arch) and runs each through the triage pipeline, sandboxed by default, covering the native layer jadx/apktool miss.Constraints/limits: read-only throughout — never patches, rebuilds, or executes the target; long Ghidra-backed calls can take minutes; requires system backends (bubblewrap mandatory for sandbox tools); intended for owned, in-scope, CTF or otherwise lawful targets.
Provides tools for Android native-lib triage, analyzing native .so libraries within APKs to rank suspicious functions and inventory symbols, imports, and strings, sandboxed by default.
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., "@sandboxed-re-mcp sandbox analyze this untrusted binary and rank suspicious functions"
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.
airgap-re
Analyze someone else's binary without handing it your privileges.
A security-first reverse-engineering MCP server. It gives an AI agent (Claude Code, Cursor, any MCP client)a small, read-only set of static RE tools over a proven stack — and runs every untrusted sample inside ano-network bubblewrap chamber that is never executed and whose isolation is proven in CI.
Why · What it is · Architecture · Guarantees · vs. REA · Install · Usage · Layout
Status — v0.1.0, early but gated. The surface is small and the API may still move, but nothing merges unless the isolation proof runs green in CI. We would rather ship a narrow tool whose guarantees are real than a broad one whose guarantees are hopes.
Scope / lawful use. For software you own, in-scope bug-bounty targets, CTFs, abandonware, and interoperability research permitted by law. Read-only by design: it never patches, rebuilds, or executes the target. See
SECURITY.mdand the Threat Model.
A wave of "AI reverse-engineers anything over MCP" tooling is genuinely useful — broad, convenient,
well-packaged. The best-known of them, morluto/rea, covers an
impressively wide surface (native, mobile, web, firmware, network, WASM, managed code).
On raw breadth, REA leads, and this project does not try to match it.
This project makes a different, narrower bet: when you point an analysis tool at a hostile binary, the thing that matters most is isolation and auditability, not feature count. That is exactly the axis where broad orchestrators tend to be weakest — many run their dynamic/runtime paths with your own user privileges and no container at all.
The honest one-liner: REA optimizes for breadth;
airgap-reoptimizes for safety and auditability on the native-static lane, the lane where you actually touch untrusted code.
Put it another way. Most "analyze anything" tools ask what can I analyze? This one also asks what if the file bites back? A glovebox, not an open workbench. When the code is hostile, isolation wins.
A stdio MCP server (Python, one pinned dependency) that orchestrates a pre-existing RE stack:
Backend | Used for |
Ghidra (headless) | per-function decompilation, function inventory |
| full static triage → ranked suspicious functions |
r2 / rizin | fast symbol/import/string inventory |
jadx / apktool (native-lib path) | Android APK native |
bubblewrap (bwrap) | the isolation chamber for untrusted samples |
It contains no RE logic of its own — it is a thin, auditable bridge. That is a deliberate feature: the whole server is small enough to read in one sitting (1,232 lines of own code, across 8 files, behind a single pinned dependency).
MCP tools exposed
Tool | What it does |
| health check: which backends are present + versions |
| full host-side static triage of a native binary (own/in-scope) |
| same triage, isolated (no network, cgroup caps) — for untrusted samples |
| live proof of the isolation guarantees (no analysis target needed) |
| one function → C via Ghidra |
| fast r2/rizin inventory (functions / imports / strings) |
| Android native-lib triage (sandboxed by default) |
The server holds no RE logic; it validates input, picks the trusted vs. sandboxed path, and shells
out to a pre-existing backend stack. The sandbox boundary is the product — everything below
bubblewrap is treated as hostile when the sample is third-party. An untrusted sample.bin goes in;
the network, your ~/.ssh, and your privileges stay unreachable:
flowchart TD
A[MCP client / AI agent] -->|tool call + path| B[re_mcp.server]
B --> V{_validate<br/>abs path, is-file, size cap}
V -->|invalid| E[JSON error]
V -->|valid| P{trusted or untrusted?}
P -->|own / in-scope| H[analyze_binary<br/>host-side triage]
P -->|untrusted| S[sandbox_analyze_binary]
subgraph chamber[bubblewrap chamber: --unshare-all, caps dropped, host read-only, cgroup caps]
S --> T[re_triage.py]
T --> G[Ghidra headless]
T --> C[capa / floss]
T --> N[angr optional]
end
H --> T2[re_triage.py host-side]
B --> R[list_symbols: r2 / rizin]
B --> D[decompile_function: Ghidra]
B --> K[analyze_apk: native .so, sandboxed]
T --> O[(ranked JSON<br/>via /out, host-temp)]
chamber -.no network, no host write.-> X((egress impossible))Full data flow, properties, and the trust boundary: docs/architektur.md.
Every claim below has a test that fails the build if the guarantee breaks
(tests/test_sandbox_isolation.py). The tests drive the
shipped script (engine/sandbox_analyze.sh --selftest), not a hand-rolled command — so the guard
covers the exact code the server runs. Removing --unshare-all from the shipped script turns the
egress test red (verified by sabotage).
Guarantee | How it holds | Test |
No egress | chamber runs |
|
Host read-only | one throwaway |
|
Resource caps | cgroup |
|
Never executed | the pipeline is purely static; the sample is mounted read-only and analysed as data | (by construction) |
Run the proof yourself:
pip install -e ".[dev]"
pytest -v # includes the isolation proof (needs bubblewrap)Non-goal (stated honestly). No custom seccomp-BPF filter is applied. bwrap applies none by
default, and a wrong filter would silently break Ghidra/Python. Isolation here rests on namespaces
(--unshare-all) + capability drop + read-only binds + cgroup limits — not on a syscall filter we
cannot verify. A reviewed seccomp profile is possible future work, not a current claim.
Not a knock on REA — it is static-by-default and leads on breadth. But even its static pass runs with your privileges and the network reachable. Different bets for different threat models.
The left column below is measured by benchmark/run_benchmark.py on
this repo (see benchmark/REPORT.md). The right column is from REA's public
repo / README and our 2026-10-12 tool review — external, not measured here.
Dimension | airgap-re | REA ( |
Tool breadth | native + APK-native (focused) | very broad — REA leads |
Untrusted-sample isolation | bwrap no-net + cgroup, never executed | no sandbox; runtime paths run with your user rights |
Runtime dependencies | 1 direct ( | ~35 npm (per our review, different counting basis) |
Setup footprint | local; does not write into your agent config |
|
Auditability | 1,232 lines of own code, 8 files | large tree (~2,255 files, per our review) |
License | MIT | MIT |
If you need the widest possible toolbox on trusted inputs, REA is a strong choice. If you need to analyse someone else's binary without handing it your privileges, this is built for that.
git clone https://github.com/NEO849/airgap-re
cd airgap-re
python -m venv .venv && . .venv/bin/activate
pip install -e .
# System tools (analysis backends — bring your own, like any RE tool):
# bubblewrap (required for the sandbox), radare2/rizin, Ghidra (headless),
# optional: capa, floss, jadx, apktool, angr venv.
sudo apt-get install -y bubblewrap radare2Register with your MCP client (stdio). Example ~/.claude.json fragment:
{
"mcpServers": {
"airgap-re": {
"type": "stdio",
"command": "/path/to/.venv/bin/python",
"args": ["-m", "re_mcp.server"],
"env": { "REMCP_GHIDRA_HEADLESS": "/opt/ghidra/support/analyzeHeadless" }
}
}
}All paths auto-discover from PATH and common install locations; override any via REMCP_*
environment variables (see re_mcp/config.py). Confirm the wiring with the
re_capabilities tool — it reports which backends are present and their versions.
Run with Docker. A Dockerfile is included and powers the Glama directory build:
docker build -t airgap-re .Point your MCP client at the container instead of a local venv:
{ "mcpServers": { "airgap-re": {
"type": "stdio", "command": "docker", "args": ["run", "-i", "--rm", "airgap-re"]
} } }The image ships bubblewrap; real isolation inside a container needs a privileged runtime
(--privileged or appropriate user-namespace settings), and the heavier backends (Ghidra,
radare2/rizin) are host-installed as above — so for full-capability use the native pip install
path is recommended. The image exists mainly so directory builds (e.g. Glama) are deterministic.
re_capabilities— see what's available.list_symbols— fast overview, pick targets.analyze_binary(own/in-scope) orsandbox_analyze_binary(untrusted) — ranked triage.decompile_function— read the candidates.
Untrusted / third-party samples always go through sandbox_analyze_binary.
re_mcp/ server.py (MCP tools) · config.py (env/auto-discovery)
engine/ re_triage.py · sandbox_analyze.sh · apk_native_triage.sh · ghidra_scripts/
tests/ test_validate.py · test_sandbox_isolation.py (the proof)
benchmark/ run_benchmark.py → REPORT.md
docs/ architektur.md (data-flow diagram) · readme/ (figures)See docs/architektur.md for the data-flow and trust boundaries,
THREAT_MODEL.md for what the sandbox does and does not defend against, and
CONTRIBUTING.md to hack on it.
Built by NEO849. Issues and PRs welcome — start with CONTRIBUTING.md.
MIT — see LICENSE.
Available Tools
7 toolsanalyze_apkA
Android-APK-Triage: zieht native Libs (lib//.so) und jagt jede durch re_triage.py (Ghidra-Dekompilat -> capa/floss -> Sink-Rang). Deckt die native Schicht ab, die jadx/apktool nicht sehen. 'arch' optional, z.B. 'arm64-v8a' (sonst alle). 'sandbox' (Default True): läuft in der bwrap-Kammer (keine Ausführung, kein Netz). READ-ONLY, entpackt nur, führt NICHTS aus der APK aus. Eigene / in-scope APKs.
Inputs: path (required), arch, sandbox. Returns: result
analyze_binaryA
Volle statische Triage eines nativen Binaries (ELF/PE/Mach-O/.so) HOST-seitig via re_triage.py: Ghidra-Dekompilat -> capa-Capabilities -> floss-Strings (opt) -> Sink-Rang -> angr (opt). Liefert strukturiertes JSON (Top-verdächtige Funktionen, Capabilities, Strings). READ-ONLY. Für EIGENE / in-scope / CTF-Binaries. Fremde/untrusted Samples -> sandbox_analyze_binary. Kann mehrere Minuten dauern (Ghidra-Analyse).
Inputs: path (required), floss, symbolic. Returns: result
decompile_functionA
Dekompiliert GENAU EINE Funktion (nach Name oder Entry-Adresse 0x...) via Ghidra-headless -> C-Text + Signatur. 'function' z.B. 'main', 'check_license' oder '0x401160'. READ-ONLY. Kann einige Minuten dauern.
Inputs: path (required), function (required). Returns: result
list_symbolsA
Schnelles Inventar via r2/rizin (ohne Ghidra, Sekunden). kind = 'functions' | 'imports' | 'strings'. Gut für den ersten Überblick / um Ziele für decompile_function zu finden. READ-ONLY.
Inputs: path (required), kind. Returns: result
re_capabilitiesA
Health-Check: welche RE-Backends sind verfügbar (Ghidra/r2/capa/floss/angr/jadx/apktool/bwrap)
Versionen. Immer zuerst aufrufen, wenn unklar ist, was geht.
Inputs: no named parameters. Returns: result
sandbox_analyze_binaryA
Wie analyze_binary, aber ISOLIERT in einer bubblewrap-Wegwerfkammer: --unshare-all (KEIN Netz -> Egress strukturell unmöglich), keine Capabilities, cgroup Mem/PID/CPU-Limits, Host read-only, kein Host-Secret. Für UNTRUSTED / fremde Samples. Braucht bwrap (bubblewrap). READ-ONLY, Ziel wird NIE ausgeführt.
Inputs: path (required), floss. Returns: result
sandbox_selftestA
Beweist LIVE die Isolations-Garantien der AUSGELIEFERTEN Sandbox (keine Analyse eines Ziels): ruft exakt engine/sandbox_analyze.sh --selftest auf — denselben bwrap-Aufbau (inkl. --unshare-all) wie die echte Analyse. (1) Netz-Zugriff schlägt fehl, (2) Host-Schreiben scheitert. PASS/FAIL je Check.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Most tools target clearly distinct operations (capability check, symbol inventory, single-function decompile, full triage, APK triage, sandbox selftest). The main ambiguity is analyze_binary vs sandbox_analyze_binary, whose names are nearly identical, but descriptions strongly disambiguate them via the host-vs-untrusted-sample rule. decompile_function also overlaps with the decompilation phase inside analyze_binary, though its single-target scope keeps it separable.
Names follow a mostly predictable snake_case verb_noun pattern (decompile_function, list_symbols, analyze_binary, analyze_apk, sandbox_selftest). The sandbox_ prefix is used consistently as a qualifier. The only deviation is re_capabilities, which is a noun phrase with a domain prefix rather than a verb_noun action.
Seven tools is well-scoped for a reverse-engineering server: each covers a distinct stage (backend discovery, fast inventory, targeted decompile, full host triage, sandboxed triage, sandbox verification, APK triage). No obvious redundancy or filler tools.
The surface covers the core static RE workflow: discover backends, inventory symbols, decompile a function, run full triage, and do so safely in a sandbox for untrusted samples including APKs. Minor gaps remain, e.g. no explicit cross-reference/call-graph query, no disassembly view, and no dynamic execution, but these are reasonable omissions for a static, read-only toolset.
Maintenance
Related MCP Connectors
Signed sandbox verdicts on any artifact, plus an agent marketplace. No key, no signup, no payment.
Hunt zero-days by talking to binaries. 40+ tools. Hosted, OAuth + SSO, invite: hi@byteray.ai
Read-only smart-contract security intelligence for autonomous agents.
Membrane for AI agents: threat intel you can check, IOC enrichment, pre-install package checks.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables agents to reverse-engineer software across native binaries, managed code, Electron apps, websites, and live runtime behavior, returning findings linked to the evidence and limitations behind each conclusion. It also maintains a durable workspace where those behaviors can be inspected, questioned, compared against real execution, and exported as runnable handoffs.MIT
- AlicenseNot gradedqualityBmaintenanceEnables agents to reverse engineer native binaries, JavaScript/Electron applications, .NET assemblies, web captures, EVM bytecode, and process behavior through a provider-neutral MCP interface. Every result is an evidence envelope stating what was observed, derived, unexamined, or unprovable, with all capabilities gated by a deterministic fail-closed policy engine.Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables AI agents (and a matching CLI) to inspect native binaries, JavaScript/Electron apps, .NET assemblies, Go/Rust/WASM artifacts, EVM bytecode, SQLite databases, recorded crashes, and websites without source code, explaining how features work and returning the evidence and limitations behind each conclusion. Analysis runs locally, using optional Hopper, Ghidra, or IDA providers for native targets.MIT
- 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.12 PyPIApache 2.0