Android MCP
Android MCP
Vollständige Android-Steuerung von jedem KI-Agenten — Claude, OpenCode, Windsurf, Cursor… 7 kategorische MCP-Tools · 90fps Live-Viewer · WiFi ADB · keine App-Installation erforderlich
Kurze 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: DeepADB
Architektur
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 (primär) — funktioniert auf jedem Gerät mit aktiviertem Entwicklermodus.
Nichts auf dem Telefon zu installieren. Verwendet uiautomator2 + ADB-Befehle.
Companion-Backend (Fallback) — optionale Flutter-App, wenn ADB im Netzwerk nicht verfügbar ist.
Anforderungen
Python 3.10+
ADB im PATH (
winget install Google.PlatformTools)Android: Entwicklermodus + USB-Debugging (oder 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-Konfiguration
# 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 filesBeispiel für Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"android-mcp": {
"command": "C:/Python312/python.exe",
"args": ["D:/path/to/android-mcp/server.py"],
"type": "stdio"
}
}
}WiFi-Verbindung ohne 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:5555Vollständige Anleitung → WIFI_PAIRING.md
Die 7 MCP-Tools
Aufrufkonvention: android_xxx(action="...", params={...}, device_id="serial")
device_id ist immer optional (verwendet das aktuell ausgewählte Gerät).
android_device — Geräteverwaltung
Aktion | Parameter | Beschreibung |
| — | Alle verbundenen Geräte (USB, WiFi, Emulatoren) |
|
| Standardgerät festlegen |
|
| WiFi ADB-Verbindung |
| — | Aktuelles WiFi-Gerät trennen |
| — | Modell, OS, Auflösung, Dichte |
| — | Ist das Gerät verbunden und bereit? |
| — | Animationen, Wachbleiben, ATX-Agent konfigurieren |
android_screen — Aufnahme & Stream
Aktion | Parameter | Beschreibung |
| — | PNG-Aufnahme (umgeht FLAG_SECURE) → Bild |
|
| Bestimmten Bereich aufnehmen → Bild |
| — |
|
| — | Ist der Bildschirm an? |
| — | Bildschirm aufwecken |
| — | ADB-Stream starten (~16fps) |
| — | Stream stoppen |
| — | Aktueller Stream-Frame → Bild |
|
| Sichtbaren Text extrahieren (Tesseract) |
|
| Template-Matching (OpenCV) |
|
| scrcpy 90fps Fenster auf PC starten |
android_interact — Touch, Tastatur, UI
Aktion | Parameter | Beschreibung |
|
| Tippen |
|
| Doppeltippen |
|
| Langes Drücken |
|
| Wischen |
|
| Ziehen & Ablegen |
|
| Zoomen (Pinch) |
|
| Multi-Finger-Gesten |
|
| Text eingeben |
| — | Aktives Feld leeren |
|
| Eingeben + Enter |
|
| Systemtaste (HOME, BACK, ENTER, VOLUME_UP…) |
|
| Tastenkombination (Keycodes) |
| — | Vollständiger UI-XML-Baum (uiautomator2) |
|
| Element finden und darauf tippen |
|
| Auf Element warten |
|
| Zu Element scrollen |
|
| Sicherstellen, dass Text sichtbar ist |
android_app — Anwendungen
Aktion | Parameter | Beschreibung |
|
| App starten |
|
| App zwangsweise beenden |
|
| Installierte Apps auflisten |
|
| APK vom PC installieren |
|
| App deinstallieren |
| — | Vordergrund-App-Paket |
|
| URL öffnen |
|
| Android-Intent senden |
|
| Systemeinstellungen öffnen ( |
android_files — Dateien
Aktion | Parameter | Beschreibung |
|
| PC → Telefon |
|
| Base64 → Telefon |
|
| Telefon → PC |
|
| Telefon → Base64 |
|
| Verzeichnisinhalt auflisten |
android_system — System & Netzwerk
Aktion | Parameter | Beschreibung |
|
| ADB-Shell-Befehl |
|
| Logcat |
| — | Akkustand und Ladestatus |
| — | Zwischenablage lesen |
|
| In Zwischenablage schreiben |
|
| Lautstärke einstellen |
|
| Bildschirmdrehung (0-3) |
|
| WiFi an/aus |
|
| Bluetooth an/aus |
|
| Mobile Daten an/aus |
| — | Aktive Benachrichtigungen |
|
| GPS-Standort simulieren |
|
| Beschleunigungsmesser, Gyroskop, Licht… |
| — | Verfügbare WiFi-Netzwerke |
|
| Mit WiFi verbinden |
|
| Kontakte lesen |
|
| SMS senden (erfordert Bestätigung auf dem Telefon) |
android_automation — Batch & Makros
Aktion | Parameter | Beschreibung |
|
| N Aktionen in einem Aufruf ausführen |
|
| Makro-Aufnahme starten |
|
| Aktion zum Makro hinzufügen |
| — | Makro speichern |
| — | Gespeicherte Makros auflisten |
|
| Makro wiedergeben |
|
| Makro löschen |
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 modeSteuerung | Aktion |
Linksklick | Tippen |
Ziehen | Wischen |
Rechtsklick | ZURÜCK |
Scrollen | Scrollen |
| HOME |
| Screenshot → PC-Zwischenablage |
| Vollbild |
| Drehung |
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 -vProjektstruktur
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 testsBeispiele
# 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"})Siehe examples/whatsapp_auto.py und examples/agent_loop.py für vollständige Anwendungsfälle.
Lizenz
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
A real Android phone in the cloud for MCP agents: observe the screen, act, reset to a saved state.
Control real Android and iOS devices with LLM agents — tap, swipe, type, automate flows.
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.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to fully control Android devices through over 30 tools for app management, UI automation, and vision-based analysis via ADB. It supports multi-device management, action recording, and smart execution strategies ranging from UI hierarchy parsing to coordinate-based interaction.37182 npm1MIT
- AlicenseBqualityAmaintenanceA comprehensive MCP server that enables AI agents to interact with Android devices through Android Debug Bridge (ADB), offering 198 tools for device control, app management, diagnostics, and more.10075 npm19Apache 2.0
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to control Android phones via MCP and HTTP. Supports screen capture, taps, swipes, text input, and app management.6AGPL 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