android-mcp
Enables AI clients to operate Android devices over ADB: list attached devices, inspect device info and UI hierarchy, take screenshots, tap/swipe/press keys, type text, launch/install/uninstall apps, retrieve logcat logs, and run a small allowlisted set of read-only shell commands.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
android-mcp
English | 简体中文
An MCP (Model Context Protocol) server that lets an AI client operate Android devices over ADB — list devices, inspect the screen, read the UI hierarchy, tap and swipe, type text, manage apps, and pull logs.
The server talks to devices through the standard adb binary from Android
platform-tools. It never builds shell strings: every adb invocation is an
argument list with a timeout and bounded output, and commands that target a
device always carry an explicit serial when more than one device is present.
Requirements
Python 3.11+
Android platform-tools (
adb) on your PATH, or pointed to by theADB_PATHenvironment variableA device or emulator with USB debugging enabled
Related MCP server: android-phone-mcp
Install
pip install .For development:
python -m venv .venv
.venv/bin/pip install -e '.[dev]'Run
android-mcp # console script
python -m android_mcp # equivalentThe server speaks MCP over stdio. Example client configuration (for an MCP client that launches servers as subprocesses):
{
"mcpServers": {
"android": {
"command": "android-mcp",
"env": { "ADB_PATH": "/path/to/platform-tools/adb" }
}
}
}Tools
Tool | Description |
| Devices visible to adb, with state and model. Returns an empty list plus an error message instead of failing when adb is missing. |
| Model, manufacturer, Android version, SDK, build id, battery level. |
| Current screen as a PNG image. |
| UI hierarchy as a compact text tree (class, text, id, bounds, |
| Tap at pixel coordinates. |
| Swipe between two points with a duration. |
| Key by name ( |
| Type text into the focused field (no newlines). |
| Launch an app by package name. |
| Installed packages, optionally third-party only. |
| Install a local APK ( |
| Uninstall by package name. |
| Last N log lines (1–1000), with optional substring filter. |
| One read-only command from a strict allowlist: |
Most tools accept an optional serial. When exactly one usable device is
attached it is selected automatically; with several, the serial is required
so commands are never ambiguous.
Safety notes
shell_readonlyis the only free-form command surface, and it is deliberately tiny: tokens are character-checked (no shell metacharacters) and arguments are constrained per command.Package names for launch/uninstall are validated against the standard package-name grammar.
Text input escapes spaces and shell metacharacters for
adb shell input text.All adb calls have timeouts (30 s default, longer for installs) and captured output is capped at 4 MiB.
Development
.venv/bin/python -m pytestThe test suite needs no real device: it runs against a fake adb
executable (tests/fake_adb.py) that serves canned devices, properties,
screenshots, UI dumps, and logs, and it includes an end-to-end test that
spawns the server over stdio and calls its tools through a real MCP client.
License
MIT — see LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Cloud Android devices for AI agents: install an APK, read the screen, tap, type, read logcat.
Give your AI agent a real cloud Android phone: push APKs, drive it, get screenshots and logs.
Let Claude, ChatGPT and other agents use your Android phone: see the screen, tap, type, open apps.
Let AI agents control Android and iOS devices on Mobilerun Cloud: screen, input, apps, workflows.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables AI assistants to interact with Android devices and emulators via ADB, providing tools for screenshots, UI inspection, touch and text input, app management, and device control.42113 npm23MIT
- AlicenseAqualityCmaintenanceEnables an AI client to control an Android emulator or USB device over ADB by selecting a device, inspecting the UI hierarchy, and performing taps, swipes, text entry, key presses, and app launches. It relies only on Android platform-tools and exposes a compatible tool surface for phone automation.12MIT
- AlicenseAqualityBmaintenanceEnables AI agents to control Android devices through the Android Debug Bridge, covering device listing, shell commands, app install/uninstall, logcat reading, screenshots, UI automation (tap/swipe/type/key events), dumpsys queries, file transfer, port forwarding, permission management, and Wi-Fi pairing. Failures are mapped to typed, actionable causes and tool calls are safety-annotated and guardrailed, with multi-device calls scoped explicitly by serial.3547 npmMIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to control a real Android device over adb with nothing installed on the phone, exposing tools to list devices, dump the UI as numbered tappable refs, tap, type, swipe, send key events, launch and close apps, read device state, capture screenshots, and wait.70 PyPI1MIT