← Back to Leaderboard
Aminhalvp

minhalvp/android-mcp-server

Local MCP server for Android UI automation over adb, with element refs for targeting.

View on GitHub ↗
Engineering Health (Methodology)
A · 82/100
Maintenance Activity
● Updated yesterday
Latest Release
Rolling commits (main)
Commercial License Check
Apache-2.0 · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption16/25
Release Cadence11/20
License Clarity20/20
MCPCLILocal AI
Total Stars
★ 818
24h Growth
+1
7d Growth
+3
Forks
93

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

minhalvp/android-mcp-server Star History (2025-03-07 - 2026-12-04) ALL-TIME STAR HISTORY (2025-03 – 2026-12) +817 in 637d · avg +1/day 864 432 0 2025-03-07: ★ 12025-04-19: ★ 2832025-05-31: ★ 3612025-07-12: ★ 4292025-08-23: ★ 4882025-10-04: ★ 5402025-11-15: ★ 5802025-12-27: ★ 6042026-02-07: ★ 6452026-03-21: ★ 6952026-05-02: ★ 7332026-06-13: ★ 7582026-07-25: ★ 7812026-09-05: ★ 8022026-10-17: ★ 8102026-12-04: ★ 818 ★ 818 2025-03 2026-01 2026-12

Evidence-Backed Technical Brief

AI Deep Review

Architecture & Core Mechanics

android-pilot is a local Python MCP server that exposes an Android phone or emulator to an MCP client through adb. The package requires Python 3.11 or later and declares mcp>=2,<3 and Pillow>=10. Its entry point is android-pilot. server.py exposes the tools and holds the reference store; screen.py parses UI Automator XML, renders compact text, and checks element refs; device.py is the only module that executes external commands.

The interaction loop is observe, act, and refresh. A snapshot assigns eN refs to actionable controls. The client passes a ref to a tool instead of turning a visual position into coordinates. Before acting, the server checks that the target still resolves; it rejects a stale or ambiguous target rather than guessing. MCP is the integration boundary: Claude Code, Codex, and OpenCode are named client examples, and no model runs inside the server.

Key Capabilities & Differentiators

The text snapshot reports screen size, static text for context, and actionable elements with roles, labels, and relevant states such as focus, checked, and disabled. Off-screen elements are omitted by default but can be requested with include_offscreen=True; password field text is omitted from snapshots. Clients can tap or long-press, swipe in four directions, type printable ASCII, and send a fixed set of navigation and editing keys. Text entry can focus a field by ref, clear it, or submit it.

When the UI hierarchy does not expose a usable target, screenshot() returns a JPEG scaled to 30% of device resolution, and tap accepts coordinates in screenshot pixels. then_snapshot=true lets a client get the resulting text snapshot in the action response rather than making a separate call. shell(command) provides a separate escape hatch for arbitrary adb shell commands; it is not constrained by element-reference checks.

Trade-offs & Limitations

Against a raw adb wrapper, the text-and-ref layer gives an agent named controls and state instead of making it interpret XML or guess screenshot coordinates. This is most useful when the UI Automator hierarchy exposes useful labels and actionable nodes. Custom-drawn interfaces and poorly labeled controls push the client back to screenshots and coordinates. Ref checks reduce accidental actions but can require extra snapshots on rapidly changing screens or in lists with identical rows. The screenshot scale can obscure fine detail, and built-in text entry is limited to printable ASCII.

Compared with a scripted UI test suite, the server is better suited to exploratory or assisted navigation than to repeatable regression assertions. Its main operational constraint is trust: a connected client can read the screen, send input, and run arbitrary commands with adb shell permissions. Ref validation prevents some wrong-target taps, not unauthorized behavior, and omitting password field text from snapshots does not make other screen data private. Use trusted clients, a known adb binary, and dedicated test devices.

Hardware & Deployment Guide

Install uv and Android Platform-Tools, make adb available to the client process, and connect an emulator or an authorized phone with USB debugging enabled. Register uvx android-pilot as the MCP command, or use claude mcp add android -- uvx android-pilot with Claude Code. Use adb devices to confirm that the target is ready. If multiple devices are attached, the default is the first listed device; specify --device to make the target explicit.

The server can start before adb or the device is ready and retry discovery on a later tool call. An invalid explicit --adb-path or ADB_PATH, by contrast, prevents startup. GUI clients that inherit a different PATH may need an absolute uvx path. A source checkout can be launched with uv --directory /path/to/android-mcp-server run android-pilot; development checks use pytest, Ruff, and ty. The manifest identifies version 0.2.0a3 as alpha, and no GitHub release is listed. Pin the version you validate before adopting it for a shared workflow.

Module boundaries: server.py registers MCP tools and stores refs; screen.py parses UI Automator XML and validates refs; device.py is the only module that runs external commands.
Element targeting: Snapshots assign eN refs to actionable elements. Changed, missing, or ambiguously moved targets require a fresh snapshot rather than a guessed tap.
Tool-call efficiency: UI actions accept then_snapshot=true, returning the resulting screen state without a separate snapshot call.
Visual fallback: screenshot() returns a JPEG at 30% of device resolution, and coordinate taps use screenshot pixels.
Device lifecycle: The server can start before adb or a device is ready and retry discovery on the next tool call; --device selects a specific target.
Permission boundary: shell(command) runs arbitrary adb shell commands with the Android shell's permissions; the client can also read and operate the UI.
Best For

Exploratory Android QA, reproducing UI bugs, and checking app or system state on a trusted emulator or dedicated test phone, especially when the UI exposes usable element labels.

Skip If

You need deterministic regression assertions, built-in non-ASCII text entry, or a least-privilege interface for untrusted clients or sensitive devices.

Reviewed on 2026-12-04 · Grounded in GitHub README, root file tree & releasesMethodology

Quick Start & Installation

MCPCLILocal AI
git clone https://github.com/minhalvp/android-mcp-server.git
cd android-mcp-server
uv sync               # installs the project and dev tools (pytest, ruff, ty)
uv run pytest
uv run ruff check .
uv run ty check

Comparison vs. Top Coding, Skills & MCP Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
android-mcp-server ★818+3PythonApache-2.0Local MCP server for Android UI automation over adb, with element refs for targe
skills204.1k+2.5kPython—A Claude Agent Skills catalog for packaging and reusing task workflows
ui-ux-pro-max-skill158.5k+3.6kPythonMITA search-and-rules skill that gives coding agents a UI design system to build fr
graphify156.8k+2.4kPythonApache-2.0Local AST graphs for dependency tracing, with CLI and MCP access.

AI Context Briefing (for Claude / Cursor / Windsurf)

Standardized architecture summary & quickstart commands ready to paste into coding agents.

Raw .md ↗
curl -sL https://repoforai.com/repo/minhalvp/android-mcp-server.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

minhalvp/android-mcp-server Star History on RepoForAI

Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).

Frequently Asked Questions about android-mcp-server

How does an MCP client select a device and interact with it?

Register uvx android-pilot as a local MCP command and confirm that adb devices lists an authorized phone or emulator. Start with snapshot, pass the returned element ref to an action, and refresh the snapshot if the server rejects that ref. Set --device explicitly when more than one target is connected.

What CPU, memory, or VRAM should I budget for?

The server has no model runtime or CUDA requirement. Its host-side work is Python tool handling, adb calls, UI XML processing, and JPEG generation. Budget separately for a local emulator or a locally hosted model if either shares the host. No measured CPU, RAM, or VRAM figures are available.

Can I self-host it or ship it with a commercial product?

Yes. Apache-2.0 permits commercial use and self-hosting. For redistribution, review the license terms on retaining the license and applicable notices and marking modified files. Local deployment does not restrict the MCP client's permissions or determine where the client sends tool results.

When is this a better fit than raw adb or scripted UI tests?

Compared with raw adb, it adds compact element descriptions and checks that prevent an agent from guessing which control to use after the screen changes. Compared with a scripted UI test suite, it fits exploratory tasks where the agent decides the next step from the current screen. Keep scripted tests for repeatable assertions and use this server where interactive navigation is the goal.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining minhalvp/android-mcp-server? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature minhalvp/android-mcp-server on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

Top 10 Breakout Open-Source AI Repos, Every Thursday

Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.

Zero spam · 1-click unsubscribe · Privacy Policy

Saved in your browser · Export Markdown RFC tables or jump into /vs compare