Android (minhalvp)

Developer tools

An MCP server that provides control over Android devices via adb.

Your AI app calls the Android (minhalvp) MCP server, which does the developer tools work and sends the result back to the chat.

About Android (minhalvp)

Android (minhalvp) is a community MCP server from minhalvp, filed in our directory under developer tools. An MCP server that provides control over Android devices via adb.

Android (minhalvp) runs on your own machine: your AI app starts it with the command uvx android-pilot and talks to it over standard input and output.

At a glance

Publisher
minhalvp (community)
Runs
Locally on your machine
Install from
Python package on PyPI: android-pilot
Written in
Python
License
Apache-2.0
GitHub stars
817

How to set up Android (minhalvp)

  1. Install uv on the machine that runs your AI app, because Android (minhalvp) starts with uvx and fetches its Python package on first run.
  2. Check the Android (minhalvp) README for keys or settings; the registry lists none that Android (minhalvp) requires.
  3. Add Android (minhalvp) to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Android (minhalvp) tools to confirm the connection.
  5. Run one read-only task with Android (minhalvp) first, and keep your app asking before each tool call until the results look right.

Android (minhalvp) compared with similar servers

  • Axuse by ctoldigital has fewer GitHub stars than Android (minhalvp) (816 against 817); both are community servers, and both run locally.
  • Trinity by Abilityai has more GitHub stars than Android (minhalvp) (826 against 817); both are community servers, and both run locally.
  • Line Bot by line has fewer GitHub stars than Android (minhalvp) (809 against 817); both are community servers, and both run locally.

Before you connect Android (minhalvp)

  • Give Android (minhalvp) its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Android (minhalvp) tool call until you trust what it does with them.
  • Treat text that Android (minhalvp) fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Android (minhalvp) on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Android (minhalvp)

How marketing and sales teams put Android (minhalvp) to work, by company size. Pick the size closest to yours and start Android (minhalvp) on one use case.

Small business

  • A small business with a developer can use Android (minhalvp) to ship site and tracking fixes faster, with the AI reading the code it changes.
  • Technical founders can ask Android (minhalvp) to explain and fix a marketing site issue without context switching between tools.
  • Android (minhalvp) runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Growth engineers can use Android (minhalvp) to build landing pages, tracking and integrations in fewer cycles, with reviews kept in the normal flow.
  • Marketing ops engineers can connect Android (minhalvp) to keep scripts and automations documented and versioned as they change.
  • Start Android (minhalvp) on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprise engineering teams can roll out Android (minhalvp) with repo scopes and audit logs, so agents work only where they are allowed.
  • Platform teams can standardize on Android (minhalvp) so web and marketing engineering share one reviewed way of working with AI.
  • Android (minhalvp) is a community server, so have security review the code and pin a version before Android (minhalvp) touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Android (minhalvp) README

From minhalvp/android-mcp-server on GitHub, shared under its Apache-2.0 license. Images are left out; the original has them.

README.md

android-pilot

Let an AI agent use an Android phone or emulator. android-pilot is an MCP server that drives your device over adb, so any MCP client (Claude Code, Codex, OpenCode, ...) can read the screen and interact with it.

Why element refs

Most adb wrappers make the model read a screenshot or XML dump and guess pixel coordinates. Here, snapshot returns compact text in which every actionable element has a ref (e1, e2, ...), and the interaction tools take that ref:

snapshot           → e2 switch "Wi-Fi" [unchecked]
tap(ref="e2")      → Tapped e2 switch "Wi-Fi" [unchecked]

The model never works out a coordinate, and the server refuses to act if the screen changed under it. Picking pixel positions is a well-known weak spot: in AppAgent (CHI 2025), GPT-4 completed 2.2% of Android tasks with raw coordinate actions and 48.9% with element-ID actions.

Requirements

Quick start

Add this to your MCP client's config (most clients use this format; check your client's docs for where the file lives):

{
  "mcpServers": {
    "android": {
      "command": "uvx",
      "args": ["android-pilot"]
    }
  }
}

Or, in Claude Code:

claude mcp add android -- uvx android-pilot

Then check that adb can see your device:

adb devices
List of devices attached
13b22d7f        device

If it says unauthorized, unlock the phone and accept the "Allow USB debugging" prompt. Restart your client and ask something like "Open Settings and tell me which Wi-Fi network I'm connected to."

Options

Add these after "android-pilot" in args:

Option Default Purpose
--device <serial> first device in adb devices Choose a device when several are connected: a serial (13b22d7f), emulator (emulator-5554) or wireless device (192.168.1.10:5555, after adb connect)
--adb-path <path> $ADB_PATH, then adb on PATH Pin the adb binary to use

The server starts even if adb or the device isn't ready yet, so you can plug the phone in after starting your client. Until then, tools return an error that says what's missing, and the next call looks again. A wrong --adb-path (or ADB_PATH) stops the server at startup instead. The device and adb binary it picks are printed to stderr.

Tools

Tool Purpose
snapshot(include_offscreen=False) The screen as compact text, with a ref for each actionable element
screenshot() The screen as a JPEG, at 30% of the device's resolution
tap(ref | x, y, hold=False) Tap (or long-press) an element, or a point in screenshot pixels
swipe(direction, ref=None) Swipe up, down, left or right across an element or the screen. up scrolls down
type(text, ref=None, clear=False, submit=False) Type printable ASCII. ref focuses the field first, clear empties it, submit presses Enter
key(key) BACK, HOME, ENTER, ESCAPE, APP_SWITCH, TAB or DEL
shell(command) Run any adb shell command and return its output

Every action also takes then_snapshot=true, which returns the resulting screen in the same reply and saves a round trip. Results are plain text only, with no duplicate structured copy, and the workflow is explained once in the server's instructions instead of in every tool description.

What snapshot returns

One line per element, in screen order, with only the state that matters:

screen 1080x2400
text "Network & internet"
e1 switch "Wi-Fi (Wi-Fi is on)" [checked]
e2 item "Internet"
e3 edit "Search settings" [focused]
e4 button "Save" [disabled]
e5 list "recycler view"
  • eN is the ref to pass to the interaction tools.
  • Role: button, edit, switch, checkbox, radio, dropdown, tab, list (scrollable) or item (anything else clickable).
  • Label: the element's text or description, or one built from its children or resource ID. Long labels are truncated.
  • Flags appear only when they differ from the default: checked / unchecked, focused, selected, disabled, password (the field's text is left out; see below), scroll, long-click and off-screen.
  • text "…" lines are non-interactive text, for context.

Off-screen elements (browsers expose many) are left out unless you pass include_offscreen=true; the output says how many were omitted.

Text in a field that Android marks as a password is left out of snapshots and error messages; the field is labelled by its description or resource ID instead. Android drops that mark when a password is revealed (a "Show password" toggle, for example), and the text is then shown like any other. Screenshots show whatever is on the screen.

How refs stay safe

Refs belong to the most recent snapshot. Before acting on one, the server reads the screen again and checks that the element at the same place in the UI tree still has the same class, resource ID and label. If it does, the server uses the element's current position (clipped to the screen, so a half-visible element is tapped on its visible part), so small layout shifts don't break the tap. If it doesn't, the tool does nothing and asks for a new snapshot, rather than tapping whatever now sits at the old position.

Security

shell gives the client full shell access to your device, and the other tools can tap, type and read the screen. Only connect clients you trust.

adb itself is a high-trust program: it can shell into every connected device. Pass --adb-path to pin a binary you trust instead of relying on PATH.

Troubleshooting

Symptom Fix
Client can't start the server Use the full path to uvx (which uvx) as command; GUI clients often don't share your shell's PATH
adb is not on PATH Install platform-tools, or pass --adb-path /full/path/to/adb
Server exits with adb not found at … or … is not executable --adb-path / ADB_PATH must point to the adb binary itself
no devices connected Check the cable, enable USB debugging, run adb devices. No restart needed: the next tool call looks again
device … is unauthorized Unlock the phone and accept the "Allow USB debugging" prompt; if it doesn't appear, run adb kill-server and retry
device … is offline Reconnect the device (cable or wireless debugging), or run adb kill-server
adb can't access device … no permissions Linux: install udev rules for Android devices (e.g. the android-udev package) and replug
device … not found --device must match the first column of adb devices exactly
adb … timed out after 15s The device or adb server is stuck: replug, or run adb kill-server
… changed or is gone; call snapshot again The screen changed since the snapshot. Call snapshot and retry
… moved and N elements now match it The element moved, and several identical ones (e.g. repeated "Details" rows) are now on screen, so the server won't guess. Call snapshot and retry
type fails on non-ASCII adb text entry supports printable ASCII only

Development

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

To try a local checkout in a client, use "command": "uv", "args": ["--directory", "/path/to/android-mcp-server", "run", "android-pilot"].

android_pilot/
  server.py   the MCP tools, the ref store and the android-pilot command
  screen.py   UI Automator XML → elements with refs → compact text; ref checks
  device.py   the adb binary: the only module that runs anything

Changes are listed in CHANGELOG.md.

License

Apache 2.0

Questions about Android (minhalvp)

What is the Android (minhalvp) MCP server?

An MCP server that provides control over Android devices via adb. Android (minhalvp) is maintained by minhalvp on GitHub at minhalvp/android-mcp-server, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Android (minhalvp) MCP server?

Add Android (minhalvp) to your AI app's MCP config with the command uvx android-pilot. In Claude Code, run claude mcp add --transport stdio android -- uvx android-pilot. To run Android (minhalvp) this way you need uv installed.

Does Android (minhalvp) need an API key?

The registry lists no required keys for Android (minhalvp). Check the Android (minhalvp) README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Android (minhalvp) an official MCP server?

No. Android (minhalvp) is a community server maintained by minhalvp. Community servers can be excellent; read the code and the open issues before you give Android (minhalvp) access to company data.

What license is Android (minhalvp) under?

Android (minhalvp) is released under the Apache-2.0 license, according to its GitHub repository. The license covers the code of Android (minhalvp); the service it connects to has its own terms.