adb-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ADB_PATH | No | Path to adb executable (auto-detected if unset). | |
| ADB_SERIAL | No | Default device serial (e.g., USB phone serial or emulator address). | |
| ANDROID_HOME | No | Android SDK root used for adb auto-detection. | |
| ANDROID_SDK_ROOT | No | Alternative Android SDK root. | |
| ADB_MCP_ALLOW_SHELL | No | Set to '1' or 'true' to enable the opt-in run_shell escape hatch (default off). |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_packagesA | List installed package names. |
| launch_packageB | Launch an app by package via its LAUNCHER intent (idempotent). Returns {package, pid, status}. |
| launch_activityB | Start an explicit activity, e.g. 'com.app/.MainActivity' ( |
| force_stopB | Force-stop an app (idempotent). Returns {package, status}. |
| kill_backgroundA | Kill an app's background processes ( |
| clear_app_dataB | Clear ALL app data for a package (destructive: wipes saves/cache/prefs). |
| app_statusC | Return {package, pid, running} for a package. |
| get_current_activityB | Return the currently focused activity/package (foreground app). |
| get_package_infoB | Return structured package info: versionName, versionCode, targetSdk, minSdk, installer, firstInstall/lastUpdate times, and granted runtime permissions. |
| install_apkA | Install an APK, or a split-APK set via install-multiple when >1 path given. replace=-r, grant_permissions=-g, downgrade=-d. Returns {status, message}. |
| uninstallB | Uninstall a package. keep_data=True keeps data/cache dirs ( |
| grant_permissionB | Grant a runtime permission, e.g. 'android.permission.CAMERA' ( |
| revoke_permissionC | Revoke a runtime permission ( |
| set_package_enabledB | Enable or disable a package ( |
| start_serviceC | Start a service by component 'pkg/.Service' ( |
| send_broadcastB | Send a broadcast intent ( |
| get_devicesA | List attached devices/emulators with state and transport. Returns [{serial, state, is_usb, model, device, transport_id}]. is_usb is False for network devices (serials containing ':', e.g. WSA/emulators). |
| get_stateB | Return the connection state of a device: device / offline / unauthorized. |
| adb_versionA | Return the host adb client version string and the resolved adb path. |
| get_device_propertiesB | Return the target environment: model, manufacturer, abi, android release, sdk level, build fingerprint, and screen info. Tells the agent exactly what it is targeting before acting. |
| get_screen_infoB | Return effective display size and density: {width, height, density, raw}. Prefers the Override size (what input coordinates map to) when set. |
| get_batteryB | Return battery level/status/health/temperature (from dumpsys battery). |
| connectB |
|
| disconnectA |
|
| wait_for_deviceA | Block until the device is online (or timeout). Useful after reboot/connect. |
| rebootB | Reboot the device. mode: '' (normal), 'recovery', 'bootloader', or 'sideload'. |
| set_default_deviceA | Set the session default device serial (overrides ADB_SERIAL for later calls). Pass an empty string to clear it. |
| get_default_deviceA | Return the currently active default device serial (runtime or ADB_SERIAL). |
| root_adbA | Restart adbd as root ( |
| unroot_adbB | Restart adbd without root ( |
| remountB | Remount /system (and other partitions) read-write ( |
| list_filesA | List a device directory: [{name, size, is_dir, is_link, perms}].
as_root uses |
| file_existsC | Check whether a path exists on the device. Returns {exists, is_dir}. |
| stat_fileC | Return stat info for a device path: {size, mtime, perms, uid, gid} (best-effort). |
| pullC | Pull a file/dir from the device to host path |
| pushC | Push a host file |
| read_fileB | Read a text file from the device (up to max_bytes). as_root uses |
| write_fileA | Write text |
| make_dirC | Create a directory on the device ( |
| delete_fileA | Delete a device file or (recursive=True) directory. DESTRUCTIVE. Refuses obviously dangerous roots like '/', '/system', '/data'. |
| tapC | Tap the screen at pixel (x, y). |
| long_pressA | Long-press at (x, y) for duration_ms (implemented as a zero-distance swipe). |
| swipeB | Swipe from (x1,y1) to (x2,y2) over duration_ms. Use for scrolling/flinging. |
| dragB | Drag (slow swipe) from (x1,y1) to (x2,y2). Alias of swipe with a longer default. |
| textB | Type a string into the focused field. Spaces and shell-special characters are escaped so the literal text is entered. |
| keyeventC | Send a key event. Accepts a numeric keycode or a name like BACK, HOME, ENTER, TAB, DEL, APP_SWITCH, VOLUME_UP (KEYCODE_ prefix optional). |
| press_homeC | Press the HOME button. |
| press_backC | Press the BACK button. |
| press_recentsA | Open the recent-apps / overview screen (APP_SWITCH). |
| press_powerB | Press the POWER button (toggles screen on/off). |
| press_enterC | Press ENTER. |
| wake_and_unlockA | Wake the screen and swipe up to dismiss a non-secure lock screen. |
| logcat_startA | Start a background logcat capture to a temp file. Read it with logcat_dump/
logcat_filter; end it with logcat_stop. Only one capture runs at a time.
|
| logcat_stopA | Stop the background logcat capture started by logcat_start. |
| logcat_dumpA | Return recent logcat lines as records {time, pid, tid, level, tag, message}. Reads the running capture's buffer if active, else does a one-shot |
| logcat_filterC | Convenience: logcat_dump filtered to the given tags (e.g. ['Unity','libc','DEBUG']). |
| logcat_clearC | Clear the device logcat ring buffers ( |
| get_crash_logB | Dump the 'crash' logcat buffer (native + Java crashes), newest |
| get_anr_tracesA | Pull the most recent ANR trace file (/data/anr/traces.txt or /data/anr/). Returns {status, local, size} (needs root/permission on some devices). |
| capture_bugreportB | Capture a full bugreport zip to |
| capture_screenA | Capture a screenshot and return it as an inline PNG image. If save_path is given, also writes the PNG there. Ideal for an observe->decide->tap loop / OCR. |
| capture_screen_to_fileA | Capture a screenshot and save it to |
| capture_screen_base64A | Capture a screenshot and return {format, bytes, base64} — for when a raw base64 payload is preferred over an inline image. |
| record_screen_startA | Start recording the screen on-device (screenrecord runs in the background).
time_limit_s caps duration (screenrecord max 180s per segment). |
| record_screen_stopA | Stop the background screen recording, pull it to |
| forward_portA |
|
| reverse_portA |
|
| list_forwardsB | List active |
| list_reversesC | List active |
| remove_forwardB | Remove a single |
| remove_reverseC | Remove a single |
| clear_forwardsB | Remove ALL forward and reverse rules for the device. |
| get_ip_addressB | Return the device's IPv4 address on an interface (default wlan0). |
| set_wifiB | Enable/disable Wi-Fi via |
| set_mobile_dataB | Enable/disable mobile data via |
| set_airplane_modeB | Toggle airplane mode (settings + broadcast). May need root on newer Android. |
| get_propA | Read a single system property by name, or ALL props as a dict when name is
omitted (parses |
| set_propB | Set a system property ( |
| get_settingB | Read an Android setting. namespace = 'system' | 'secure' | 'global'. |
| put_settingC | Write an Android setting. namespace = 'system' | 'secure' | 'global'. |
| list_processesA | List running processes ( |
| get_meminfoA | Return memory info. With a package: that app's total PSS (kB); otherwise the global summary (Total/Free/Used/Lost RAM). Returns parsed fields + raw text. |
| get_topB | Return a one-shot |
| get_uptimeB | Return device uptime (seconds + human string) from /proc/uptime and |
| dumpsysA | Run |
| list_servicesC | List all dumpsys service names available on the device. |
| run_shellA | Run an arbitrary device shell command. DISABLED by default — set the env var ADB_MCP_ALLOW_SHELL=1 to enable. Prefer the specific scoped tools; this exists only as an explicit, opt-in escape hatch. Returns {rc, output}. |
| dump_uiA | Dump the current on-screen view hierarchy as a flat list of elements {text, resource_id, content_desc, class, clickable, enabled, bounds:{...,center_x,center_y}}. non_empty_only drops nodes with no text/id/description (usually layout containers); clickable_only keeps only clickable nodes. |
| find_elementsA | Find on-screen elements matching any of text / resource_id / content_desc. Substring match by default; exact=True requires a full match. Returns the same element records as dump_ui, each with a bounds.center for tapping. |
| tap_elementA | Find an element (by text/resource_id/content_desc) and tap its center.
|
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 90 tools
Many tools have distinct purposes, but several overlapping groups exist (e.g., capture_screen variants, tap vs tap_element, launch_package vs launch_activity, force_stop vs kill_background, logcat_dump vs logcat_filter). With 90 tools, an agent may struggle to select the right one, though descriptions help clarify boundaries.
All tool names use snake_case, providing a consistent surface style. However, there is a mix of verb_noun (list_packages, get_devices) and bare verbs (connect, reboot, tap), and inconsistent verb choices for similar operations (set_prop vs put_setting). These are minor deviations from a uniform pattern.
90 tools is far above the recommended 3-15 range and exceeds the 50+ threshold for extreme mismatch. While ADB is a complex domain, the tool count is excessive and many tools could be consolidated (e.g., screen capture variants, logcat controls), creating a high cognitive load for agents.
The set covers a very broad range of ADB functionality: device management, app lifecycle, file operations, input, logging, screen capture, networking, settings, and UI automation. Minor gaps exist (e.g., setting display size/density, managing users, kernel logs), but agents can work around most tasks.