$git clone https://github.com/CursorTouch/Android-MCP</div>
| 1 | <div align="center"> |
| 2 | |
| 3 | <h1>🤖 Android MCP</h1> |
| 4 | |
| 5 | <a href="https://github.com/CursorTouch/Android-MCP/blob/main/LICENSE"> |
| 6 | <img src="https://img.shields.io/badge/license-MIT-green" alt="License"> |
| 7 | </a> |
| 8 | <img src="https://img.shields.io/badge/python-3.13-blue" alt="Python"> |
| 9 | <img src="https://img.shields.io/badge/platform-Android%2010+-blue" alt="Platform"> |
| 10 | <img src="https://img.shields.io/github/last-commit/CursorTouch/Android-MCP" alt="Last Commit"> |
| 11 | <br> |
| 12 | <a href="https://x.com/CursorTouch"> |
| 13 | <img src="https://img.shields.io/badge/follow-%40CursorTouch-1DA1F2?logo=twitter&style=flat" alt="Follow on Twitter"> |
| 14 | </a> |
| 15 | <a href="https://discord.com/invite/Aue9Yj2VzS"> |
| 16 | <img src="https://img.shields.io/badge/Join%20on-Discord-5865F2?logo=discord&logoColor=white&style=flat" alt="Join us on Discord"> |
| 17 | </a> |
| 18 | |
| 19 | </div> |
| 20 | |
| 21 | <br> |
| 22 | |
| 23 | **Android-MCP** is a lightweight, open-source tool that bridge between AI agents and Android devices. Running as an MCP server, it lets LLM agents perform real-world tasks such as **app navigation, UI interaction and automated QA testing** without relying on traditional computer-vision pipelines or preprogramed scripts. |
| 24 | |
| 25 | <https://github.com/user-attachments/assets/cf9a5e4e-b69f-46d4-8487-0f61a7a86d67> |
| 26 | |
| 27 | ## ✨ Features |
| 28 | |
| 29 | - **Native Android Integration** |
| 30 | Interact with UI elements via ADB and the Android Accessibility API: launch apps, tap, swipe, input text, and read view hierarchies. |
| 31 | |
| 32 | - **Bring Your Own LLM/VLM** |
| 33 | Works with any language model, no fine-tuned CV model or OCR pipeline required. |
| 34 | |
| 35 | - **Rich Toolset for Mobile Automation** |
| 36 | Pre-built tools for gestures, keystrokes, capture, device state, shell commands execution. |
| 37 | |
| 38 | - **Real-Time Interaction** |
| 39 | Typical latency between actions (e.g., two taps) ranges **2-4s** depending on device specs and load. |
| 40 | |
| 41 | ### Supported Operating Systems |
| 42 | |
| 43 | - Android 10+ |
| 44 | |
| 45 | ## Installation |
| 46 | |
| 47 | ### 📦 Prerequisites |
| 48 | |
| 49 | - Python 3.13 |
| 50 | - ADB (Android Debug Bridge) |
| 51 | - Android 10+ (Emulator/ Android Device) |
| 52 | |
| 53 | ### 📲 Testing ADB Connection |
| 54 | |
| 55 | Before running the server, ensure your Android device is connected and recognized by ADB: |
| 56 | |
| 57 | 1. Connect your Android device via USB or ensure your emulator is running. |
| 58 | 2. Open a terminal and run: |
| 59 | ```shell |
| 60 | adb devices |
| 61 | ``` |
| 62 | 3. You should see your device listed: |
| 63 | ``` |
| 64 | List of devices attached |
| 65 | R38M30XXXXX device |
| 66 | ``` |
| 67 | The serial number will differ per device. Emulators show serials like `emulator-5554`. |
| 68 | If the list is empty or shows "unauthorized", check your USB debugging settings on the device. |
| 69 | |
| 70 | For WiFi ADB, connect the device first: |
| 71 | |
| 72 | ```shell |
| 73 | adb connect 192.168.1.3:5555 |
| 74 | adb devices |
| 75 | ``` |
| 76 | |
| 77 | ### 🏁 Getting Started |
| 78 | |
| 79 | You can run the Android MCP server using **UVX** (recommended) or **UV** (for local development). |
| 80 | |
| 81 | #### Option 1: UVX (Recommended) |
| 82 | |
| 83 | No need to install dependencies manually. Just configure Claude Desktop: |
| 84 | |
| 85 | > **Windows note:** Use Python 3.13 for `uvx` on Windows. Python 3.14 currently fails to resolve a transitive `pywin32` dependency used by the MCP stack. |
| 86 | |
| 87 | 1. **Locate your config file** |
| 88 | - Windows: `%APPDATA%\Claude\claude_desktop_config.json` |
| 89 | - macOS: `~/Library/Application Support/Claude/claude_desktop_config.json` |
| 90 | |
| 91 | 2. **Add the configuration** |
| 92 | ```json |
| 93 | { |
| 94 | "mcpServers": { |
| 95 | "android-mcp": { |
| 96 | "command": "uvx", |
| 97 | "args": [ |
| 98 | "--python", |
| 99 | "3.13", |
| 100 | "android-mcp" |
| 101 | ] |
| 102 | } |
| 103 | } |
| 104 | } |
| 105 | ``` |
| 106 | > **Note:** The server starts first and connects lazily when a tool runs. If no device is specified, it auto-detects connected devices and **prefers physical devices over emulators**. Use `--device <serial>` or the `ANDROID_MCP_DEVICE` environment variable to target a specific device. |
| 107 | |
| 108 | Configure a specific WiFi device with environment variables: |
| 109 | |
| 110 | ```json |
| 111 | { |
| 112 | "mcpServers": { |
| 113 | "android-mcp": { |
| 114 | "command": "uvx", |
| 115 | "args": [ |
| 116 | "--python", |
| 117 | "3.13", |
| 118 | "android-mcp" |
| 119 | ], |
| 120 | "env": { |