Android MCP
Provides ADB-driven control and inspection of Android devices, including device profiles and serial resolution, UI interaction (screenshots, hierarchy, tap/swipe/type/key), app management, logcat capture and crash extraction, file operations, system diagnostics, and gated shell access.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
π± Android MCP
ADB-driven Android control for the Pens β device-first, profile-aware, read-only by default
See, drive, and debug any Android device over ADB β with first-class device profiles so one server targets the whole fleet.
Why this exists
The Pens's Android fleet is heterogeneous: a Hisense Android TV and a
Pixel 9 Pro XL, each a different device with a different ADB target. Driving
them raw by serial is fragile (and the Pixel's ADB port rotates on re-pair).
android-mcp wraps ADB behind the Model Context Protocol and adds a device
profile registry β so the agent says "check the TV" or "target the Pixel",
and the server resolves the right serial automatically.
This product is a hard fork merge of
us-all/android-mcp-server
(v1.14.4) β chosen over martingeidobler and nexus-android via a trio-compare of
the candidates (the engines are near-orthogonal; see the fork decision below).
Related MCP server: adb_mcp_server
β¨ Features
77 tools +
search-toolsmeta across device / UI / apps / logcat / files / system / shellDevice profiles β each Android device is a named profile (serial, model, platform codename) resolved through a single strict chokepoint
Read-only by default β writes need
ANDROID_MCP_ALLOW_WRITE=true, shell needsANDROID_MCP_ALLOW_SHELL=true(independent gates)stdio + Streamable HTTP β run locally or expose over the LAN with Bearer auth
Diagnostic depth β logcat search/crash extraction, dumpsys (mem/gfx/cpu), getprop, processes, package internals
π Device profiles
profile | id (serial) | model | adb target | role |
|
| SmartTV 4K FFM |
| living-room TV |
|
| Pixel 9 Pro XL |
| hardware auth SSOT |
Select a profile:
Environment β
ANDROID_PROFILE=hisense-wuyishan(default), orPer call β pass
serial="pixel-9-pro-xl"to any tool that takes a serial.
π The Pixel's adb port is volatile (
:36993rotates when re-paired via wireless debugging / Flotilla:25245). Updatepixel-9-pro-xl.adbSerialwhen it changes β the profile id (ro.serialno4C121FDAS0004Y) is stable.
How profile resolution works (the hard-merge)
Two deliberately-distinct functions in src/profiles.ts:
function | behavior | used by |
| lenient β falls back to the default profile | active-profile accessor |
| strict β returns | the adb chokepoint |
The adb chokepoint (src/adb.ts buildArgs) routes a tool's serial param
through lookupProfile, so every tool that takes serial becomes
profile-aware β while a raw adb address like 10.0.0.77:36993 passes through
verbatim and is never silently retargeted to the default device.
flowchart LR
A[agent] -->|MCP| B[android-mcp]
B --> C[adb.ts buildArgs<br/>lookupProfile strict resolve]
C --> D{serial is a profile?}
D -->|yes| E[profile.adbSerial]
D -->|no| F[serial passed through verbatim]
E --> G[adb -s <target>]
F --> Gπ Quick start
pnpm install --frozen-lockfile
pnpm test # 102 tests (vitest)
pnpm build # tsc β dist/
# run as stdio MCP (default profile = Hisense TV)
node dist/index.js
# expose over HTTP with Bearer token
MCP_TRANSPORT=http MCP_HTTP_TOKEN=secret MCP_HTTP_PORT=37009 node dist/index.jsRequires Node 22+ (this fork is a Node-runtime product; pnpm 10 + vitest). ADB must be on
PATHor setADB_PATH.
π§ Tool categories
Category | Coverage |
Device | list/info/properties, wireless connect/disconnect |
Apps | install/uninstall/launch, permissions, intents, data-clear |
UI | screenshot, UI hierarchy, tap/swipe/type/key, annotated tap |
Logcat | capture/filter/clear/crash-extract |
Files | list/pull/push/delete |
System | battery/network/settings/display/wifi/notifications |
Debug | bugreport, mem/gfx/cpu info |
Shell |
|
Meta |
|
βοΈ Configuration
Variable | Default | Purpose |
|
| adb binary path |
| profile serial | target device serial |
|
| active device profile |
|
| enable write ops (install/tap/push) |
|
| enable arbitrary |
| β | category allow/deny (token saver) |
|
|
|
| β | Bearer token (required for http) |
π§ͺ Testing
102 tests across 12 files (vitest), including the profiles hard-merge
contract (tests/profiles.test.ts, tests/adb-profile.test.ts) that pins:
profile identities resolve to their adbSerial
raw adb addresses are NOT profile keys (pass through, never retargeted)
the default profile (Hisense) is index 0
pnpm testπ Fork decision (receipt)
Chosen basis: us-all/android-mcp-server (76 tools, 2-tier security, stdio +
HTTP). Compared against martingeidobler (25 tools, emulator-oriented) and
nexus-android (native) with the trio compare engine β the candidates are
near-orthogonal implementations (token Jaccard 0.01β0.03), so the fork was
vendored wholesale and renamed, never partially merged. The compare output is
pinned in pens/agentic-moment/products/site/compare/fixtures/android-mcp-compare.json.
π Security & license
Read-only by default. Writes blocked without
ANDROID_MCP_ALLOW_WRITE=true.Shell gating separate.
execute-shellneedsANDROID_MCP_ALLOW_SHELL=trueeven with write enabled.HTTP transport requires a Bearer token (
MCP_HTTP_TOKEN); prefers localhost binding.License: MIT + upstream. Forked 2026-10-31 from
us-all/android-mcp-server;@us-all/mcp-toolkitnpm dep retained (real runtime dependency).
π¦ Source
pens/barn/products/android-mcp/ (canonical). Registered in the Pens as the
android-mcp MCP upstream (thresher β node dist/index.js), default profile
Hisense TV. Deploy after edits: pnpm build && /usr/local/bin/android-mcp β
~/.local/bin/android-mcp symlink.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Manage Android and VR device fleets: policies, kiosk mode, device commands and enrollment QR codes.
Remote enterprise management of Android devices and apps
Give your AI agent a real cloud Android phone: push APKs, drive it, get screenshots and logs.
Build, run, inspect, and continue AgentScript workflows on connected Super Chrome and Mac clients.
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables comprehensive control of Android devices via ADB for Flutter development, UI testing, and visual QA workflows. Provides 60+ tools for device management, UI inspection, app testing, performance profiling, and debugging through natural language.77MIT
- AlicenseNot gradedqualityDmaintenanceEnables remote control of Android devices via ADB, including screen operations, input, app management, file transfer, and advanced tools like UI testing and performance analysis.25MIT
- AlicenseAqualityDmaintenanceEnables an agent to inspect and interact with Android emulators or physical devices via ADB, capturing UI snapshots, tapping nodes, typing text, and reading app logs.10MIT
- FlicenseBqualityBmaintenanceEnables comprehensive Android device control over ADB, including UI automation, screen capture/recording, app management, file operations, and log/notification access, with a built-in permission system.71-