android-reserve-mcp
Provides tools for inspecting Android APKs, DEX, manifests, signatures, resources, native libraries, WebView sessions, ADB devices, and Frida-based runtime observation.
Supports C/C++ native analysis via ELF/JNI and native function inspection.
Covers Flutter/Dart bytecode analysis through the Flutter/Dart engine support.
Supports optional Flutter engine probing and analysis for Flutter apps.
Supports optional Hermes engine probing and fixed-CLI analysis, including Hermes bytecode sample handling.
Provides static indexing and analysis of JavaScript/TypeScript/JSX/Flow scripts, formatting, source-map mapping, and related WebView/Hermes inspection.
Analyzes Kotlin metadata in Android DEX, including suspend/inline functions, coroutines, and Compose candidates.
Provides React Native/WebView coverage as part of Android/JS analysis, with documented limitations.
Provides Rust metadata interfaces for native ELF analysis.
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., "@android-reserve-mcp inspect /apk-projects/app.apk and summarize its manifest and signature"
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.
android-reserve-mcp
聚焦Android产物、DEX、JS、SO、资源和运行观测的MCP服务。使用本地CLI和静态解析器,复杂查询按需启动REA后端;对模型提供20个分组入口,避免加载整个通用逆向工具集。
当前 GitHub Release 为 v0.5.2:下载 Release,源码仓库:lonnnnnng/android-reserve-mcp。0.5.2尚未发布到 npm registry;可从 GitHub Release 下载 tarball,或按下方说明从源码运行。版本变更及验证边界见变更记录、实施进展和验证记录。
OpenCode 连接名和专用模式名均为 android-reserve,协议服务名与 npm 包名为 android-reserve-mcp。OpenCode 工具前缀为 android-reserve_。各类应用的覆盖范围见 能力与限制。
先准备环境
完整能力依赖与安装检查见 环境与工具依赖。 最小启动需要 Node.js ≥26.12.1;APK 摘要需要 Python ≥3.11。完整静态分析还需要完整 JDK 17+、JADX CLI、apktool、Android SDK、ripgrep、LLVM readelf,以及 REA 6.9.0 和独立的 JADX headless MCP 0.7.1 JAR。动态分析还需要 Frida Node binding 和可连接的 Android 设备环境。
发布后可通过npm install android-reserve-mcp安装CLI;首发前请按下方步骤从源码运行,或从Release候选tarball安装。npm/GitHub首次发布状态见首发待办。
JS分析依赖随npm安装,不需要浏览器。Native函数分析需要配置可用provider;本机已验证Ghidra12.2、macOS ARM64原生decompiler及独立JDK25。Hermes HBC84、Flutter/Dart3.11.5、ILSpy托管程序集、Godot4.3脚本字节码已有自有样本通过;这不等于完整RN/MAUI/游戏恢复。可选环境、固定参数和安装记录见 引擎说明与引擎安装。
安装本项目依赖:
cd /absolute/path/android-reserve-mcp
npm ci --ignore-scripts
node src/cli.js --help上面跳过依赖安装脚本,可用于基础静态能力与自动测试。java-methods/trace-java还需要frida-compile的Node原生binding;本仓库npm 11配置已锁定允许frida@17.26.3。安装后用npm install-scripts ls确认授权,再执行npm rebuild frida --ignore-scripts=false并验证binding可导入。若作为依赖装入另一个npm项目,项目级授权不会继承;需在那个项目确认锁文件中Frida确为17.26.3后,显式批准该包脚本。设备注入仍由REA的Frida17.23.2完成,勿因此更换设备server版本。安装条件和许可见环境文档。
在 MCP 客户端配置中合并下面的服务器项,替换两个绝对路径,不覆盖原有服务器或模型设置:
{
"mcp": {
"android-reserve": {
"type": "local",
"command": ["node", "/absolute/path/android-reserve-mcp/src/cli.js", "--allowedRoots", "/absolute/path/apk-projects"],
"enabled": true,
"timeout": 30000
}
}
}这是 OpenCode 的格式;通用 stdio 客户端使用相同 command/args,参见 示例。启动命令保持运行等待 MCP 消息是正常现象。先让客户端调用 doctor,再分析 APK。
Related MCP server: OpenAPK
工具入口
工具 | 能力 |
| 检查依赖路径、headless JAR 校验、后端状态,不连接设备 |
| ZIP/DEX/ABI/SHA256、Manifest、签名复验 |
| JADX Java 导出、apktool 资源/smali 解包,可报告部分成功 |
| 类/方法/静态引用、mappingPath;Kotlin原始metadata/suspend/inline、协程/Compose候选及JavascriptInterface声明 |
| APK集合包名/长版本/签名/split依赖校验、聚合DEX/分模块资源、AAB派生与APKS显式设备spec选择 |
| store v1/v2/v3、ELF封装与XALZ/LZ4、XAZS/Zstd有界提取 |
| 显式设备/包/PID的已开放WebView调试会话,DOM/源码/网络与正文采集 |
| 跨任务内容哈希、签名、词法绑定、受限运行调用ID的持久证据索引 |
| 导出源码的文本检索,给出文件和行号 |
| 解码资源并按语言分页读取字符串; |
| ELF/JNI;独立target的函数清单、伪代码、引用/callers/callees、provider状态;Go/Rust元数据接口 |
| 文件/目录/嵌套归档索引、magic/ABI/框架候选、按chain安全提取 |
| JS/TS/JSX/Flow静态索引、格式化及显式source map位置映射 |
| 可选引擎状态/探测/固定CLI分析:Hermes、Flutter、ILSpy、Godot、IL2CPP、Ark |
| ADB 列设备、属性、包、进程、有限 logcat,只读操作 |
| attach/spawn、Java精确方法观测、动态JNI注册/撤销、导出名或模块RVA Native观测、Java↔Native同调用关联、load/unload/resume/status/close |
| apktool 重建、zipalign、自选 keystore 签名并复验 |
| 任务列表、状态、取消 |
| 列任务文件,按字节分页读取结果/日志/源码 |
| 按需读取本地 Android 逆向 Skill 与参考资料 |
一个完整调用流程
工具参数示例(在客户端发起工具调用,并非 shell 命令):
{"tool":"apk","arguments":{"action":"inspect","path":"/absolute/path/apk-projects/app.apk"}}长任务立即返回 id。把它作为 jobId 查询:
{"tool":"jobs","arguments":{"action":"status","jobId":"<返回的 id>"}}
{"tool":"artifacts","arguments":{"action":"read","jobId":"<返回的 id>","path":"result.json","offset":0,"limit":12000}}根据 nextOffset 继续读取。succeeded、partial、failed、canceled、interrupted 是不同终态;失败先看 error 和任务日志,不能仅凭拿到 id 判断成功。
建议:doctor → artifact → apk/decode/dex/script/native/framework → artifacts。artifact的框架指纹是候选;source map、静态引用和运行证据有不同语义,不能相互冒充。Native用法见 引擎说明。
Frida:先明确设备与目标;spawn 创建暂停进程,读取任务结果中的 session_id 后执行 load → resume → status → close。attach 对已运行进程操作,不需要 resume。脚本可能改变目标行为,服务不会自行生成或加载绕过脚本。
Java专项:默认先java-methods读取app loader的真实重载;自定义loader先java-loaders复制唯一selector,再读取真实重载,卸载枚举脚本,再以显式argumentTypes调用trace-java。需要关联JNI时,使用该action的nativeHooks,不要另load一份Native脚本后按时间猜关联。加载成功只说明脚本被接受,spawn须先resume,再从status确认java-hook-installed和实际事件;详见Java/JNI调用示例。
隐藏JNI专项:spawn后先trace-jni并确认ready再resume;匹配注册尝试与成功返回,取得类/方法/签名/模块RVA。卸载观测后,以相同模块RVA进行Native或Java联合追踪。RVA栈为候选地址,不能冒充精确调用链;完整流程、预算与边界见动态JNI说明。
CLI 与数据位置
参数 | 说明 |
| 允许输入的目录,可重复;默认启动时 cwd |
| 分析工作目录,默认 |
| 本地 Skill 根目录,可重复;默认 |
| 禁用后端,只使用本地能力 |
| 查看版本/参数 |
任务写入 workspace/jobs/<id>/,不会自动删除。允许目录与工作目录使用 realpath 校验;产物读接口限定在对应任务目录。工作目录本身也可作为后续输入。此路径限制不能约束 Frida 脚本在目标进程中的行为,服务也不是执行不可信 APK 解析器的操作系统沙箱。
文档与验证
新增能力与调用步骤:分包、Kotlin、自定义loader、WebView、程序集与持久证据。
环境与完整依赖:按能力安装、动态设备条件、版本、故障排查。
架构:按需后端、队列、进程与产物边界。
能力与限制:Java/Kotlin、C/C++、React Native/WebView 的实际覆盖。
全技术栈缺口清单:原生、跨平台、Web混合、游戏及Harmony的待补能力与候选引擎。
维护手册:OpenCode 模式、自定义、升级、发布准备。
验证记录:实测项目及未验证边界。
GitHub样本验收:公开样本的固定commit、产物哈希、真机范围与失败边界。
npm run check
npm test
node scripts/smoke.mjs
npm run check:pack
npm run smoke:releasenpm test 使用自有样本和模拟后端,不连接设备;smoke:release会在临时目录安装实际npm tarball并验证stdio工具清单。完整静态 smoke 需要静态工具链、Android SDK platform 和headless JAR,生成自有APK/临时签名,不安装或启动APK。
MIT © long。
Available Tools
20 toolsapkBRead-only
APK ZIP/DEX/ABI 摘要、签名复验或 Manifest 摘要。返回任务;随后读 result.json。
Inputs: path (required), action (required).
artifactADestructive
按内容识别产物、嵌套包/模块/ABI与框架候选;支持文件或目录。extract按inspect返回的chain定向提取到任务目录,不覆盖原文件。
Inputs: path (required), action (required), chain.
artifactsARead-only
列任务产物或按字节 offset 读取文件;只读本服务任务目录,最多 32KB 一页。
Inputs: jobId (required), action (required), path, limit, +1 more.
decodeBDestructive
JADX/apktool 解包到独立任务目录;报告部分失败,不覆盖已有工程。
Inputs: path (required), engine, timeoutSeconds.
deviceBRead-only
ADB 设备列表或明确 serial 的 getprop/packages/processes/logcat;不安装/卸载。
Inputs: action (required), limit, serial.
dexCRead-only
精确DEX类/方法/引用;kotlin读取原始metadata/suspend/inline/JVM签名、协程/Compose候选及JavascriptInterface声明。class/method可用mappingPath。
Inputs: path (required), action (required), query, className, +3 more.
doctorARead-only
检查本机 Android 依赖、允许目录和后端状态;不连接设备或启动 REA。
Inputs: no named parameters.
evidenceCRead-only
合并已完成任务的持久证据索引,按内容哈希/签名/同脚本调用ID查询;不把时间接近、相同路径或PID当跨任务关联。
Inputs: action (required), kind, limit, query, +3 more.
frameworkADestructive
列可选引擎/探测/分析:Hermes、Blutter、ILSpy、GDRE、IL2CPP、Ark。仅调用配置好的固定CLI,不自动安装。Blutter需显式允许下载构建。
Inputs: action (required), path, engine, metadataPath, +1 more.
fridaBDestructive
明确设备的attach/spawn/load/resume/status/close;java-loaders枚举唯一selector,java-methods读取默认或显式唯一loader方法重载,trace-java需显式argumentTypes,可同agent nativeHooks按线程/调用范围关联JNI。trace-jni观测未来动态注册/撤销;Native选择symbolName或模块rva二选一,未加载模块等待时间有限且可缩短。unload只撤销本服务scriptId。
Inputs: action (required), pid, rva, deviceId, +18 more.
guidanceBRead-only
列或按需分页读取本地 Android 逆向 Skill/参考文档;不自动执行其中命令。
Inputs: action (required), name, path, limit, +1 more.
jobsBDestructive
列任务、查状态或取消长任务;长结果不直接塞进上下文。
Inputs: action (required), jobId.
managedBDestructive
离线inspect/extract已核验的.NET assembly store或XALZ/XAZS压缩程序集;支持有_assembly_store符号的ELF封装,不执行目标。提取后用framework.ilspy分析PE/CLI。
Inputs: path (required), action (required).
nativeCDestructive
ELF/JNI/Go/Rust;open独占后端并返回任务,结果含targetId。随后functions/function/references/callers/callees/status,最后close;providers检查引擎。
Inputs: action (required), path, provider, targetId, +3 more.
packagesCDestructive
对显式所选APK集合校验包名/版本/全部签名证书/split依赖;APKS需members,不能混合设备变体。decode只在一致性通过后聚合DEX并按模块导出资源。
Inputs: path (required), action (required), engine, members, +1 more.
rebuildADestructive
重建 apktool 工程或用明确 keystore 签名并复验;密码使用环境变量名,不自动安装。
Inputs: path (required), action (required), alias, keystore, +1 more.
resourcesCRead-only
资源字符串分页;可扫描已解码XML或APK中的View android:onClick声明,输出待DEX核对的候选,不证明运行时行为。
Inputs: path (required), limit, action, locale, +2 more.
scriptBRead-only
离线JS/TS/JSX/Flow索引或格式化,返回函数/依赖/调用点/字符串/URL;不执行代码。map只读取显式mapPath映射位置。
Inputs: path (required), action (required), line, column, +2 more.
searchARead-only
检索已导出的源码,返回 file:line;不是 DEX xref。结果在任务产物中分页。
Inputs: query (required), directory (required), limit, regex, +1 more.
webviewADestructive
明确serial/packageName/pid的已开放调试WebView。discover/open后scripts/source/dom/network/body,最后close。只采集Network启用后事件;不用外部URL,不强制开调试。
Inputs: action (required), pid, serial, rootRead, +5 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 20 tools
Most tools target distinct resources (dex, native, frida, webview, resources, script), and several descriptions explicitly disambiguate neighbors (search is not DEX xref, native vs frida static/dynamic). However the `artifact` (content-based identification/extraction) vs `artifacts` (list/read task files) pair is a near-collision that will cause misselection, and `apk`/`packages`/`decode` plus `framework`/`managed` have overlapping edges that only the long descriptions disentangle.
Naming is consistently lowercase single tokens throughout, which is readable, but it never encodes an action (no verb_noun pattern) so the operation must be inferred from the description. Singular/plural collisions (`artifact` vs `artifacts`) and role-mixed tokens (`doctor`, `guidance`, `jobs`) weaken predictability.
20 tools is at the heavy end, though the domain genuinely spans static analysis, native, .NET, dynamic instrumentation, WebView, devices, rebuild, and job/artifact management. Each tool roughly maps to a real capability, but the set is large enough that a few (guidance, doctor, jobs, artifacts) could plausibly be folded together.
Coverage is broad: inspect/decode APK, DEX and resource queries, native and managed analysis, Frida tracing, WebView debugging, rebuild/sign, search, evidence, and job orchestration form a coherent workflow. Minor gaps exist — device interaction stops at getprop/packages/processes/logcat with no file push/pull or device-side artifact retrieval, and keystore creation is assumed rather than provided.
Maintenance
Related MCP Connectors
Scan Android and iOS apps for security issues: findings, MASVS mapping and pentest reports.
Remote MCP for Android CLI agent build gate, structured receipts, audit logs, and reviewer-ready evi
MCP server for static security analysis of Android source code
Signed sandbox verdicts on any artifact, plus an agent marketplace. No key, no signup, no payment.
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables local-first static and optional controlled dynamic analysis of Android APK artifacts, with provenance-aware downloads, Markdown reports, and structured security findings via MCP stdio tools.9-
- FlicenseNot gradedqualityCmaintenanceEnables mobile application penetration testing with 83+ tools covering Frida instrumentation, APK analysis, decompilation, signing, emulator support, and system compatibility checks.1-
- AlicenseNot gradedqualityCmaintenanceEnables offline Android package analysis by loading APK, DEX, JAR, class, and XAPK files to inspect app metadata, manifests, classes, methods, resources, strings, and cross-references, and to export decompiled Java sources through CRUDE MCP-AQL tools.AGPL 3.0
- AlicenseCqualityAmaintenanceEnables AI agents to inspect APKs and resources, analyze native libraries, trace runtime behavior with Frida, and connect app screen actions to code through ADB.89MIT