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
ReleaseRelease buildGoMCP

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 and plugin skills 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 guides the agent can pull up mid-task.

18 tools only observe, 22 can destroy data, and each says so.

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. The plugin also installs each guide as a skill, for clients that do not read MCP resources.

Install

Getting started

Let your agent set it up

Paste this into Claude Code, Cursor, Codex or any agent with a shell.

Set up adb-mcp (https://github.com/iksnerd/adb-mcp), an MCP server that drives
Android emulators and devices. Do each step and report what you did.

1. Check that `adb` and an Android SDK exist (`adb version`; the SDK is usually
   at ~/Library/Android/sdk on macOS or ~/Android/Sdk on Linux). If they are
   missing, tell me to install Android Studio and stop. Do not install it yourself.
2. Install the server: `curl -fsSL https://raw.githubusercontent.com/iksnerd/adb-mcp/main/install.sh | sh`
   On Windows, take the zip from https://github.com/iksnerd/adb-mcp/releases/latest instead.
   Then check `which adb-mcp`. If it is not on PATH, use its absolute path in step 3.
3. Register it with the client you are running in, once:
   - Claude Code: `claude mcp add -s user adb -- adb-mcp` (user scope, so it works in every project)
   - Cursor, Windsurf or another client: add {"mcpServers":{"adb":{"command":"adb-mcp"}}} to its MCP config
   If the client launches servers without ANDROID_HOME set, add "--sdk", "<sdk path>" to args.
4. Tell me to restart the client so the adb tools load, then stop. After the
   restart, call `doctor` and fix what it reports. Then call `list_avds`, boot
   one with `boot_emulator`, and take a `screenshot` to prove it works.
It stops after registering and asks you to restart the client.

Or do it yourself in two steps:

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.25.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