android-agent-bridge
Controls an Android phone (Android 5.0+) through an on-device accessibility service over Wi-Fi or USB, providing screenshots with numbered elements or a grid, taps, long-presses, typing, scrolling, swipes, key events, app launching, notifications, clipboard access, volume/brightness control, settings, and device information.
Can open an app's Google Play Store page when the app is not installed, via the phone_open_app store/launch --store capability.
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-agent-bridgeOpen WhatsApp on my phone and read my last message from Mom"
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-agent-bridge
Give your AI agent (Claude Code, Cursor, Antigravity, or anything that speaks MCP or runs shell commands) your whole Android phone: it sees the screen, taps, types, scrolls and opens apps — in any app, not just your own.
Pair once by QR code over Wi-Fi, or plug in USB. Both work, and the phone switches to Wi-Fi when you unplug.
Screenshots with numbered elements so the agent says "tap 12" instead of guessing pixels, plus a lettered grid ("tap C7") for maps, games and images.
Typing without the keyboard: text goes straight into the field.
Android 5.0 and newer (phones from 2015 on).
┌──────────────┐ MCP / CLI ┌───────────────────┐ Wi-Fi or USB ┌──────────────────┐
│ Claude Code, │ ───────────▶ │ android-agent- │ ◀────────────▶ │ Agent Bridge app │
│ Cursor, … │ │ bridge (computer) │ WebSocket │ (phone) │
└──────────────┘ └───────────────────┘ └──────────────────┘1. Install the app on the phone
Install it over USB (step 2b). usb installs the app for you.
Opening the APK from WhatsApp, a browser or a file manager often fails with Google Play Protect's "App blocked to protect your device". In some countries (India and others), Play Protect blocks sideloaded apps that use accessibility, with no "install anyway" option. Installs over USB with adb aren't blocked, so use usb once. After that the phone also works over Wi-Fi.
Related MCP server: phone-mcp-server
2a. Pair over Wi-Fi
npx android-agent-bridge startOpen Agent Bridge on the phone → Scan QR code → point it at the QR code in the terminal (or the bigger one at http://localhost:8350/pair). Then turn on the app's accessibility service with the button in the app.
Phone and computer must be on the same Wi-Fi. On Windows, allow Node.js through the firewall when asked.
2b. Or set up over USB
Turn on USB debugging (Settings → About phone → tap Build number 7 times → Developer options → USB debugging), plug in, then:
npx android-agent-bridge usbThis installs the app if needed, turns on its accessibility service, pairs it and starts the bridge. No QR code.
3. Connect your agent
npx android-agent-bridge initRun it in your project: it adds the MCP server to .mcp.json (and .cursor/mcp.json with --cursor), plus a short guide for the agent. For other agents, add an MCP server with the command npx -y android-agent-bridge.
Then ask: "Open WhatsApp on my phone and read the last message from Mom."
Tools
MCP tool | CLI | What it does |
|
| connected phone, Android version, capabilities |
|
| screenshot with numbered elements / grid + element list |
|
| element list only (cheap, text); |
|
| text read from the screen pixels with positions (on-device ML Kit, offline) — finds controls apps hide from accessibility |
|
| tap or long-press |
|
| type into a field |
|
| scroll the screen or a list |
|
| drag between two points |
|
| back, home, recents, notifications, quick_settings, enter, lock |
|
| open an app by name or package |
|
| list installed apps |
|
| wait for text to appear |
|
| open an app, or its Play Store page if it isn't installed |
|
| media, ring, notification, alarm, call volume |
|
| screen brightness |
|
| quick switches |
|
| open wifi, bluetooth, display, battery… or an app's info page |
|
| web pages and deep links |
|
| dialer with the number filled in (never calls) |
|
| web search on the phone |
|
| battery, app in front, what the app may do |
|
| notifications received since the service started |
|
| read / set the clipboard |
|
| turn the screen on (stays PIN-locked) |
|
| switch on the one-time permissions over USB |
|
| force-stop an app (USB) |
A target is an element number (12), visible text (Sign in), a grid cell (C7) or pixels (540,1200). Text is matched in this order: exact or starts-with in the app → exact or starts-with in the screen text (OCR) → contains → the Android system bar.
The CLI commands need a running bridge: start, usb, or an agent's MCP session. All of them share one bridge.
What works on which Android
5.0–6.0 | 7.0–10 | 11+ | |
Element list, typing, clicking elements, back/home | ✅ | ✅ | ✅ |
Tap anywhere (grid, pixels), swipes | over USB | ✅ | ✅ |
Screenshots | tap "Allow screen capture" once per session, or USB | same | ✅ built in |
Enter key | over USB | over USB | ✅ |
"Over USB" means the bridge does it through adb when the phone is plugged in with USB debugging.
Apps that block screen capture (banking, Netflix and similar) show up black in screenshots; their element list usually still works.
Security
Only a computer holding the pairing secret from the QR code can connect.
npx android-agent-bridge pair --resetmakes a new secret; every phone then has to scan again.Traffic on your Wi-Fi is not encrypted (plain WebSocket), so use it on networks you trust. Over USB it never leaves the cable.
Turn off the accessibility service in the app (or Android settings) to cut access at once.
The agent guide tells agents to ask before sending, paying or deleting, and never to type passwords.
Building the app
cd android
./gradlew assembleReleaseNeeds JDK 17 and the Android SDK (ANDROID_HOME or android/local.properties). The APK lands in android/app/build/outputs/apk/release/; copy it to apk/agent-bridge.apk.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Give your AI agent a real cloud Android phone: push APKs, drive it, get screenshots and logs.
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.
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
- AlicenseAqualityAmaintenanceMCP server that gives AI agents full vision and control over Android devices via ADB and scrcpy. Supports screenshots, input, apps, UI automation, shell, files, and clipboard.38151 npm124MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to control Android phones via MCP and HTTP. Supports screen capture, taps, swipes, text input, and app management.7AGPL 3.0
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to control a physical Android device or Docker-hosted emulator over ADB by taking screenshots and performing taps, swipes, key presses, text input, shell commands, app launches, and device info queries. It runs as a local MCP stdio server alongside a web UI and REST API for remote access.1MIT
- AlicenseNot gradedqualityAmaintenanceEnables MCP-compatible AI assistants to see and control Android devices through screenshots, taps, swipes, typing, app management, UI inspection, file transfer, shell commands, and audio/video streaming. It connects over ADB with optional low-latency acceleration for faster input and near-instant screenshots.151 npmMIT