android-phone-mcp
android-phone-mcp lets an MCP client control an Android emulator or USB device over ADB for device connection, UI inspection, and input actions.
List and select connected ADB devices, returning a current-screen summary (
phone_connect,phone_devices).Dump the current UI hierarchy as a numbered element list, optionally with a PNG screenshot (
phone_observe).Tap by pixel coordinates or by observed element index/text/resourceId/contentDesc/className/packageName, including long-press (
phone_tap).Swipe by coordinates or direction: up, down, left, right (
phone_swipe).Type into the focused field or tap a selected field first; ASCII uses
adb input text, other characters use clipboard paste (phone_type).Send Android keyevents such as HOME, BACK, ENTER, TAB, DELETE, APP_SWITCH, POWER, volume, D-pad, and PASTE (
phone_key).Press BACK or HOME via convenience tools (
phone_back,phone_home).Launch apps by package, component, or known alias, and list launchable launcher activities (
phone_launch,phone_apps).Capture a PNG screenshot of the current display (
phone_screenshot).Actions re-observe the resulting screen by default, with optional timing and screenshot controls (
settleMs,includeScreenshot).
Controls Android emulators or USB-connected Android devices over ADB, enabling device connection, UI hierarchy observation, screenshots, tapping, swiping, typing, key events, app launching, and listing launchable apps.
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-phone-mcp Connect to my emulator, open Settings, and tap Wi-Fi."
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-phone-mcp
Open-source MCP (stdio) server that lets an AI client control an Android emulator or USB device over ADB.
This is not AndroMeld, is not affiliated with Catching Now / AndroMeld, and does not implement Continuity, Finder mounting, Meld Mode, Mac widgets, or AndroMeld’s helper app. Tool names follow AndroMeld’s public MCP list (phone_connect, phone_observe, phone_tap, phone_swipe, phone_type, phone_key, phone_launch, phone_apps) so an existing client config is easier to swap. Behavior is ADB-based: an emulator is enough; no physical phone is required for basic verification.
中文简介
用标准 MCP stdio 把 Android 模拟器或真机交给 Cursor / Claude Desktop 等客户端操作。驱动层只有 adb(Android platform-tools),不依赖任何 AndroMeld 二进制或私有 API。
和 AndroMeld 的差异
android-phone-mcp | AndroMeld | |
连接 |
| Mac 应用 + 手机助手 |
界面树 |
| 无障碍树(Phone Screen) |
模拟器 | 支持,推荐用来验证 | 面向真机 + Mac |
Finder / Continuity / 通话 / 小组件 | 无 | 有 |
安装
git clone https://github.com/liush2yuxjtu/android-phone-mcp.git
cd android-phone-mcp
npm install
npm run build
# 需要本机已安装 adb,且 `adb devices` 能看到 deviceMCP 配置(Cursor) — 把路径换成你的克隆目录:
{
"mcpServers": {
"android-phone": {
"command": "node",
"args": ["/ABS/PATH/android-phone-mcp/dist/index.js"],
"env": {
"ANDROID_SERIAL": "emulator-5554"
}
}
}
}开发时也可用:
{
"mcpServers": {
"android-phone": {
"command": "npx",
"args": ["tsx", "/ABS/PATH/android-phone-mcp/src/index.ts"],
"env": { "ANDROID_SERIAL": "emulator-5554" }
}
}
}先启动 AVD,执行 adb devices -l 看到 device,再让客户端调用 phone_connect。
Related MCP server: Android Control MCP Server
English
Requirements
Node.js 20+
adbonPATH(or setADB_PATH)An emulator or a device with USB debugging authorized
Install
git clone https://github.com/liush2yuxjtu/android-phone-mcp.git
cd android-phone-mcp
npm install && npm run build && npm testnpm start runs the stdio MCP server (the client should spawn this; do not type into it yourself).
Emulator quickstart
See scripts/start-emulator.md. Short version:
emulator -avd mcp_pixel
adb devices -l # wait until: emulator-5554 device
export ANDROID_SERIAL=emulator-5554
./scripts/verify-adb.shMCP client config
Cursor (~/.cursor/mcp.json or project .cursor/mcp.json):
{
"mcpServers": {
"android-phone": {
"command": "node",
"args": ["/ABS/PATH/android-phone-mcp/dist/index.js"],
"env": {
"ANDROID_SERIAL": "emulator-5554"
}
}
}
}Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"android-phone": {
"command": "node",
"args": ["/ABS/PATH/android-phone-mcp/dist/index.js"],
"env": {
"ANDROID_SERIAL": "emulator-5554"
}
}
}
}From a clone, npx + tsx also works (see Chinese section). GitHub npx github:liush2yuxjtu/android-phone-mcp can work after prepare builds dist/; the most reliable path is a local node …/dist/index.js.
Device selection
Tool argument
deviceonphone_connectElse env
ANDROID_SERIALElse the only online
adbdeviceElse the tool lists serials and asks you to pick
Tools
Aligned with AndroMeld’s documented names (intent: phone control via MCP, not protocol/binary compatibility):
Tool | Role |
| List/select devices; return current screen summary |
| UI hierarchy ( |
| Tap |
| Coordinates or |
| Type into the focused field ( |
|
|
| Package, component, or alias ( |
| Launchable launcher activities |
Extras: phone_screenshot, phone_back, phone_home, phone_devices.
Typical loop: phone_connect → phone_observe → phone_tap / phone_type using [n] indexes. Actions re-observe by default so the model sees the resulting screen.
Verification commands
With an emulator already device in adb devices:
adb devices -l
export ANDROID_SERIAL=emulator-5554
adb -s "$ANDROID_SERIAL" shell wm size
adb -s "$ANDROID_SERIAL" shell uiautomator dump --compressed /data/local/tmp/android-phone-mcp-uidump.xml
adb -s "$ANDROID_SERIAL" exec-out cat /data/local/tmp/android-phone-mcp-uidump.xml | head -c 400
./scripts/verify-adb.shThen in the MCP client: “Call phone_connect, then phone_observe, then phone_launch app=settings.”
To prove a Mac-hosted QR can be scanned by the emulator camera (no physical phone), use the project /verify skill (.cursor/skills/verify/SKILL.md) and scripts/verify-qr-mac-scan.md. Verdicts are PASS / FAIL / BLOCKED / SKIP — camera PASS requires /status scanned: true and a scanner User-Agent (e.g. ZXing (Android)), not an adb VIEW intent.
Limitations
Needs a reachable
adbdevice; this server does not start the emulator for you.uiautomator dumpfails on some secure/DRM surfaces, games, and a few OEM skins — useincludeScreenshot/phone_screenshotand tap coordinates.Unicode typing depends on
cmd clipboard set-text+ paste; some images lack that command.No AndroMeld Continuity, Finder, calls, widgets, or Mac windowing.
Full device control is powerful: only attach emulators or phones you intend an AI client to operate.
Android 12+ is the realistic floor for a useful hierarchy dump; older images may still accept
inputevents.
Development
npm test # mocked adb
npm run build
npm start # stdio MCPLicense: MIT.
Available Tools
12 toolsphone_appsList launchable appsA
List installed launcher activities (package + activity) on the selected device.
Inputs: no named parameters.
phone_backBackA
Press BACK (convenience wrapper around phone_key).
Inputs: observe, settleMs, includeScreenshot.
phone_connectConnect Android deviceA
List ADB devices (emulator or USB), select one, and return a compact current-screen summary. Call this first. Pass device as an ADB serial, or set ANDROID_SERIAL.
Inputs: device.
phone_devicesList ADB devicesA
List connected ADB devices without changing the current selection or dumping the UI.
Inputs: no named parameters.
phone_homeHomeB
Press HOME (convenience wrapper around phone_key).
Inputs: observe, settleMs, includeScreenshot.
phone_keySend key eventB
Send an Android keyevent such as HOME, BACK, ENTER, TAB, DELETE, APP_SWITCH, POWER, VOLUME_UP, VOLUME_DOWN, DPAD_UP/DOWN/LEFT/RIGHT, PASTE. Returns the resulting screen.
Inputs: key (required), observe, settleMs, includeScreenshot.
phone_launchLaunch appB
Launch an app by package (com.android.settings), component (pkg/.Activity), or known alias (settings, chrome, camera, photos, gmail, play, files, clock, calculator, phone, messages).
Inputs: app (required), observe, settleMs, includeScreenshot.
phone_observeObserve screen UIA
Capture the current UI hierarchy via uiautomator dump (accessibility-style tree) and return a numbered element list for tapping. Set includeScreenshot when the tree is not enough (games, canvas, Chrome content).
Inputs: includeScreenshot.
phone_screenshotScreenshotB
Capture a PNG screenshot of the current display.
Inputs: no named parameters.
phone_swipeSwipeC
Swipe from (x1,y1) to (x2,y2), or by finger direction up/down/left/right across the screen. Returns the resulting screen.
Inputs: x1, x2, y1, y2, +6 more.
phone_tapTap screenA
Tap by pixel coordinates (x,y) or by an element from the last phone_observe (index, text, resourceId, contentDesc). Optional durationMs performs a long-press. Returns the resulting screen.
Inputs: x, y, text, index, +9 more.
phone_typeType textA
Type into the focused field. Optionally tap a selector first. ASCII uses adb input text; other characters use clipboard paste. Returns the resulting screen.
Inputs: text (required), clear, index, observe, +6 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Each tool has a distinct purpose: connect/select, list-only, observe tree, screenshot, apps, tap, swipe, type, key, launch. The only overlap is phone_back and phone_home being explicit convenience wrappers around phone_key, and connect vs devices both listing ADB devices, but descriptions clarify these boundaries well.
All 12 tools use a uniform phone_ prefix followed by a clear action or resource noun (connect, devices, observe, screenshot, tap, swipe, type, key, launch). The pattern is predictable and fully consistent throughout.
12 tools is well within the ideal range and each earns its place by covering a distinct step in the phone-interaction loop (discover, observe, act, launch). Nothing feels padded or redundant at the set level.
The core lifecycle of connect, observe, interact (tap/swipe/type/key), launch, and capture is fully covered with no dead ends. Minor gaps exist for out-of-band operations like installing/uninstalling apps or retrieving device state, but agents can accomplish the primary automation workflows.
Related MCP Connectors
Cloud Android devices for AI agents: install an APK, read the screen, tap, type, read logcat.
Let Claude, ChatGPT and other agents use your Android phone: see the screen, tap, type, open apps.
Give your AI agent a real cloud Android phone: push APKs, drive it, get screenshots and logs.
Cloud Android phones for AI agents: create a phone, read the screen, tap, type, install APKs, park.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with Android devices and emulators via ADB, providing tools for screenshots, UI inspection, touch and text input, app management, and device control.42143 npm23MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to observe, reason about, and control connected Android devices via ADB, providing tools for screenshots, UI hierarchy parsing, semantic element clicking, gestures, text input, and app lifecycle management.13MIT
- AlicenseAqualityCmaintenanceEnables AI agents to control, inspect, and automate Android devices, Waydroid containers, and AVD emulators over ADB. Provides tools for screenshots, UI-hierarchy text-based tapping, gestures, key presses, text input, app management, and raw shell commands.12MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to read and control a connected Android device over adb or a local root shell, with tools for screen inspection, tapping, typing, swiping, launching apps, and system commands.182MIT