
Android
io.github.us-all由 GitHub 账号 us-all 发布v1.14.4更新于 Oct 24, 2026
Android MCP — ADB-based device, apps, UI, logcat, emulator, files, system, debug
概览
让助手通过 ADB 检查与诊断 Android 设备:logcat、dumpsys、应用包、界面、文件与模拟器。
- 可以做什么
- 把 Android 调试桥封装为九大类共 76 个工具:设备信息、应用、界面自动化、logcat、模拟器、文件、系统设置、调试转储以及受门控的 shell。还提供 device-health、analyze-app 等聚合工具,五个诊断提示(崩溃调查、内存泄漏检测、权限审计、应用启动分析、界面元素定位),以及设备、进程和应用活动的只读资源。以本地 stdio 进程运行,可选 HTTP 传输。
- 适用场景
- 适用于需要解释 Android 应用为何崩溃、内存泄漏、耗电或行为异常,以及审计权限、分析启动耗时的场景。它偏诊断而非操作,因此适合与驱动设备的 MCP 服务器配合使用,而不是替代它们。
- 运行要求
- npm 包需要 Node.js 22 或更高版本,或使用 Docker。需安装 ADB 并在 PATH 中,或用 ADB_PATH 指定,且需一台开启 USB 调试的 Android 设备或模拟器。可选变量:ANDROID_HOME、ANDROID_SERIAL、ANDROID_TOOLS、ANDROID_DISABLE、MCP_TRANSPORT、MCP_HTTP_TOKEN、MCP_HTTP_PORT、MCP_HTTP_HOST、MCP_HTTP_SKIP_AUTH。
安装
在 SourceWeft 中
- 打开 控制台中的 Android,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Android MCP Server
The Android diagnostic & forensic MCP — when an app crashes, leaks memory, drains battery, or behaves unexpectedly, this is what you point at the device.
76 tools across logcat / dumpsys / package internals / system properties / processes. 5 MCP Prompts (crash-investigation, memory-leak-detection, permission-audit, app-startup-profile, ui-element-locator) and a
device-healthaggregation. Pure ADB, no Appium / uiautomator2 dependency. 2-tier security (write + shell gates).
[npm] [downloads] [tools] [@us-all standard] [Glama MCP server]
What it does that others don't
- Diagnostic depth — logcat search/crash extraction,
dumpsys(mem/gfx/cpu), getprop, processes, package internals, app intents, port forwards. Cross-platform competitors hide this surface. - MCP Prompts (5) —
crash-investigation,memory-leak-detection,ui-element-locator,app-startup-profile,permission-audit. Workflow templates the model invokes directly. - Aggregation tools —
device-health(battery + memory + cpu + network in one call),analyze-app(package info + memory + activities). - 2-tier security —
ANDROID_MCP_ALLOW_WRITE(gates installs/taps/pushes) andANDROID_MCP_ALLOW_SHELL(gates arbitraryadb shell) are separate flags. Distinct trust levels. - Pure ADB — no Appium, no uiautomator2, no Python bridge. Just the official Android Debug Bridge wrapped over
child_process. - Token-efficient by design — 56 schema-trim sweep,
ANDROID_TOOLS/ANDROID_DISABLE9 categories,search-toolsmeta. - Apps SDK card —
device-healthrenders as a snapshot card on ChatGPT clients (battery, RAM, Wi-Fi + 4-section grid) via_meta["openai/outputTemplate"]. Claude clients receive the same JSON content. - stdio + Streamable HTTP — defaults to stdio. Set
MCP_TRANSPORT=httpfor ChatGPT Apps SDK or remote clients (Bearer auth viaMCP_HTTP_TOKEN).
Try this — 5 prompts
Connect the server to Claude Desktop or Claude Code, then paste any of these:
- Crash investigation — "My app
com.us-all.apikeeps crashing on this Pixel 6 emulator. Pull the last crash log, the offending stack frames, and any recent permission changes." - Memory leak detection — "Trace memory growth for
com.us-all.apiover the last 5 minutes. Show heap deltas, GC pressure, and the largest allocators." - Battery drain attribution — "What's draining battery on this device? Top 5 consumers, duration of each, and current battery health."
- Permission audit — "Audit installed 3rd-party apps for dangerous permissions (location/camera/contacts/microphone). Flag any app that hasn't been used in the last 30 days but holds these."
- App startup profile — "Profile the cold-start of
com.us-all.api— measure activity launch time, identify the slowest fragment init, and suggest where to add tracing."
When to use this vs mobile-next/mobile-mcp
mobile-next/mobile-mcp (4.7K★) is the cross-platform action-oriented MCP. Different problem space:
Use both — they're complementary. mobile-mcp drives the device through your QA flows; this MCP tells you why it broke when something does. Especially:
- mobile-mcp finds the bug via UI exploration → this MCP captures the crash log + heap dump.
- mobile-mcp can't tell you why startup is slow → this MCP gives you
dumpsys gfxinfo+ activity launch timing. - mobile-mcp can't reproduce a permission denial → this MCP shows the exact
dumpsys packagepermission state and recent grants.
Install
Claude Desktop
Claude Code
Docker
Build from source
Prerequisites
- ADB installed and on
PATH(or setADB_PATH) - Android device or emulator with USB debugging enabled
- For multi-device setups:
ANDROID_SERIAL=<serial>to target a specific one
Configuration
Categories (9): device, apps, ui, logcat, emulator, files, system, debug, shell (always-gated by ANDROID_MCP_ALLOW_SHELL), plus always-on meta.
When MCP_TRANSPORT=http: POST /mcp (Bearer-auth JSON-RPC) + GET /health (public liveness).
Token efficiency
Plus search-tools meta-tool (always enabled) for runtime tool discovery.
Read-only mode (default)
By default, only read operations are permitted. Write operations (tap, install-app, push-file, etc.) return an error unless ANDROID_MCP_ALLOW_WRITE=true. Shell command execution requires a separate ANDROID_MCP_ALLOW_SHELL=true for additional security — even with write enabled, raw shell stays blocked unless this is explicitly set.
MCP Prompts (5)
Workflow templates available via MCP prompts/list:
crash-investigation— pull crash logs + stack frames + recent permission changes for a target package.memory-leak-detection— track heap delta over a window; cluster by allocator.ui-element-locator— find a UI element by visual + accessibility hints; return tap coordinates.app-startup-profile— cold-start profile: activity launch + fragment init + first frame.permission-audit— flag dangerous permissions held by under-used 3rd-party apps.
MCP Resources
URI-based read-only entities:
android://devices— connected devicesandroid://device/{serial}— device details (model/brand/version/display)android://app/{packageName}/activities— activities exposed by a package (exported/launchable flags)android://device/{serial}/processes— running processes
Tools (76)
9 categories. Use search-tools to discover at runtime; full list collapsed below.
Full tool list
Device (5)
list-devices, get-device-info, get-device-properties, connect-device, disconnect-device
Apps (14)
list-packages, get-package-info, install-app, uninstall-app, launch-app, stop-app, clear-app-data, grant-permission, revoke-permission, open-url, send-broadcast, get-current-activity, is-app-installed, get-app-intents
UI Automation (14)
take-screenshot, dump-ui-hierarchy, ui-snapshot-a11y, tap, long-press, swipe, input-text, press-key, drag-and-drop, start-screen-recording, pull-screen-recording, double-tap, take-annotated-screenshot, tap-element
Logcat (4)
get-logcat, clear-logcat, search-logcat, get-crash-logs
Emulator (7)
list-avds, start-emulator, stop-emulator, list-snapshots, load-snapshot, save-snapshot, delete-snapshot
Files (4)
list-files, pull-file, push-file, delete-file
System (19)
get-battery-info, get-network-info, change-setting, get-setting, set-display-size, set-display-density, keep-screen-on, port-forward, reverse-forward, list-forwards, remove-forward, toggle-wifi, toggle-mobile-data, open-notification, lock-device, unlock-device, get-orientation, set-orientation, list-settings
Debug (5)
bugreport, get-mem-info, get-gfx-info, get-cpu-info, doctor
Shell (1)
execute-shell — gated by ANDROID_MCP_ALLOW_SHELL
Aggregations
device-health — battery + memory + cpu + network in one call (~7KB response, 4 sub-systems with caveats).
analyze-app — package info + memory + activities aggregation.
Meta
search-tools — query other tools by keyword; always enabled.
Architecture
Built on @us-all/mcp-toolkit:
extractFields— token-efficient response projections (skipped for ADB flat-array endpoints)aggregate(fetchers, caveats)— fan-out helper fordevice-health/analyze-appcreateWrapToolHandler—WriteBlockedError/ShellBlockedErrorpassthrough + structured ADB errors ({code, stderr})wrapImageToolHandler(Android-only) — base64 PNG sanitizationsearch-toolsmeta-tool
Security
- Read-only by default. Writes blocked without
ANDROID_MCP_ALLOW_WRITE=true. - Shell gating separate.
execute-shellblocked withoutANDROID_MCP_ALLOW_SHELL=trueeven with write enabled — distinct trust levels. - Shell injection safe.
shellEscapefor single-quote-based escape; input validation via zod regex whitelists for setting keys, package names, permissions, components, broadcast actions/extras. - Path-traversal blocked. Device paths require absolute + no
..+ no shell metachars. - Error sanitization. API keys, tokens, passwords redacted from all error outputs.
Tech stack
Node.js 22+ • TypeScript strict ESM • pnpm 10 • @modelcontextprotocol/sdk 1.29+ • zod v4 • fast-xml-parser • vitest (fork pool isolation).
License
来源:README.md,提交 bacd6ea
工具
0版本历史
1- v1.14.4最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分