adb-mcp is an MCP server that drives Android emulators and physical devices via adb, usable from Claude Code, Cursor, VS Code, or any MCP client that supports stdio. It is built on the official Go MCP SDK and is positioned as the Android counterpart to XcodeBuildMCP.
Purpose Manually driving Android usually requires a long list of raw adb commands and is error-prone, for example tap coordinates going stale, screenshots being corrupted by CRLF, forgetting to use exec-out, guessing coordinates from a downscaled image, and so on. adb-mcp builds this knowledge into its tools so agents do not have to relearn it over and over.
Main capabilities The tools cover ten areas, with about 79 tools in total. Every device-facing tool accepts an optional serial parameter (corresponding to adb -s).
- Emulator/device: start, list, wait for boot completion, shut down, connect over Wi-Fi, adb_reverse port forwarding.
- Observation: screenshot viewing (supports multi-screen foldable devices, with display to select a panel); describe_ui returns element centers in real pixel coordinates and shows the focused top-level window, supports filter/query/compact modes as well as hidden node counts.
- Interaction: tap, tap by text (tap_on_text), tap by id (tap_element), swipe, drag, long press, input, key combinations, PIN keypad, wait, run_sequence (batch-execute steps and guards in a single call); optional verify_change to determine whether an action actually changed the UI; optional via_accessibility (experimental) to reach native views that coordinate taps cannot reach via real accessibility taps.
- Lock screen/keystore/biometrics: set/clear secure lock screen, check lock state, has_biometric_enrolled, and fingerprint_touch/finger_remove to satisfy BiometricPrompt on emulators.
- Extended controls (emulator): send SMS (OTP/2FA), place calls, set battery (physical devices can also do this via dumpsys), cellular network (roaming/weak signal/throttling), set sensors (accelerometer/light, etc.), rotate screen, AVD snapshots, drive emulator console panels that describe_ui cannot see.
- App lifecycle: install/uninstall, start/stop, app_state (running pid plus Metro and embedded bundle), launch_dev_client (Expo development build to Metro, skipping Dev Launcher), reload_app/open_dev_menu, clear data, permissions, deep links, push/pull files, last_crash.
- Logs and capture: one-shot or streaming logcat (supports substring/priority/tag filtering, time windows, optional redact to mask tokens/passwords/API keys before output), clear_logcat, last_crash, screen recording.
- Environment and diagnostics: dark mode, mock location, clear status bar, stay_awake (prevent screen sleep from affecting screenshots), doctor.
- Gradle build and test: assembleDebug, unit tests, instrumented tests, JVM unit test coverage via JaCoCo (get_coverage_report/get_file_coverage), task and variant and module discovery (list_gradle_variants/list_gradle_projects), one-click build_and_run.
- Session defaults: pin project_dir/serial once via session_set_defaults to avoid passing them repeatedly in multi-module/multi-flavor projects or multi-device sessions.
How to use
- Prerequisites: install the Android SDK with platform-tools (adb) and emulator. The server looks them up via $ANDROID_HOME/$ANDROID_SDK_ROOT, otherwise it uses the platform default path (~/Library/Android/sdk on macOS). If the MCP client starts the server without these variables set, you can pass --sdk /path/to/sdk in the client configuration's args. At least one AVD is required. Go is not required: releases provide precompiled binaries, and it is only needed when building from source.
- Installation: run install.sh on macOS/Linux; the script will select the corresponding operArchive for the operating system/architecture, verify SHA-256, and install to ~/.local/bin (can be overridden with BIN_DIR, pin the version with VERSION). You can also download the platform archives yourself from the Releases page (macOS, Linux, Windows, amd64 and arm64); for Windows download the windows_amd64 or windows_arm64 zip and put adb-mcp.exe into PATH. After installation, you can use the built-in updater to stay up to date.
- Register with an MCP client: when registering, the server is launched under the bare name adb-mcp, so it must be in $PATH. It can also be installed as a plugin, which registers the server and adds a skill for each driver guide. Cursor/VS Code support one-click installation. Other clients (Windsurf, Codex, etc.) run adb-mcp via stdio.
- Building from source requires Go 1.26+.
Driver methods are provided as six MCP resources (android://guide/*), which clients can list and read. The core loop is: observe → locate → act → observe again. Use screenshot to view, use describe_ui to get the true pixel center, use tap/tap_on_text/swipe/input_text to act, then take a screenshot to confirm.
Use cases Suitable for development and testing workflows that need to automate UI operations, screenshots, UI inspection, log reading, app lifecycle management, and Gradle builds and tests on Android emulators or real devices, especially when used with MCP clients such as Claude Code, Cursor, and VS Code.
Limitations The materials do not provide information on fees, pricing, platform support scope, or performance guarantees. Android is a trademark of Google LLC; adb-mcp is an independent, unofficial tool and is not affiliated with, sponsored by, or endorsed by Google. The project uses the MIT license.