droid-mcp
v0.1.0Android MCP server for device automation via ADB
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
get_devices
List connected Android devices and basic status via ADB.
select_device
Select a specific device by ID or auto-select the first available.
| Parameter | Type | Description |
|---|---|---|
params * |
get_device_info
Get model, Android version, API level, screen size, and health checks.
get_ui_layout
Extract the current UI hierarchy (uiautomator dump). Note: For WebView-heavy apps like Chrome, prefer `take_screenshot` + coordinate interactions, as dumps may be slow/limited.
| Parameter | Type | Description |
|---|---|---|
params * |
list_screen_elements
List visible, meaningful UI elements in an LLM-friendly format (type/text/label/id/bounds). For heavy WebView apps like Chrome, prefer `take_screenshot` and interact via coordinates.
find_elements
LLM-friendly element lookup. Provide one or more of text, resource_id, content_desc, or class_name to search the current UI dump. Defaults favor recall (partial match, enabled_only=True). Use exact_match for strict matching and index to disambiguate multiple results. Best practice: call find_elements first to inspect candidates, then call tap_element with the same selector + index.
| Parameter | Type | Description |
|---|---|---|
params * |
tap_screen
Tap the screen at specific coordinates (pixels).
| Parameter | Type | Description |
|---|---|---|
params * |
tap_element
Tap a UI element by selector. Intended for agents (Claude/Codex/Gemini) after a prior find_elements call. Accepts text/resource_id/content_desc and optional index to disambiguate. By default, clickable_only/enabled_only are False to improve recall; set them True when you need actionable controls. Prefer exact_match for deterministic taps.
| Parameter | Type | Description |
|---|---|---|
params * |
swipe_screen
Swipe between two coordinates with a duration (ms).
| Parameter | Type | Description |
|---|---|---|
params * |
swipe_direction
Swipe in a direction (up/down/left/right) from center; distance optional.
| Parameter | Type | Description |
|---|---|---|
params * |
input_text
Type text into the currently focused input field. Optional clear.
| Parameter | Type | Description |
|---|---|---|
params * |
press_key
Press a device key (e.g., BACK, HOME, ENTER, KEYCODE_*).
| Parameter | Type | Description |
|---|---|---|
params * |
take_screenshot
Capture a screenshot to /sdcard and optionally pull to ./assets.
| Parameter | Type | Description |
|---|---|---|
params * |
start_screen_recording
Start screen recording (mp4) with optional bitrate/size/time limits.
| Parameter | Type | Description |
|---|---|---|
params * |
stop_screen_recording
Stop a specific or all active recordings and optionally pull files locally.
| Parameter | Type | Description |
|---|---|---|
params * |
list_active_recordings
List active screen recordings (IDs, duration, device path).
get_logcat
Fetch recent logcat with tag/priority filters. Critical for LLMs: limit output size to protect context window. Always set max_lines (e.g., 50–200) and consider tag_filter plus priority (I/W/E) to reduce noise. Use clear_first only when you need a clean snapshot of new events.
| Parameter | Type | Description |
|---|---|---|
params * |
start_log_monitoring
Start continuous logcat monitoring; optional file output in ./logs.
| Parameter | Type | Description |
|---|---|---|
params * |
stop_log_monitoring
Stop a specific or all active log monitors; returns stats.
| Parameter | Type | Description |
|---|---|---|
params * |
list_active_monitors
List active log monitors (IDs, duration, filter, entries processed).