adbmcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ADB_PATH | No | Path to the adb binary. Must match the version of any running adb server. | adb |
| ADBMCP_TIMEOUT_MS | No | Default subprocess timeout (timeout_ms per call overrides it). | 30000 |
| ADBMCP_ALLOWED_DEVICES | No | Comma-separated serial allowlist. Operations on other serials are refused. Unset means all devices are allowed. | |
| ADBMCP_MAX_OUTPUT_BYTES | No | Head+tail byte cap per call; the dropped middle is reported inline. | 65536 |
| ADBMCP_PUSH_ALLOWED_ROOTS | No | Remote roots push_file may write to. | /sdcard,/storage/emulated/0,/data/local/tmp |
| ADBMCP_LOGCAT_BUFFER_BYTES | No | Ring-buffer cap per logcat stream; overflow is reported as dropped_bytes. | 1048576 |
| ADBMCP_CLEAR_ALLOWED_PACKAGES | No | Comma-separated package allowlist for clear_app_data. There is no allow-all mode: unset or empty refuses every clear. | |
| ADBMCP_SHELL_ALLOWED_PREFIXES | No | When set, a shell command must start with one of these comma-separated prefixes. Unset means no prefix restriction. | |
| ADBMCP_SHELL_BLOCKED_PATTERNS | No | Comma-separated JavaScript regex sources tested against the whole shell command. Overriding replaces the defaults. | reboot,su,rm -rf /,mkfs,wipe |
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": true
} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_devicesA | List Android devices and emulators known to adb with their serial, connection state and model. Call this first to discover serials for the "device" parameter of other tools. |
| get_device_infoA | Read a curated set of build properties (model, Android version, SDK level, ABI) plus screen size and density for one device. Use it instead of shell getprop when you only need identity/build details. |
| shellA | Escape hatch: run an arbitrary command through |
| list_packagesA | List package names installed on one device (optionally filtered by a substring of the package name), e.g. filter "com.example" to find only the app you care about. |
| install_apkA | Install a local APK on one device via |
| uninstall_packageA | Remove an application from one device via |
| grant_permissionA | Grant a runtime permission to an app ( |
| revoke_permissionA | Revoke a runtime permission from an app ( |
| clear_app_dataA | Delete all data stored by an app ( |
| logcat_snapshotA | Dump the current logcat buffer ( |
| start_logcat_streamA | Start a long-lived |
| read_logcat_streamA | Return buffered logcat output accumulated since the previous read of this stream. Output is capped per call; anything not returned stays buffered for the next read. Dropped bytes are reported when the ring buffer overflowed. |
| stop_logcat_streamA | Terminate a logcat stream and forget its stream_id. Up to max_bytes of output buffered but not yet read is returned in this result; any excess is discarded and reported. |
| screenshotA | Capture the current screen of one device ( |
| pull_fileA | Copy a file from the device to the host machine ( |
| push_fileA | Copy a file from the host machine to the device ( |
| forward_portA | Create a port forward from the host to the device ( |
| remove_forwardA | Remove a port forward created with forward_port ( |
| reverse_portA | Create a reverse socket connection ( |
| remove_reverseA | Remove a reverse socket connection created with reverse_port ( |
| list_forwardsA | List the forward socket connections of one device ( |
| list_reversesA | List the reverse socket connections of one device ( |
| connectA | Connect adb to a device over TCP/IP ( |
| disconnectA | Disconnect one TCP/IP-connected device ( |
| wireless_pairA | Pair with an Android 11+ device for wireless debugging ( |
| start_activityA | Launch an activity on one device ( |
| launch_packageA | Launch an installed app by package id: resolve its LAUNCHER activity ( |
| force_stop_appA | Stop all processes of a package on one device ( |
| get_ui_hierarchyA | Dump the current view hierarchy of one device as uiautomator XML ( |
| tapA | Tap a point on the device screen ( |
| swipeA | Swipe from (x1, y1) to (x2, y2) ( |
| type_textA | Type text into the focused input field ( |
| key_eventA | Send one key event to the device ( |
| dumpsys_queryA | Read a curated Android system service dump ( |
| adb_server_restartA | Recover from adb server version conflicts by running |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| debug_crash | Collect the evidence for an app crash: device info, filtered logcat, and reproduce the failure. |
| install_and_launch | Install a freshly built APK, launch it, and verify that it started without crashing. |
| capture_bug_report | Gather device info, logs, screenshot and UI hierarchy for a bug report on one device. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| devices | Live list of devices/emulators known to adb (serial, state, model, transport id), including whether ADBMCP_ALLOWED_DEVICES permits each serial. Re-read to refresh: device state is never cached. |
TDQS
Scored across 35 tools
Most tools have clearly distinct purposes, and the forward/reverse and logcat streaming tool groups are well differentiated by their descriptions. Minor ambiguity exists between start_activity and launch_package, and shell intentionally overlaps with many dedicated tools, but the descriptions explicitly guide correct selection.
All names use snake_case, and most follow a verb_noun pattern (list_devices, install_apk, grant_permission, pull_file). A few deviate with noun-first or single-word names (logcat_snapshot, dumpsys_query, screenshot, shell), but the convention remains readable and consistent.
35 tools is heavy for a single server. Each tool maps to a distinct adb operation, which justifies breadth, but some groups could be consolidated (e.g., forward/reverse families, logcat stream lifecycle), making the set borderline overloaded.
The surface covers device connection, app lifecycle, file transfer, logging, UI automation, shell, and dumpsys querying well. Minor gaps exist around device reboot, system settings, and screen recording, but most workflows can be completed with the available tools.