adb-mcp

v0.1.1
adb-mcp Checked 16 hours ago Published 7 months ago

MCP server for controlling Android devices and emulators via ADB

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_devices

List connected Android devices and emulators.

screenshot

Take a screenshot of the device screen. Returns an image.

ParameterTypeDescription
devicestringDevice serial (omit for default)

get_ui_hierarchy

Dump the current UI as a readable hierarchy showing all visible elements, their labels, resource IDs, whether they're tappable, and their screen coordinates. Use this to understand what's on screen before deciding where to tap.

ParameterTypeDescription
devicestring

tap

Tap at specific screen coordinates.

ParameterTypeDescription
x *integer
y *integer
devicestring

tap_element

Find a UI element by text or resource ID and tap its centre. Prefer this over tap() when you know the label or ID of what you want to tap.

ParameterTypeDescription
content_descstringAccessibility content description
devicestring
resource_idstringResource ID (partial match)
textstringVisible text on the element

swipe

Swipe from one point to another.

ParameterTypeDescription
x1 *integer
x2 *integer
y1 *integer
y2 *integer
devicestring
duration_msinteger

type_text

Type text into the currently focused input field.

ParameterTypeDescription
text *string
devicestring

press_key

Press a hardware key. Available keys: back, home, menu, enter, delete, tab, up, down, left, right, volume_up, volume_down, power, camera, search.

ParameterTypeDescription
key *string
devicestring

launch_app

Launch an app by package name.

ParameterTypeDescription
package *stringe.g. io.github.garemat.lunachron
devicestring

stop_app

Force-stop an app by package name.

ParameterTypeDescription
package *string
devicestring

install_apk

Install an APK onto the device.

ParameterTypeDescription
path *stringLocal path to the APK file
devicestring

get_logcat

Get recent device logs. Useful for spotting crashes or errors after an action.

ParameterTypeDescription
devicestring
linesinteger
tagstringFilter to a specific log tag

wait

Wait for a specified number of seconds (e.g. for animations or loading).

ParameterTypeDescription
seconds *number

get_device_info

Get screen size, Android version, and installed app version.

ParameterTypeDescription
devicestring
packagestringOptional: get version of this app