# Repository Briefing: CursorTouch/Android-MCP
> Source: https://repoforai.com/repo/CursorTouch/Android-MCP (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/CursorTouch/Android-MCP
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: Python
- **License**: MIT
- **Engineering Health**: A+ (91/100 · Maintenance 35/35 · Adoption 16/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v0.3.0 (2026-11-20) — https://github.com/CursorTouch/Android-MCP/releases
- **Review Snapshot**: 2026-12-03
- **Deployment / Stack Signals**: MCP, CLI, Self-Hosted
- **Momentum**: 942 ★ total (+1 24h / +1 7d) · 126 forks
- **Topics**: `ai`, `android`, `automation`, `mcp-server`
- **When to Use**: Best for: Agent-assisted Android UI smoke tests, demos, and exploratory workflows on authorized phones or emulators, where the client needs to inspect the screen before choosing an action. Skip if: You need reliable selector lookup on continuously updating screens, full multilingual input without installing a keyboard app, or only a fixed sequence already handled by ADB scripts.

## Overview
```text
### Architecture & Core Mechanics
Android MCP runs as a Python 3.13+ process that exposes MCP tools over stdio and sends device operations through host-side ADB. The manifest declares FastMCP, Click, and Pillow for the MCP interface, CLI, and image processing. The server does not run model inference; the MCP client decides what to observe and which action to take.

The code is split into four layers: `android_mcp.adb` talks to ADB, `android_mcp.tree` reads the Android UI hierarchy, `android_mcp.mobile` manages state and actions for one connected device, and `android_mcp.server` exposes tools and selects the target. Connection is lazy: an MCP client can start the process before a device is attached, but the first tool call needs a usable ADB target.

### Key Capabilities & Differentiators
`Snapshot` returns interactive elements with labels and tap coordinates. `use_vision` adds a screenshot; `use_annotation=false` leaves it unmarked. `ClickBySelector` matches exact text, resource ID, class name, or description. It accepts an index when multiple elements match, and a resource ID can be given as just the part after the slash.

The action tools cover taps, long presses, swipes, drags, key presses, the notification shade, and waits for elements. Device tools list, select, and disconnect targets and can switch between USB and Wi-Fi. `Type` can focus a field by coordinates, clear it, and enter text. It uses native ADB input where possible and requires the optional ADBKeyboard app for characters that input path cannot handle, including CJK and emoji.

### Trade-offs & Limitations
Compared with the earlier UIAutomator2-based implementation, v0.3.0 removes the required companion service from the device, but it still depends on `uiautomator dump` for structured element lookup. If a video or timer keeps the screen from going idle, the dump can fail. In that case, `Snapshot` with `use_vision` can return a screenshot without elements, and coordinate taps remain available. Compared with raw ADB scripts, the MCP layer is useful when a client must inspect the screen before choosing an action; fixed sequences may not need it.

Drag requires Android 8 or later. Native field clearing uses `input keycombination` on Android 12 or later; older versions use a slower fallback capped at 200 characters. Full multilingual input is not part of the installation-free baseline: ADBKeyboard must be installed separately, requires a focused field, and temporarily switches the active input method.

### Hardware & Deployment Guide
Self-hosting requires Python 3.13+ and Android platform-tools (`adb`). Start the published package with `uvx --python 3.13 android-mcp`, or use `uv run android-mcp` from a checkout. Configure the MCP client to launch the process over stdio. If ADB is not discovered on `PATH` or in SDK locations, set `ANDROID_MCP_ADB_PATH` explicitly.

By default, the server selects the first physical device, or an emulator if none is present. Set `--device SERIAL` or `ANDROID_MCP_DEVICE` to pin the target; `--connection` selects `auto`, `usb`, or `wifi`, and CLI options override environment variables. Release v0.2.0 moved the extension manifest to `uv` and exposed device, connection, and screenshot settings. Release v0.3.0 then removed the UIAutomator2 dependency to address its companion service's startup failure on Android 17 (API 37).
```

## Key Capabilities
```text
- Device footprint: v0.3.0 uses ADB without installing a required companion service on Android.
- Screen inspection: `Snapshot` returns labeled elements and tap coordinates, with optional annotated or clean screenshots.
- Element lookup: `ClickBySelector` matches text, resource ID, class name, or description and supports an index for duplicate matches.
- Device routing: Configure a serial or network endpoint, select auto/USB/Wi-Fi, or switch the active device's transport through MCP.
- Text input: Native ADB handles printable ASCII and supported accented Latin letters; optional ADBKeyboard covers CJK, emoji, and other unsupported characters.
- Development checks: `uv` runs pytest and Ruff; the test suite does not require an attached device.
```

## Quick Start / Clone
```bash
uvx --python 3.13 android-mcp
```
