android-mcp
Control, inspect, and automate Android devices, Waydroid, and AVD emulators via ADB through MCP tools.
Check device connection and get model/OS version
Capture screenshots as base64 PNG for visual analysis
Tap exact screen coordinates or click UI elements by text/description
Perform swipes, drags, and multi-point gestures
Type text into focused input fields and press hardware keys (BACK, HOME, ENTER, POWER, etc.)
Inspect the full UI hierarchy with text labels, resource IDs, and bounds
Launch, stop, and list installed apps
Run raw ADB shell commands directly on the device
Enables AI agents to control, inspect, and automate Android devices, Waydroid containers, and AVD emulators over ADB. Provides tools for capturing screenshots, tapping coordinates or clicking UI elements by text label, swiping/dragging, typing text, pressing hardware keys (HOME, BACK, ENTER, POWER, VOLUME), retrieving the on-screen UI hierarchy, launching/stopping/listing installed apps, and running raw ADB shell commands.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@android-mcp Take a screenshot and tap the Sign In button"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
š¤ android-mcp
A standard Model Context Protocol (MCP) server that enables AI agents (Claude Desktop, Cursor, Antigravity, and autonomous LLMs) to directly control, inspect, and automate Android devices, Waydroid, and AVD emulators over ADB.
šļø Architecture
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā AI Client (Claude / Cursor) ā
āāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāā
ā JSON-RPC (stdio)
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā android-mcp ā
ā (Model Context Protocol) ā
āāāāāāāāāāāāāāāā¬āāāāāāāāāāāāāāāāā
ā ADB (Android Debug Bridge)
ā¼
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā
ā Android Device / Waydroid ā
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāRelated MCP server: scrcpy-mcp
⨠Features
šļø Vision Support: Captures instant PNG screenshots directly into the LLM's context window.
šÆ Smart UI Click: Parse on-screen XML hierarchy (
uiautomator) and click buttons by human label or text (e.g.android_click_by_text("Sign In")).š Gestures & Input: Full support for precise taps, multi-point swipes/drags, and text typing.
āØļø Hardware Keys: Send system keys (
BACK,HOME,ENTER,POWER,VOLUME).š± App Management: Launch, stop, and inspect installed third-party apps.
ā” Zero External Pip Dependencies: Built entirely on Python standard library and ADB.
š Quick Setup
1. Prerequisites
Ensure adb is installed and your device or Waydroid container is connected:
# Verify ADB sees your device or emulator
adb devices2. Connect to Claude Desktop
Open your Claude Desktop configuration file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/Claude/claude_desktop_config.json
Add android-mcp to your mcpServers:
{
"mcpServers": {
"android": {
"command": "python3",
"args": ["/path/to/android-mcp/run_server.py"]
}
}
}3. Connect to Cursor / Other MCP Clients
Add an entry pointing to python3 /path/to/android-mcp/run_server.py in your client's MCP settings tab.
š ļø Available MCP Tools
Tool Name | Description |
| Verify device connection, model, and OS version |
| Capture screen as base64 PNG for AI visual analysis |
| Find button or label by text and tap its center |
| Tap exact screen coordinate |
| Drag / swipe from |
| Type string into the active focused input field |
| Press system key ( |
| Get list of all visible text elements and bounds |
| Launch app by package name (e.g. |
| Force-stop an app package |
| List installed application package names |
| Run raw ADB shell command on device |
š¬ Example Prompts for Your AI
Once connected in Claude or Cursor, you can ask your AI naturally:
"Check if my Android device is connected."
"Take a screenshot of Android and tell me what screen is currently open."
"Tap the Settings button on screen."
"Type 'hello world' into the active search bar and press Enter."
"Go back to the Home screen."
āļø Environment Variables (Optional)
Variable | Description |
| Specific device serial number to target (if multiple devices are connected) |
| Fallback TCP host:port to auto-connect (default: |
š”ļø License
Distributed under the MIT License. Free for personal and commercial use.
Available Tools
12 toolsandroid_check_connectionA
Check connection status with Android device or emulator, returning model and Android OS version.
Inputs: no named parameters.
android_click_by_textB
Smart-click: searches the screen UI hierarchy for an element with matching text or description and taps its center.
Inputs: text (required).
android_get_ui_treeB
Inspect all visible UI elements on the current Android screen, returning text labels, resource IDs, and bounding coordinates.
Inputs: no named parameters.
android_launch_appB
Launch an Android app by its package name (e.g. com.android.settings).
Inputs: package_name (required).
android_list_appsC
List installed application package names on the device.
Inputs: third_party_only.
android_press_keyA
Press an Android hardware/system key (BACK, HOME, ENTER, TAB, POWER, VOLUME_UP, VOLUME_DOWN).
Inputs: key (required).
android_screenshotA
Capture the current screen of the Android device and return it as a base64 PNG image for visual analysis.
Inputs: no named parameters.
android_shellC
Execute an ADB shell command directly on the Android device.
Inputs: command (required).
android_stop_appB
Force-stop a running Android application.
Inputs: package_name (required).
android_swipeB
Perform a swipe or drag gesture from (x1, y1) to (x2, y2).
Inputs: x1 (required), x2 (required), y1 (required), y2 (required), +1 more.
android_tapC
Tap on specific screen coordinates (x, y).
Inputs: x (required), y (required).
android_type_textB
Type a string of text into the currently active input field on Android.
Inputs: text (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
TDQS
Scored across 12 tools
Each tool has a clearly distinct purpose: connection check, screenshot, coordinate tap, swipe, text input, key press, text-based click, UI tree inspection, and app lifecycle commands. The only mild overlap is android_tap vs android_click_by_text and android_shell's broad scope, but descriptions make the boundaries explicit.
Every tool uses the consistent android_ prefix with a verb-based snake_case convention (android_tap, android_type_text, android_launch_app). No deviations or mixed conventions.
12 tools is well-scoped for Android device automation, covering interaction, inspection, and app management without redundancy. Each tool earns its place.
Covers the full core lifecycle: connect, screenshot, input (tap/swipe/type/key/click-by-text), UI inspection, app launch/stop/list, and raw shell. Minor gaps like long-press or explicit scroll/read-field operations exist but are workable via swipe, shell, or UI tree.
Maintenance
Related MCP Connectors
Give your AI agent a real cloud Android phone: push APKs, drive it, get screenshots and logs.
Cloud Android phones for AI agents: create a phone, read the screen, tap, type, install APKs, park.
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.42200 npm22MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to visually perceive and directly control Android devices via ADB and screen-control tooling, including screenshots, taps, swipes, typing, app management, UI inspection, file transfer, shell commands, and audio/video streaming.357 npmMIT
- 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.12386 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to see and control Android devices over ADB and scrcpy, with image-returning screenshots, taps, swipes, typing, app and file management, UI element inspection, shell commands, and video/audio streaming or recording. It offers fast scrcpy-based input and screenshots with automatic ADB fallback so tools keep working when scrcpy isn't available.357 npmMIT