mcp-devices

v4.4.1
mcp-devices Checked 3 days ago Published 2 months ago

MCP 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.

ParameterTypeDescription
action *string
categorystringEnable/disable all modules in category (for enable_module/disable_module)
deviceIdstringDevice ID (for set)
moduleModule name or array of names (for enable_module/disable_module)
platformstringFilter by platform or target platform
targetstringTarget platform to switch to (for set_target)

screen

Screen capture and annotation. capture: screenshot with compression/diff. annotate: screenshot with element bounding boxes.

ParameterTypeDescription
action *string
compressbooleanCompress image (default: true)
deviceIdstringTarget device ID for multi-device. If omitted, uses active device.
diffbooleanCompare with previous screenshot (capture only)
diffThresholdnumberPixel difference threshold 0-255 (default: 30)
maxHeightnumberMax height in pixels (overrides preset; default via preset or 960). Max 2000.
maxWidthnumberMax width in pixels (overrides preset; default via preset or 540). Max 2000.
monitorIndexnumberMonitor index for multi-monitor desktop setups
platformstringTarget platform. If not specified, uses the active target.
presetstringQuality preset: low (270x480 q40), medium (540x960 q55, default), high (810x1440 q70)
qualitynumberJPEG quality 1-100 (overrides preset; default via preset or 55).
waitForStablebooleanWait 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.

ParameterTypeDescription
action *string
deviceIdstringTarget device ID for multi-device. If omitted, uses active device.
directionstringSwipe direction
durationnumberDuration in ms (long_press default: 1000, swipe default: 300)
hintsbooleanReturn hints about what changed after the action (default: true, set false to disable)
indexnumberTap element by index from ui_tree output (Android/HarmonyOS)
intervalnumberDelay between taps in ms for double_tap (default: 100)
keystringKey name: BACK, HOME, ENTER, TAB, DELETE, etc.
labelstringiOS only: Accessibility label
platformstringTarget platform. If not specified, uses the active target.
resourceIdstringFind element by resource ID (Android/HarmonyOS)
targetPidnumberDesktop only: PID of target process
textstringElement text to search (tap) or text to type (text action)
xnumberX coordinate
x1numberStart X (for custom swipe)
x2numberEnd X (for custom swipe)
ynumberY coordinate
y1numberStart Y (for custom swipe)
y2numberEnd 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.

ParameterTypeDescription
action *string
classNamestringFind by class or component type
clickablebooleanFilter by clickable state
compactbooleanCompact output: only interactive elements, short format (tree only)
descriptionstringNatural language description of element to tap (find_tap only)
deviceIdstringTarget device ID for multi-device. If omitted, uses active device.
exactMatchbooleanRequire exact text match for tap_text (default: false)
formatstringOutput format. semantic = grouped by role, minimal tokens
freshbooleanForce bypass cache and fetch live UI tree
intervalnumberPoll interval in ms for wait (default: 500)
labelstringiOS: Find by accessibility label
minConfidencenumberMinimum confidence score 0-100 for find_tap (default: 30)
pidnumberProcess ID of target application (tap_text only)
platformstringTarget platform. If not specified, uses the active target.
resourceIdstringAndroid/HarmonyOS: Find by resource ID (partial match)
showAllbooleanShow all elements including non-interactive (tree only)
textstringElement text to search/check (partial match, case-insensitive)
timeoutnumberMax wait time in ms for wait (default: 5000)
visiblebooleaniOS: Filter by visibility
walkToClickablebooleanIf 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

ParameterTypeDescription
action *string
delayMsnumberDelay between stop and launch in ms (default: 500). Useful so OS releases resources.
deviceIdstringTarget device ID for multi-device. If omitted, uses active device.
packagestringApp package or bundle ID (Android/iOS/HarmonyOS), e.g., com.android.settings or com.example.demo
packageNamestringAlias for 'package'. App package or bundle ID (Android/iOS/HarmonyOS). Either 'package' or 'packageName' can be used.
pathstringPath to APK, .app bundle, RPM, or HAP
platformstringTarget 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.

ParameterTypeDescription
action *string
caseSensitivebooleanCase-sensitive log matching (wait_log, default: true)
clearFirstbooleanClear logs before polling (wait_log)
commandstringShell command to execute (shell)
contextLinesnumberFollowing log lines to include (wait_log)
deviceIdstringTarget device ID. If omitted, uses the selected device.
fieldIdstringFind input field by resource ID before paste (clipboard_paste)
fieldTextstringFind input field by text before paste (clipboard_paste)
levelstringLog level filter (logs)
linesnumberNumber of log lines (logs, default: 100)
localPathstringLocal file path (file_push/pull)
msnumberDuration in milliseconds (wait, default: 1000)
packagestringPackage or bundle ID (logs, wait_log, process, permissions)
patternstringRegex pattern to await (wait_log)
permissionstringPermission to grant/revoke (permission_grant/revoke)
platformstringTarget platform. If not specified, uses the active target.
pollIntervalMsnumberPolling interval in milliseconds (wait_log)
remotePathstringRemote file path (file_push/pull)
tagstringFilter by tag (logs/wait_log)
timeoutMsnumberMaximum wait in milliseconds (wait_log)
urlstringURL 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).

ParameterTypeDescription
action *string
argsobjectArguments for the action (deviceId will be injected per device)
commandsarrayArray of commands to execute sequentially
devicesarrayArray of device IDs to target. Use device(action:'list') to get available devices.
maxDurationnumberMax total duration in ms (default: 30000, max: 60000)
platformstringTarget platform. If not specified, uses the active target.
stepsarraySteps to execute sequentially
stopOnErrorbooleanStop execution on first error (default: true)
turboboolean[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.

ParameterTypeDescription
cmd *stringCommand line to spawn
id *stringSession name (unique)
colsintegerPTY width (clamped 1..=1000, default 120)
cwdstring
envobject
promptRegexstring
recordEnable asciicast v2 tee. true=auto path in temp dir; string=explicit castPath (must be inside the plugin temp-dir allowlist, path-traversal rejected).
rowsintegerPTY height (clamped 1..=1000, default 40)
shellbooleanRun 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.

ParameterTypeDescription
id *string
text *string
newlineboolean

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.

ParameterTypeDescription
id *string
key *string

repl_expect

Block until a prompt regex matches, the session idles, the child exits, or the timeout fires.

ParameterTypeDescription
id *string
idleMsinteger
regexstring
timeoutMsinteger

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.

ParameterTypeDescription
id *string
historyReturn filmstrip history. true=last 10 frames; N=last N frames (clamped 1..=50=FILMSTRIP_CAP). Returns frames:[] when no frames captured yet.
modestringWhich surface to return: grid=vt100 screen (default), raw=byte stream, both=both. Invalid values are rejected.
tailintegerTrailing lines to return

repl_list

List active REPL sessions and their statuses.

repl_kill

Terminate a REPL session (SIGTERM, then SIGKILL).

ParameterTypeDescription
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.

ParameterTypeDescription
cols *integerNew PTY width (1..=1000)
id *stringSession id
rows *integerNew PTY height (1..=1000)