Skip to main content
Glama

English | Русский

adb-mcp-android

MCP bridge between Cursor / Claude Desktop (or any MCP client) and an Android phone or emulator over ADB.

The server talks to the official adb binary on your machine. It does not ship USB drivers or Android platform-tools — install those separately (drivers may live in another folder on your PC).

Features

Tool

What it does

adb_version

Resolved adb path + version string

list_devices

adb devices -l

device_info

Model, Android version, ABI, battery, screen size

shell

Run any adb shell command

getprop

One property or the full map

install_apk / uninstall_app

Install / remove packages

push_file / pull_file

Host ↔ device file copy

screenshot

PNG capture (optional save path + base64)

logcat

Recent dump, optional filter / clear

input_tap / input_swipe / input_text / input_keyevent

UI input

start_activity / force_stop / list_packages

App control

connect / disconnect

TCP/IP ADB

reboot

Normal / bootloader / recovery / sideload

battery / screen_metrics

Power + wm size / density

port_forward / port_forward_remove

Host → device forwards

port_reverse / port_reverse_remove

Device → host reverses

Most tools accept an optional serial. If omitted, the server uses ANDROID_SERIAL / ADB_SERIAL, or ADB’s default single device.

Related MCP server: adb-mcp-server

Prerequisites (not bundled)

  1. Android platform-tools — this project expects bin/platform-tools/adb (or adb.exe on Windows). You can also put adb on PATH, or set ADB_PATH to another install.

  2. USB drivers (Windows) — OEM or Google USB driver; keep them separately. This repo does not include driver packages.

  3. On the phone: Developer options → USB debugging (and authorize the PC fingerprint when prompted).

  4. Python 3.10+.

Quick check:

adb version
adb devices

You should see your device as device (not unauthorized / offline).

Quick start with uvx

Requires uv.

uvx --from git+https://github.com/ZetsuOne/adb-mcp-android adb-mcp-android

Cursor / Claude Desktop

{
  "mcpServers": {
    "adb-android": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/ZetsuOne/adb-mcp-android", "adb-mcp-android"]
    }
  }
}

adb is taken from bin/platform-tools/ automatically. Optional env:

"env": {
  "ANDROID_SERIAL": "XXXXXXXX"
}

Classic install (venv)

Windows (PowerShell)

git clone https://github.com/ZetsuOne/adb-mcp-android.git
cd adb-mcp-android
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
pip install -r requirements.txt

If PowerShell blocks activation:

Set-ExecutionPolicy -Scope CurrentUser RemoteSigned

Smoke-test:

python client.py

Run the server (stdio; waits for an MCP client):

python server.py
# or after `pip install -e .`:
adb-mcp-android

Local Cursor config:

{
  "mcpServers": {
    "adb-android": {
      "command": "C:\\Projects\\adb-mcp-android\\.venv\\Scripts\\python.exe",
      "args": ["C:\\Projects\\adb-mcp-android\\server.py"]
    }
  }
}

Linux / macOS

git clone https://github.com/ZetsuOne/adb-mcp-android.git
cd adb-mcp-android
python3 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip
pip install -r requirements.txt
python client.py

Environment variables

Variable

Meaning

ADB_PATH / ADB_EXECUTABLE

Override path to adb (default: bin/platform-tools/adb[.exe], then PATH)

ANDROID_SERIAL / ADB_SERIAL

Default device serial when tools omit serial

Example responses

list_devices:

{
  "ok": true,
  "count": 1,
  "devices": [
    {
      "serial": "RFCX123456",
      "state": "device",
      "model": "Pixel_7",
      "device": "panther",
      "product": "panther"
    }
  ]
}

device_info (truncated):

{
  "ok": true,
  "device": {
    "manufacturer": "Google",
    "model": "Pixel 7",
    "android_version": "14",
    "sdk": "34",
    "wm_size": "Physical size: 1080x2400",
    "battery": { "level": 81, "status": 2 }
  }
}

Project layout

Path

Role

server.py

MCP server (stdio) and adb-mcp-android entry point

adb_client.py

ADB subprocess helper

client.py

Stdio smoke-test client

pyproject.toml

Packaging + console script

requirements.txt

Runtime deps for pip install -r

Safety notes

  • shell can run arbitrary device commands — use only on devices you own/control.

  • USB drivers and platform-tools are external dependencies; do not commit proprietary OEM driver blobs into this repo.

  • Prefer a dedicated test device when experimenting with install / reboot / force-stop.

License

MIT — see LICENSE.

Available Tools

27 tools
adb_versionA

Return the resolved ADB binary path and adb version output.

Inputs: no named parameters. Returns: object

batteryB

Return parsed dumpsys battery fields (level, status, temperature, …).

Inputs: serial. Returns: object

connectC

Connect to a device over TCP/IP, e.g. 192.168.1.10:5555.

Inputs: host_port (required). Returns: object

device_infoB

Hardware/software summary for a device (model, Android version, battery, screen).

Inputs: serial. Returns: object

disconnectA

Disconnect a TCP/IP device, or all if host_port is omitted.

Inputs: host_port. Returns: object

force_stopC

Force-stop an application by package name.

Inputs: package (required), serial. Returns: object

getpropA

Read one Android system property, or all properties if name is omitted.

Inputs: name, serial. Returns: object

input_keyeventB

Send a keyevent (name or code), e.g. KEYCODE_HOME, KEYCODE_BACK, 3, 4.

Inputs: keycode (required), serial. Returns: object

input_swipeC

Swipe from (x1,y1) to (x2,y2) over duration_ms.

Inputs: x1 (required), x2 (required), y1 (required), y2 (required), +2 more. Returns: object

input_tapC

Tap screen coordinates (pixels).

Inputs: x (required), y (required), serial. Returns: object

input_textB

Type text into the focused field (best-effort escaping for ADB input text).

Inputs: text (required), serial. Returns: object

install_apkC

Install an APK from the host filesystem onto the device.

Inputs: apk_path (required), serial, replace, grant_permissions. Returns: object

list_devicesA

List connected Android devices/emulators (adb devices -l).

Inputs: no named parameters. Returns: object

list_packagesC

List installed packages, optionally third-party only or filtered.

Inputs: serial, filter_text, third_party_only. Returns: object

logcatC

Dump recent logcat lines. Optional filter_spec e.g. 'ActivityManager:I *:S'.

Inputs: clear, lines, serial, filter_spec. Returns: object

port_forwardC

Forward a host port to a device port, e.g. local=tcp:8080 remote=tcp:8080.

Inputs: local (required), remote (required), serial. Returns: object

port_forward_removeC

Remove one port forward, or all if local is omitted.

Inputs: local, serial. Returns: object

port_reverseC

Reverse-forward a device port to a host port.

Inputs: local (required), remote (required), serial. Returns: object

port_reverse_removeC

Remove one reverse forward, or all if remote is omitted.

Inputs: remote, serial. Returns: object

pull_fileC

Copy a file or directory from the device to the host.

Inputs: local_path (required), remote_path (required), serial. Returns: object

push_fileC

Copy a file or directory from the host to the device.

Inputs: local_path (required), remote_path (required), serial. Returns: object

rebootC

Reboot the device. Optional mode: bootloader, recovery, sideload.

Inputs: mode, serial. Returns: object

screen_metricsB

Return wm size and wm density for the device.

Inputs: serial. Returns: object

screenshotB

Capture the current screen as PNG. Optionally save to disk and/or return base64.

Inputs: serial, save_path, include_base64. Returns: object

shellC

Run a shell command on the device (adb shell …).

Inputs: command (required), serial, timeout_sec. Returns: object

start_activityC

Start an activity by component, e.g. com.example/.MainActivity.

Inputs: component (required), serial, extra_args. Returns: object

uninstall_appC

Uninstall an app by package name.

Inputs: package (required), serial, keep_data. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 27 tools

    Disambiguation4/5

    Most tools target a distinct resource or action, and the port_forward/port_reverse families are cleanly split into add/remove pairs. The main fuzzy spots are device_info, which claims to summarize battery and screen even though dedicated `battery` and `screen_metrics` tools exist, and `shell`, which subsumes getprop and the input_* tools. Boundaries are still clear enough from descriptions that misselection is unlikely.

    Naming Consistency3/5

    Everything is snake_case, which keeps it readable, but the convention is mixed: verb_noun forms (install_apk, push_file, list_devices, start_activity) coexist with bare noun/verb names (shell, screenshot, logcat, battery, getprop, reboot, connect). The noun_resource_verb style of port_forward_remove also deviates from the verb-first pattern. Predictable enough to navigate, but not a single consistent scheme.

    Tool Count3/5

    27 tools is heavy for the stated guidance band, driven by ADB's genuinely broad surface. Several clusters could be consolidated (four input_* tools, four port forward/reverse tools, three device-status tools like battery/screen_metrics/device_info), which would reduce count without losing capability.

    Completeness4/5

    Core lifecycle is well covered: device discovery and connection, install/uninstall, file transfer, shell, input injection, activity launching, logging, and port forwarding. Notable gaps are UI hierarchy dumping (uiautomator), generic dumpsys/settings manipulation, and app data clearing, though the `shell` tool lets an agent work around most of these.

    Maintenance

    ActivityMaintained
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables programmatic control of Android devices via ADB, supporting UI automation, app management, screen capture with OCR, and file transfers through the Model Context Protocol. It allows MCP-compatible clients like Claude Desktop and Cursor to interact directly with physical or emulated Android devices.
      27 PyPI
      3
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables MCP-compatible agents to control an Android device over the network via ADB, providing tools for shell commands, screen capture, UI inspection, file operations, and input simulation.
      14 npm
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents and test runners to control Android devices via local ADB, including listing devices, tapping, swiping, typing, sending system keys, launching apps, and dumping UI hierarchy. Communicates over MCP stdio without exposing network listeners.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables controlling an Android device from an MCP client via ADB, including wireless debugging discovery, UI-tree inspection, and performing taps, swipes, typing, app actions, and shell commands without relying on screen coordinates.
      MIT