Android MCP
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
Full Android control from any AI agent — Claude, OpenCode, Windsurf, Cursor… 7 categorical MCP tools · 90fps live viewer · WiFi ADB · zero app to install
Quick demo
android_screen(action="screenshot") # PNG capture
android_screen(action="ocr") # visible text
android_interact(action="tap", params={"x": 540, "y": 960}) # tap
android_interact(action="find", params={"text": "Send"}) # find + tap
android_system(action="battery") # battery info
android_screen(action="viewer") # 90fps interactive window on PCRelated MCP server: adb-mcp
Architecture
AI Agent (Claude / OpenCode / Windsurf / Cursor…)
↓ MCP Protocol (stdio)
server.py ← 7 categorical tools
↓
device_manager.py ← device selection, multi-device
↓
backends/
├── adb_backend.py ← PRIMARY : uiautomator2 + direct ADB
└── companion_backend.py ← FALLBACK : Flutter app WebSocket
↓
N Android phones / emulatorsADB backend (primary) — works on any device with developer mode enabled.
Nothing to install on the phone. Uses uiautomator2 + ADB commands.
Companion backend (fallback) — optional Flutter app when ADB is unavailable on the network.
Requirements
Python 3.10+
ADB in PATH (
winget install Google.PlatformTools)Android: Developer mode + USB debugging (or WiFi debugging)
Installation
git clone https://github.com/Steph-ux/android-mcp
cd android-mcp
pip install -r requirements.txt
# Initialize uiautomator2 (once per device)
python -m uiautomator2 initLive viewer 90fps (optional)
winget install Genymobile.scrcpy
python viewer.pyMCP Configuration
# Generate the correct JSON for your AI client
python mcp_config.py --client claude # Claude Desktop
python mcp_config.py --client opencode # OpenCode
python mcp_config.py --client windsurf # Windsurf
python mcp_config.py --client cursor # Cursor
python mcp_config.py --write # write directly to config filesClaude Desktop example (claude_desktop_config.json):
{
"mcpServers": {
"android-mcp": {
"command": "C:/Python312/python.exe",
"args": ["D:/path/to/android-mcp/server.py"],
"type": "stdio"
}
}
}WiFi connection without USB (Android 11+)
# On the phone: Settings → Developer options → Wireless debugging → Pair device
adb pair 192.168.1.42:38765 # enter the code shown on the phone
adb connect 192.168.1.42:5555Full guide → WIFI_PAIRING.md
The 7 MCP tools
Call convention: android_xxx(action="...", params={...}, device_id="serial")
device_id is always optional (uses the currently selected device).
android_device — Device management
Action | Params | Description |
| — | All connected devices (USB, WiFi, emulators) |
|
| Set default device |
|
| WiFi ADB connection |
| — | Disconnect current WiFi device |
| — | Model, OS, resolution, density |
| — | Is device connected and ready? |
| — | Configure animations, stay-awake, ATX agent |
android_screen — Capture & Stream
Action | Params | Description |
| — | PNG capture (bypasses FLAG_SECURE) → image |
|
| Capture a specific area → image |
| — |
|
| — | Is the screen on? |
| — | Wake the screen |
| — | Start ADB stream (~16fps) |
| — | Stop stream |
| — | Latest stream frame → image |
|
| Extract visible text (Tesseract) |
|
| Template matching (OpenCV) |
|
| Launch scrcpy 90fps window on PC |
android_interact — Touch, Keyboard, UI
Action | Params | Description |
|
| Tap |
|
| Double tap |
|
| Long press |
|
| Swipe |
|
| Drag & drop |
|
| Pinch zoom |
|
| Multi-finger gestures |
|
| Type text |
| — | Clear active field |
|
| Type + Enter |
|
| System key (HOME, BACK, ENTER, VOLUME_UP…) |
|
| Key combination (keycodes) |
| — | Full UI XML tree (uiautomator2) |
|
| Find element and tap it |
|
| Wait for element |
|
| Scroll to element |
|
| Assert text is visible |
android_app — Applications
Action | Params | Description |
|
| Launch an app |
|
| Force-stop an app |
|
| List installed apps |
|
| Install APK from PC |
|
| Uninstall app |
| — | Foreground app package |
|
| Open a URL |
|
| Send Android intent |
|
| Open system settings ( |
android_files — Files
Action | Params | Description |
|
| PC → phone |
|
| Base64 → phone |
|
| Phone → PC |
|
| Phone → base64 |
|
| List directory contents |
android_system — System & Network
Action | Params | Description |
|
| ADB shell command |
|
| Logcat |
| — | Battery level and charging state |
| — | Read clipboard |
|
| Write to clipboard |
|
| Set volume |
|
| Screen rotation (0-3) |
|
| WiFi on/off |
|
| Bluetooth on/off |
|
| Mobile data on/off |
| — | Active notifications |
|
| Mock GPS location |
|
| Accelerometer, gyro, light… |
| — | Available WiFi networks |
|
| Connect to WiFi |
|
| Read contacts |
|
| Send SMS (requires confirmation on phone) |
android_automation — Batch & Macros
Action | Params | Description |
|
| Run N actions in one call |
|
| Start recording a macro |
|
| Add action to macro |
| — | Save macro |
| — | List saved macros |
|
| Replay a macro |
|
| Delete a macro |
Live viewer — scrcpy 90fps
python viewer.py # auto-detect device, 90fps, interactive
python viewer.py --fps 60 # 60fps
python viewer.py --record # record to .mp4
python viewer.py --record out.mp4 # named output file
python viewer.py --multi # one viewer per connected device
python viewer.py --no-control # read-only modeControl | Action |
Left click | Tap |
Drag | Swipe |
Right click | BACK |
Scroll | Scroll |
| HOME |
| Screenshot → PC clipboard |
| Fullscreen |
| Rotation |
Tests
# Unit tests (no device required)
pytest tests/test_server_unit.py -v # 94 tests
# Integration tests (ADB device required)
pytest tests/test_integration.py -vProject structure
android-mcp/
├── server.py # MCP server — 7 tools
├── viewer.py # scrcpy 90fps interactive viewer
├── mcp_config.py # JSON config generator
├── device_manager.py # Multi-device management
├── relay.py # ⚠️ LEGACY — companion fallback only
├── requirements.txt
├── pyproject.toml
├── WIFI_PAIRING.md
├── backends/
│ ├── adb_backend.py # Primary backend (uiautomator2 + ADB)
│ └── companion_backend.py # Fallback backend (Flutter app)
├── examples/
│ ├── agent_loop.py # Autonomous automation loop
│ └── whatsapp_auto.py # WhatsApp automation example
└── tests/
├── conftest.py
├── test_server_unit.py # 94 unit tests
└── test_integration.py # Real device testsExamples
# WhatsApp — send a message
await android_app("launch", {"package": "com.whatsapp"})
await android_interact("find", {"text": "Alice"})
await android_interact("type", {"text": "Hello!"})
await android_interact("key", {"key": "ENTER"})
# Batch in a single call
await android_automation("batch", {"actions": [
{"action": "key", "key": "HOME"},
{"action": "tap", "x": 540, "y": 200},
{"action": "type", "text": "search query"},
{"action": "key", "key": "ENTER"},
]})
# Macro: record + replay
await android_automation("macro_start", {"name": "login"})
await android_automation("macro_record", {"action": "tap", "x": 540, "y": 400})
await android_automation("macro_record", {"action": "type", "text": "password"})
await android_automation("macro_stop")
await android_automation("macro_replay", {"name": "login"})See examples/whatsapp_auto.py and examples/agent_loop.py for full use cases.
License
MIT
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
Let AI agents control Android and iOS devices on Mobilerun Cloud: screen, input, apps, workflows.
Cloud Android phones for AI agents: create a phone, read the screen, tap, type, install APKs, park.
Melaya is a remote MCP server. It gives an assistant hands on your own Android phone and browser: it reads the screen through the accessibility tree, then taps, types and navigates inside the apps and sites you allow-list, with no per-app API. It also builds, schedules and runs agent pipelines across 6k+ connected tools. OAuth 2.1, nothing to install.
Give your AI agent a real cloud Android phone: push APKs, drive it, get screenshots and logs.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to control Android phones via MCP and HTTP. Supports screen capture, taps, swipes, text input, and app management.7AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to control Android devices via ADB, providing tools for screen capture, tap/swipe/input, app management, and diagnostics. Works locally over USB or WiFi and integrates with MCP clients like Claude and Cursor.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to see and operate a real Android phone over adb by fusing live screenshots with UI-tree data, supporting look, tap, swipe, type, and screenshot actions through any MCP client.4MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to remotely control a real Android phone over MCP with no ADB, root, or emulator, by connecting a broker server to a sideloaded APK. Exposes tools to list devices, capture screenshots, read the UI tree, open links and deep links, and perform taps, swipes, typing, and global navigation actions.1MIT