adb-ai
ADB-AI MCP server lets an AI agent discover, pair/connect to, inspect, and remotely control Android TVs, boxes, phones, and tablets over ADB.
Discover devices: list adb-known devices, scan the LAN for open ADB ports, and connect by IP or alias.
Pair Android 11+ phones/tablets via a QR-code flow and wait for completion.
Send remote-control key presses, type text, tap, swipe, long-press, and scroll.
Query screen size and device state: foreground app, screen on/off, and media playback.
Manage apps: list installed packages, launch/close apps, open URLs/deep links, and search YouTube.
Set alarms and countdown timers on phones/tablets.
Control volume and put the screen to sleep or wake the device.
Capture screenshots as images the model can view, optionally scaled down.
Start/stop/status a live scrcpy mirror and optionally record the screen for a human operator.
Run arbitrary adb shell commands unless disabled with ADBAI_NO_SHELL=1.
Provides tools for controlling Android devices (TVs, phones, tablets) over ADB, including scanning and connecting to devices, pressing keys, launching apps, opening URLs, checking device state, taking screenshots, adjusting volume, and power control.
Provides a tool to search YouTube directly on the connected Android device without needing to use the on-screen keyboard.
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., "@adb-ai open YouTube on the living room TV and search for lofi beats"
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.
ADB-AI 🇧🇷
Say it out loud. The room does the rest.
"put on YouTube on the TV" "pause whatever is playing" "what's on the living-room screen?" "set an alarm for 7:30 on my phone"
ADB-AI plugs the Android devices you already own — the TV, the TV box, the phone, the tablet — into the AI agent you already use. You ask for something in your own words; the device does it. No new hardware, no cloud account, no vendor's app: just the debugging bridge your devices have shipped with for fifteen years, wrapped so an agent can hold the remote.
It is the closest thing to a Jarvis for your living room that you can set up in five minutes, on devices you already have.
Install · Tutorial · What it can do · Use with an AI agent · How it works · Troubleshooting · Leia em português
See it drive two devices at once
The agent searches YouTube for "eminem" on the TV while, on the phone, it opens
Termux, runs pkg update, and sets a 15-minute timer — all from one session.

One dependency-free Python package, identical on Windows, Linux, macOS and Termux, with three ways in:
an MCP server — for Claude, Codex, Cursor, or anything else that speaks MCP. This is the one that makes the quotes above work.
a Claude Code skill — the same thing for people who would rather their agent drove the command line.
a CLI you can use on its own:
adb-ai open netflix. Scriptable, and handy for checking something works before an agent touches it.
It really works like that
A TV's launcher, a phone's calculator driven only by taps, and a timer set from the command line — all captured through ADB-AI itself:
|
|
The TV menu you drive with |
|
|
|
|
|
Related MCP server: phone-mcp-server
Requirements
Python 3.9+ and the adb binary. That is all — requirements.txt is
deliberately empty of packages, because everything here is standard library.
But adb is not a Python package, so pip cannot install it:
System | Command |
Termux |
|
Debian/Ubuntu |
|
Fedora |
|
Arch |
|
macOS |
|
Windows |
|
Optional: scrcpy, and only for adb-ai mirror and adb-ai record —
watching the screen live in a window. Nothing else needs it.
System | Command |
Debian/Ubuntu |
|
Fedora |
|
Arch |
|
macOS |
|
Windows |
|
Termux | not supported — see below |
Optional: ffmpeg, for agents. With it, a screenshot that would be
megabytes is scaled down before the model sees it — the picture arrives sooner
and says the same thing. pkg install ffmpeg, sudo apt install ffmpeg,
brew install ffmpeg, winget install Gyan.FFmpeg. Unlike scrcpy, it works on
Termux too. Without it nothing breaks: screenshots go full size, as before.
scrcpy does not work from Termux. It is not in the default repo, and the
X11 route does not get it running either; mirroring a phone onto the same phone
is not what it is for. adb-ai says so plainly instead of handing you an SDL
error, and everything else works there — on a phone, adb-ai shot is how you
see a screen. To mirror, run adb-ai from a desktop on the same network.
adb-ai doctor checks the lot at any time, and tells you how to fix whatever
is missing on your system:
$ adb-ai doctor
adb-ai 0.1.0 on Linux (Linux-6.8.0-x86_64-with-glibc2.39)
[ok ] Python 3.12.3
[ok ] adb found
/usr/bin/adb
[ok ] Android Debug Bridge version 1.0.41
[warn] no devices connected
'adb-ai scan' looks for them on your network
[ok ] config: /home/you/.config/adb-ai/config.json
default device: none set | aliases: none
[ok ] scrcpy found - scrcpy 3.1
/usr/bin/scrcpy
ready to go.If adb lives somewhere unusual, point ADBAI_ADB at the binary.
Install
git clone https://github.com/cyberpunk2183/adb-ai
cd adb-aiThen pick one:
./install.sh # Linux, macOS, Termux - installs what is missing, asks first
.\install.ps1 # Windows (PowerShell)
pip install . # if you already have adb and would rather do it yourselfAdd --check (-Check on Windows) to see what is missing without changing
anything. No install at all is fine too — python -m adbai ... works straight
from the clone.
Step-by-step for each system, including turning on debugging on the device: docs/INSTALL.md.
Plug it into your agent
This is the point of the project: one line, and your agent can drive your devices.
Claude Code
claude mcp add adb-ai -- adb-ai mcpClaude Desktop — claude_desktop_config.json
{ "mcpServers": { "adb-ai": { "command": "adb-ai", "args": ["mcp"] } } }Codex CLI — ~/.codex/config.toml
[mcp_servers.adb_ai]
command = "adb-ai"
args = ["mcp"]Cursor — ~/.cursor/mcp.json
{ "mcpServers": { "adb-ai": { "command": "adb-ai", "args": ["mcp"] } } }Any other MCP client takes the same shape: run adb-ai mcp, talk JSON-RPC over
stdio. Twenty-two tools arrive — scan, connect, keys, taps and swipes, apps,
URLs, YouTube search, alarms, timers, volume, power, state, screenshots
(returned as an image the model can look at), a live mirror of the screen for
you to watch, and a full shell.
Then just ask, in whatever words you use at home:
put on YouTube on the TV pause whatever is playing what's on the living-room screen? set an alarm for 7:30 on my phone
Using Claude Code and prefer it to drive the CLI directly? Copy the skill:
mkdir -p ~/.claude/skills && cp -r skills/adb-ai ~/.claude/skills/Details, per-client paths and troubleshooting: docs/AGENTS.md.
Turn on debugging on the device
This is the step people get stuck on.
Android TV / TV box: Settings → Device Preferences → About → click Build seven times → back → Developer options → enable Network debugging (sometimes ADB debugging / USB debugging).
Phone or tablet: Settings → About → tap Build number seven times → Developer options → enable Wireless debugging. Android 11 and newer want a one-time pairing first, and the shortest way through it is the camera:
adb-ai pair # draws a QR; the phone scans it and pairs itself adb-ai pair --mirror # the same, and the screen opens when it connectsOn the phone: Wireless debugging → Pair device with QR code. Nothing to type — no IP, no port, no six digits. It pairs and connects in one go. (
adb-ai pair <ip>:<port> <code>still does it the typed way.)--mirrorcarries straight on into scrcpy, so a new phone goes from a QR code to a window on your desk in one command. It works the same onadb-ai scan --mirrorandadb-ai connect <ip> --mirror. scrcpy is optional, so when it is missing — and under Termux, where it cannot run at all — the pairing is still reported and only the window is skipped.USB first, wireless after: plug it in, run
adb tcpip 5555, unplug, thenadb-ai scan.
The first connection shows a dialog on the device asking you to allow this computer. Say yes and tick always allow, or nothing will connect.
Commands
adb-ai devices list what adb knows about
adb-ai scan [192.168.0.] find devices on the local network
--mirror connect to the one found and watch it
adb-ai pair pair an Android 11+ phone by QR code
--png code.png write the code to a file instead
--mirror open scrcpy the moment it connects
adb-ai connect <ip> [--alias tv] connect, optionally remember the name
--mirror open scrcpy once connected
adb-ai use <alias|serial> set the default device
adb-ai alias [name] [target] name a device, or list the names
adb-ai key home | ok | play | ... press keys, in order; -n repeats
--pace 120 one call per key, for menus that drop them
adb-ai keys list every key name
adb-ai text "hello there" type into the focused field
adb-ai apps [--all] installed packages
adb-ai open netflix launch by alias, package or fragment
adb-ai close netflix force-stop
adb-ai url <url> [--app <pkg>] open a URL or deep link
adb-ai youtube <query> search YouTube, no on-screen keyboard
adb-ai state [--json] foreground app, screen, playback
adb-ai shot [out.png] screenshot ('-' writes to stdout)
--max-size 1024 scale it down (needs ffmpeg)
adb-ai mirror [--view-only] watch the screen live (needs scrcpy)
adb-ai record [out.mp4] record the screen, no window
adb-ai volume up|down|mute|set N volume
adb-ai off | on sleep or wake the screen
adb-ai doctor check Python, adb, devices and config
adb-ai shell <cmd> raw adb shell, for anything not covered
adb-ai mcp run the MCP server on stdioEvery command takes -d <alias|serial>; without it, the default device is used.
ADBAI_DEVICE works too.
Use it from an AI agent
MCP server (Claude Desktop, Cursor, any MCP client)
{
"mcpServers": {
"adb-ai": {
"command": "adb-ai",
"args": ["mcp"]
}
}
}In Claude Code: claude mcp add adb-ai -- adb-ai mcp.
Twenty-two tools, including adb_scan, adb_connect, adb_key, adb_tap,
adb_open_app, adb_mirror,
adb_youtube_search, adb_state, adb_screenshot and adb_volume. The
screenshot comes back as an image the model can actually look at.
adb_shell runs any shell command on the device — dumpsys, pm, am,
settings, content, the lot — as the shell user, with no root. That is
deliberate: it is what makes an agent able to do the things the other tools
do not cover. It is also the one tool that can change a device in ways you did
not ask for, so if that is too much for your setup, switch it off:
{ "mcpServers": { "adb-ai": {
"command": "adb-ai", "args": ["mcp"],
"env": { "ADBAI_NO_SHELL": "1" }
} } }Claude Code skill
mkdir -p ~/.claude/skills && cp -r skills/adb-ai ~/.claude/skills/Then just ask: "pause the TV", "what's on the living-room screen?", "open
Spotify and play something quiet". See skills/README.md.
Why not just use adb directly?
Because the details bite:
DHCP moves your devices.
adb-ai scanfinds them again with plain sockets — no nmap, works the same on Windows and Termux.Some devices corrupt their own screenshots. Several Android TV builds print driver noise on stdout before the PNG; a naively saved file is broken.
adb-ai shotalways cuts to the PNG magic bytes.Not every device has a working
grep. Output is parsed on your machine in Python.statetries the device's owngrepfirst, because it is the one command an agent runs constantly, and silently falls back to parsing the full dump when the device cannot do it — nothing depends on a device-side pipe.Key codes and package names are not memorable.
adb-ai key okbeatsadb shell input keyevent KEYCODE_DPAD_CENTER, andadb-ai open netflixfindscom.netflix.ninjaorcom.netflix.mediaclient, whichever is there."Did it work?"
adb-ai stateanswers in one call: foreground app, screen state, and whether media is actually playing.
Scope, and a word of warning
This is a remote control, not a jailbreak. It drives devices you own and have enabled debugging on, over your own network. It does not bypass licence checks, paywalls or account restrictions.
It also cannot reach a device nobody opened up: ADB debugging lives behind a hidden menu and a trust dialog that someone has to accept on the device's own screen, in person.
That said — any tool that controls devices over a network can be misused,
and this one is no exception: scan sweeps a subnet, and controlling many
devices is this tool in a loop. The authors do not support that use and accept
no responsibility for it. Please read DISCLAIMER.md before
using ADB-AI; the short version is:
use it only on devices you own or are authorised to administer;
ADB over TCP is unauthenticated once allowed — never expose port 5555 to the internet, and turn debugging off when you are done;
it comes with no warranty; you run it, you own the outcome.
Pointing it at a phone is a bigger decision than pointing it at a TV. ADB access to a phone is the same reach you have when it is unlocked in your hand — any app, any text field, a screenshot of anything on screen, one-time codes included. See Phones are not TVs.
Security policy and hardening checklist: SECURITY.md.
Development
python -m unittest discover -s tests # 24 tests, no device needed
ruff check .Pull requests welcome — especially app aliases for services outside Brazil and the US, and fixes for device quirks like the screenshot one above.
Licence
MIT © 2026 cyberpunk2183 🇧🇷
Available Tools
24 toolsadb_close_appC
Force-stop an app.
Inputs: app (required), device.
adb_connectC
Connect to a device over the network by ip[:port] or alias.
Inputs: target (required).
adb_keyB
Press remote-control keys, in order. Names: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, apps, back, blue, captions, channeldown, channelup, delete, down, enter, forward, green, guide, home, info, input, left, menu, mute, next, notifications, ok, pause, play, playpause, power, prev, record, red, rewind, right, search, settings, sleep, space, stop, tab, tv, up, voldown, volup, wake, yellow
Inputs: keys (required), device, repeat, pace_ms.
adb_list_appsB
List installed packages (third-party by default).
Inputs: all, device.
adb_list_devicesA
List the Android devices adb currently knows about.
Inputs: no named parameters.
adb_mirrorA
Open a live window of the device's screen on the operator's computer, using scrcpy, so a human can watch what you are doing and take over with mouse and keyboard. It is for them, not for you: you cannot see the window, so keep using adb_screenshot to look at the screen. Needs scrcpy installed and a desktop session; it does not work from Termux.
Inputs: action, device, record, max_size, +1 more.
adb_open_appA
Launch an app by friendly alias (netflix, youtube, spotify...), full package name, or a fragment of one.
Inputs: app (required), device.
adb_open_urlB
Open a URL or deep link, optionally in a specific app.
Inputs: url (required), app, device.
adb_pair_qr_finishA
Wait for the device to scan the code from adb_pair_qr_start, pair with it, and connect. Blocks until it happens or the timeout runs out.
Inputs: timeout_seconds.
adb_pair_qr_startA
Begin pairing an Android 11+ phone or tablet by QR code. Returns a QR image to show the person; they point the device's camera at it from Wireless debugging > 'Pair device with QR code'. Then call adb_pair_qr_finish. Use this when a device has never been paired with this machine; an already-paired device just needs adb_connect.
Inputs: no named parameters.
adb_powerC
Put the screen to sleep or wake the device.
Inputs: action (required), device.
adb_scanA
Scan the local network for devices with the adb port open. Use when a device's IP changed (DHCP) or nothing is connected.
Inputs: subnet.
adb_screenshotA
Capture the screen and return it as an image you can look at. Large screens are scaled down on the way (ffmpeg, when it is installed) so you get the picture sooner; pass max_size to change that, or 0 for the untouched original.
Inputs: device, max_size.
adb_screen_sizeB
The screen size in pixels, so taps and swipes can be aimed.
Inputs: device.
adb_scrollB
Scroll the screen up, down, left or right without working out coordinates.
Inputs: direction (required), amount, device.
adb_set_alarmA
Set an alarm in the device's clock app. Phones and tablets only - most TVs have no clock app and the call will say so.
Inputs: time (required), days, label, device.
adb_set_timerB
Start a countdown timer in the device's clock app.
Inputs: duration (required), label, device.
adb_shellA
Run any adb shell command on the device and return its output - dumpsys, pm, am, settings, getprop, input, wm, content, and so on. Use it for what the other tools do not cover; prefer them when they do. Runs as the shell user (no root). Can be switched off with ADBAI_NO_SHELL=1.
Inputs: command (required), device.
adb_stateA
What is in the foreground, whether the screen is on, and whether media is playing. Call this to check an action worked.
Inputs: device.
adb_swipeA
Swipe from one point to another. The same point twice, with a longer duration_ms, is a long press.
Inputs: x1 (required), x2 (required), y1 (required), y2 (required), +2 more.
adb_tapA
Tap a point on the screen. For phones and tablets - a TV is driven with adb_key instead. Take a screenshot first to find the coordinates, and adb_screen_size to know the bounds.
Inputs: x (required), y (required), device.
adb_type_textB
Type text into the field that currently has focus.
Inputs: text (required), device.
adb_volumeB
Change the volume: up, down, mute, or set an exact level.
Inputs: action (required), level, steps, device.
adb_youtube_searchC
Search YouTube on the device without using the on-screen keyboard.
Inputs: query (required), device.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 24 tools
Most tools have clearly distinct purposes, including separate pairing, connection, input, app, and device-state operations. Some overlap exists between convenience tools and lower-level ones, such as adb_scroll vs adb_swipe, adb_volume vs adb_key volume keys, and adb_power vs adb_key power/sleep/wake, but the descriptions generally clarify when to prefer each.
All tool names share a consistent adb_ prefix and snake_case formatting, making the set easy to scan. The main inconsistency is that many names are noun-style resource tools (adb_state, adb_screenshot, adb_volume) while others are verb-first actions (adb_open_app, adb_list_apps, adb_set_alarm).
At 24 tools, the surface is heavy and includes several convenience wrappers that could be folded into broader tools. The domain is broad enough to justify many operations, but this sits in the borderline 16-25 range rather than being tightly scoped.
The server covers device discovery, pairing, connection, input, app control, media/search, alarms/timers, screenshots, state inspection, power, volume, mirroring, and arbitrary shell access. Dedicated tools for file transfer, app install/uninstall, reboot, or screen recording are missing, but adb_shell provides a workaround for most gaps.
Maintenance
Related MCP Connectors
Control Android TV from any AI. 38 MCP tools: playback, recap, recommend, smart-home, schedules.
Let AI agents control Android and iOS devices on Mobilerun Cloud: screen, input, apps, workflows.
YouTube transcripts, search, channel browsing, and playlists for AI agents via MCP.
Automate 1,000+ services from any MCP-compatible AI agent: build Applets, run actions and queries.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables MCP-compatible agents to control an Android device over the network via ADB, providing tools for shell commands, screen capture, UI inspection, file operations, and input simulation.16 npmMIT
- 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
- AlicenseBqualityCmaintenanceEnables AI agents to control Android TV/Android devices through ADB, including screen capture, remote control, app management, and more.2414 npm3MIT
- 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



