Boot an AVD, screenshot, read the UI hierarchy, tap/swipe/type, set a device
lock, read logcat, run Gradle builds and tests. 81 tools,
from Claude Code, Cursor, VS Code, or any MCP client over stdio.
It is the Android counterpart to XcodeBuildMCP,
built on the official Go MCP SDK.
describe_ui → tap_on_text → screenshot, driven live against a real emulator (emulator-5556), showing the actual tool calls and their actual output.
Android is a trademark of Google LLC. adb-mcp is an independent, unofficial
tool built for Android and is not affiliated with, sponsored, or endorsed by Google.
The Android robot above is reproduced/modified from work created and shared by
Google and used according to terms described in the
Creative Commons 3.0 Attribution License.
Why
Driving Android by hand means a long runbook of raw adb commands, and it is
easy to get wrong (stale tap coordinates, CRLF-corrupted screenshots, forgetting
exec-out, guessing coordinates off a downscaled image). This server bakes
that knowledge into its tools, so the agent doesn't have to relearn it:
- Screenshots use
exec-out screencap (no CRLF corruption) and are auto-downscaled
so the image reader accepts them.
describe_ui returns each element's center in true device pixels (so taps
land where you mean them to, no guessing off the image) and retries the
transient "could not get idle state" failure on its own.
The workflow itself ships as readable resources the agent can pull up
mid-task (the observe→act loop, native PIN/lock handling, crash triage, see
below) instead of relearning them each session.
Getting started
Let your agent set it up
Paste this into Claude Code, Cursor, Codex or any agent that can run shell commands:
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.
Prefer to do it yourself? The same steps, one at a time:
1. Prerequisites
- Android SDK with
platform-tools (adb) and emulator. The server finds it
via $ANDROID_HOME / $ANDROID_SDK_ROOT, else the platform default
(~/Library/Android/sdk on macOS). If your MCP client launches the server
without those set, pass --sdk /path/to/sdk in the client config's args
(the server then exports it, so Gradle finds the SDK too). doctor prints
the location it resolved.
- At least one AVD (create one in Android Studio's Device Manager).
Go is not required: releases ship prebuilt binaries, and it's only needed to
build from source.