mcp-devices
v4.4.1MCP server for mobile, desktop and browser automation — Android, iOS, HarmonyOS Next, Aurora OS, Desktop, and Browser
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
device
Device management + module loading. list/set/set_target/get_target: devices. enable_module/disable_module/list_modules: load browser/desktop/store tools on demand.
| Parameter | Type | Description |
|---|---|---|
action * | string | |
category | string | Enable/disable all modules in category (for enable_module/disable_module) |
deviceId | string | Device ID (for set) |
module | Module name or array of names (for enable_module/disable_module) | |
platform | string | Filter by platform or target platform |
target | string | Target platform to switch to (for set_target) |
screen
Screen capture and annotation. capture: screenshot with compression/diff. annotate: screenshot with element bounding boxes.
| Parameter | Type | Description |
|---|---|---|
action * | string | |
compress | boolean | Compress image (default: true) |
deviceId | string | Target device ID for multi-device. If omitted, uses active device. |
diff | boolean | Compare with previous screenshot (capture only) |
diffThreshold | number | Pixel difference threshold 0-255 (default: 30) |
maxHeight | number | Max height in pixels (overrides preset; default via preset or 960). Max 2000. |
maxWidth | number | Max width in pixels (overrides preset; default via preset or 540). Max 2000. |
monitorIndex | number | Monitor index for multi-monitor desktop setups |
platform | string | Target platform. If not specified, uses the active target. |
preset | string | Quality preset: low (270x480 q40), medium (540x960 q55, default), high (810x1440 q70) |
quality | number | JPEG quality 1-100 (overrides preset; default via preset or 55). |
waitForStable | boolean | Wait for UI to stabilize before capturing (capture only) |
input
Input actions. tap/double_tap/long_press: coords or text/id/label/index. swipe: direction or coords. text: type text. key: press key.
| Parameter | Type | Description |
|---|---|---|
action * | string | |
deviceId | string | Target device ID for multi-device. If omitted, uses active device. |
direction | string | Swipe direction |
duration | number | Duration in ms (long_press default: 1000, swipe default: 300) |
hints | boolean | Return hints about what changed after the action (default: true, set false to disable) |
index | number | Tap element by index from ui_tree output (Android/HarmonyOS) |
interval | number | Delay between taps in ms for double_tap (default: 100) |
key | string | Key name: BACK, HOME, ENTER, TAB, DELETE, etc. |
label | string | iOS only: Accessibility label |
platform | string | Target platform. If not specified, uses the active target. |
resourceId | string | Find element by resource ID (Android/HarmonyOS) |
targetPid | number | Desktop only: PID of target process |
text | string | Element text to search (tap) or text to type (text action) |
x | number | X coordinate |
x1 | number | Start X (for custom swipe) |
x2 | number | End X (for custom swipe) |
y | number | Y coordinate |
y1 | number | Start Y (for custom swipe) |
y2 | number | End Y (for custom swipe) |
ui
UI inspection and interaction. tree: accessibility tree. find: search elements. find_tap: fuzzy tap (Android/HarmonyOS). tap_text: tap by text (Desktop). analyze: screen analysis. wait/assert_visible/assert_gone: element checks.
| Parameter | Type | Description |
|---|---|---|
action * | string | |
className | string | Find by class or component type |
clickable | boolean | Filter by clickable state |
compact | boolean | Compact output: only interactive elements, short format (tree only) |
description | string | Natural language description of element to tap (find_tap only) |
deviceId | string | Target device ID for multi-device. If omitted, uses active device. |
exactMatch | boolean | Require exact text match for tap_text (default: false) |
format | string | Output format. semantic = grouped by role, minimal tokens |
fresh | boolean | Force bypass cache and fetch live UI tree |
interval | number | Poll interval in ms for wait (default: 500) |
label | string | iOS: Find by accessibility label |
minConfidence | number | Minimum confidence score 0-100 for find_tap (default: 30) |
pid | number | Process ID of target application (tap_text only) |
platform | string | Target platform. If not specified, uses the active target. |
resourceId | string | Android/HarmonyOS: Find by resource ID (partial match) |
showAll | boolean | Show all elements including non-interactive (tree only) |
text | string | Element text to search/check (partial match, case-insensitive) |
timeout | number | Max wait time in ms for wait (default: 5000) |
visible | boolean | iOS: Filter by visibility |
walkToClickable | boolean | If matched element is non-clickable (e.g., a TextView label), walk up to the smallest containing clickable ancestor. Default true. Set false to tap the matched element directly even if non-clickable (… |
app
App lifecycle and inventory: launch, stop, install, uninstall, list
| Parameter | Type | Description |
|---|---|---|
action * | string | |
delayMs | number | Delay between stop and launch in ms (default: 500). Useful so OS releases resources. |
deviceId | string | Target device ID for multi-device. If omitted, uses active device. |
package | string | App package or bundle ID (Android/iOS/HarmonyOS), e.g., com.android.settings or com.example.demo |
packageName | string | Alias for 'package'. App package or bundle ID (Android/iOS/HarmonyOS). Either 'package' or 'packageName' can be used. |
path | string | Path to APK, .app bundle, RPM, or HAP |
platform | string | Target platform. If not specified, uses the active target. |
system
System operations, clipboard, permissions, and file transfer. shell: run command. logs/wait_log: device logs. clipboard_*: Android clipboard. permission_*: app permissions. file_*: capability-driven file transfer.
| Parameter | Type | Description |
|---|---|---|
action * | string | |
caseSensitive | boolean | Case-sensitive log matching (wait_log, default: true) |
clearFirst | boolean | Clear logs before polling (wait_log) |
command | string | Shell command to execute (shell) |
contextLines | number | Following log lines to include (wait_log) |
deviceId | string | Target device ID. If omitted, uses the selected device. |
fieldId | string | Find input field by resource ID before paste (clipboard_paste) |
fieldText | string | Find input field by text before paste (clipboard_paste) |
level | string | Log level filter (logs) |
lines | number | Number of log lines (logs, default: 100) |
localPath | string | Local file path (file_push/pull) |
ms | number | Duration in milliseconds (wait, default: 1000) |
package | string | Package or bundle ID (logs, wait_log, process, permissions) |
pattern | string | Regex pattern to await (wait_log) |
permission | string | Permission to grant/revoke (permission_grant/revoke) |
platform | string | Target platform. If not specified, uses the active target. |
pollIntervalMs | number | Polling interval in milliseconds (wait_log) |
remotePath | string | Remote file path (file_push/pull) |
tag | string | Filter by tag (logs/wait_log) |
timeoutMs | number | Maximum wait in milliseconds (wait_log) |
url | string | URL to open (open_url) |
flow
Flow orchestration: batch (multi-command), run (multi-step automation with loops/conditionals), parallel (same action on multiple devices). Use turbo:true for rich feedback (experimental).
| Parameter | Type | Description |
|---|---|---|
action * | string | |
args | object | Arguments for the action (deviceId will be injected per device) |
commands | array | Array of commands to execute sequentially |
devices | array | Array of device IDs to target. Use device(action:'list') to get available devices. |
maxDuration | number | Max total duration in ms (default: 30000, max: 60000) |
platform | string | Target platform. If not specified, uses the active target. |
steps | array | Steps to execute sequentially |
stopOnError | boolean | Stop execution on first error (default: true) |
turbo | boolean | [experimental] Rich UI feedback per step. Compact UI tree after each step, screenshot on failure. |
repl_spawn
Start an interactive REPL or CLI process under a PTY. Returns the session id. cmd is exec'd directly (argv split, no shell): env-var prefixes, redirections (2>&1), pipes and globs are NOT interpreted — pass env via the env param, or set shell:true to run cmd through /bin/sh -c. Set record:true to tee redacted PTY output to an asciicast v2 file (returned as castFile); supply castPath to override the default temp location.
| Parameter | Type | Description |
|---|---|---|
cmd * | string | Command line to spawn |
id * | string | Session name (unique) |
cols | integer | PTY width (clamped 1..=1000, default 120) |
cwd | string | |
env | object | |
promptRegex | string | |
record | Enable asciicast v2 tee. true=auto path in temp dir; string=explicit castPath (must be inside the plugin temp-dir allowlist, path-traversal rejected). | |
rows | integer | PTY height (clamped 1..=1000, default 40) |
shell | boolean | Run cmd via /bin/sh -c so shell syntax (env prefixes, 2>&1, pipes, globs, &&) works. |
repl_send
Write text to a REPL session. Appends a newline by default.
| Parameter | Type | Description |
|---|---|---|
id * | string | |
text * | string | |
newline | boolean |
repl_key
Send a named key to a session. Editing/navigation for driving TUIs. Supported: enter, tab, shift-tab, space, backspace, esc (alias escape), delete, home, end, pageup, pagedown, up, down, left, right, ctrl-a, ctrl-c, ctrl-d, ctrl-e, ctrl-k, ctrl-l, ctrl-n, ctrl-o, ctrl-p, ctrl-r, ctrl-u, ctrl-w, ctrl-z. For plain characters use repl_send.
| Parameter | Type | Description |
|---|---|---|
id * | string | |
key * | string |
repl_expect
Block until a prompt regex matches, the session idles, the child exits, or the timeout fires.
| Parameter | Type | Description |
|---|---|---|
id * | string | |
idleMs | integer | |
regex | string | |
timeoutMs | integer |
repl_snapshot
Read the current emulated terminal screen for a session. All returned text surfaces are redacted for common secret patterns. mode: 'grid' (default) returns only the vt100-rendered screen — strongest redaction guarantee since ANSI escapes are resolved before regex matching. 'raw' returns the capped PTY byte stream (ANSI escapes present; secrets split across escape sequences may survive redaction — use 'grid' when in doubt). 'both' returns grid and raw. history:true|N returns the last N filmstrip frames (default 10) as frames:[{ts,grid}]; empty array when none captured yet.
| Parameter | Type | Description |
|---|---|---|
id * | string | |
history | Return filmstrip history. true=last 10 frames; N=last N frames (clamped 1..=50=FILMSTRIP_CAP). Returns frames:[] when no frames captured yet. | |
mode | string | Which surface to return: grid=vt100 screen (default), raw=byte stream, both=both. Invalid values are rejected. |
tail | integer | Trailing lines to return |
repl_list
List active REPL sessions and their statuses.
repl_kill
Terminate a REPL session (SIGTERM, then SIGKILL).
| Parameter | Type | Description |
|---|---|---|
id * | string |
repl_resize
Resize the PTY and vt100 grid for a live session. Applies cols/rows to BOTH the PTY master (MasterPty::resize) and the vt100 parser (set_size) in that order so the grid stays consistent. Subsequent repl_snapshot will report the new cols/rows. Values are clamped to 1..=1000.
| Parameter | Type | Description |
|---|---|---|
cols * | integer | New PTY width (1..=1000) |
id * | string | Session id |
rows * | integer | New PTY height (1..=1000) |