adb-mcp
Android · Model Context Protocol

Drive Android emulators and devices with AI.

An MCP server for driving Android. Your agent boots an AVD, reads the real UI hierarchy, and taps by element, not by guess. Then it builds, installs and tests over adb, from Claude Code, Cursor, VS Code, or any MCP client.

curl -fsSL https://raw.githubusercontent.com/iksnerd/adb-mcp/main/install.sh | sh
ReleaseCIGoMCP

Why

Why adb-mcp

No more stale coordinates
describe_ui returns each element's center in true device pixels, computed fresh, so a tap lands where you mean it to, with no guessing off a downscaled screenshot.
Screenshots that actually work
Captured via exec-out screencap (no CRLF corruption) and auto-downscaled to fit the image reader. A black capture gets a retry, then a diagnosis: FLAG_SECURE or a sleeping display.
The runbook ships with the server
The driving workflow (observe→act loop, PIN/lock handling, crash triage) is baked in as MCP resources the agent can pull up mid-task, not tribal knowledge you have to re-explain every session.

Tools

0 tools across ten areas

Plus 6 guide resources the agent can pull up mid-task.

Emulator / device
Boot, list, wait-for-boot, shut down, Wi-Fi connect, port forwarding.
Observe
Screenshot (multi-display aware) and describe_ui: every element's center in true device pixels, computed fresh rather than read off the image, plus which window actually holds focus so a system overlay can't be mistaken for your app.
Interact
Tap, swipe, drag, type, key combos and PIN pads, with run_sequence batching and an opt-in verify_change so an action the UI silently swallowed reports itself instead of looking like a success.
Lock / Keystore / Biometrics
Secure lock screen, fingerprint_touch, biometric enrollment checks.
Extended controls
SMS, phone calls, battery, cellular conditions, sensors, AVD snapshots.
App lifecycle
Install/launch/stop, app_state (Metro-vs-embedded bundle detection), permissions, deep links.
Logs & capture
One-shot/streaming logcat, filters, screen recording.
Environment & diagnostics
Dark mode, mock location, stay_awake, doctor.
Session defaults
Pin a project_dir/serial for the session so later calls can omit them, for multi-module projects or several attached devices.
Gradle build & test
Build, unit/instrumented tests, JaCoCo coverage reporting, variant/module discovery, build_and_run.
Full tool referencedocs/TOOLS.md

Workflow

The core loop

screenshotsee
describe_uilocate
tap / swipe / typeact
screenshotconfirm

Click a step to hear it.

Read android://guide/driving (an MCP resource, not a URL; ask your agent to fetch it) for the full loop and the gotchas that waste turns.

Install

Getting started

1
Install the binary
curl -fsSL https://raw.githubusercontent.com/iksnerd/adb-mcp/main/install.sh | sh
BIN_DIR
Install somewhere other than the default location.
VERSION=v0.23.0
Pin a specific release instead of the latest.
adb-mcp update
Fetch the latest release if already installed.
2
Register with your MCP client
claude mcp add adb -- adb-mcp

Confirm it's wired up: ask your agent to boot an emulator and take a screenshot.

Built on the official Go MCP SDK·Not affiliated with Google