mcp-mobile-interaction
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_MOBILE_FAST_TREE | No | Set to `0` to disable the on-device tree-read daemon and fall back to `uiautomator dump`. The daemon holds `UiAutomation` exclusively, so disable it if you need Appium, Maestro, or the shell `uiautomator` command to work alongside this server. Enabled by default. |
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
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_devicesB | List connected Android and/or iOS devices and emulators/simulators |
| screenshotA | Capture a screenshot from an Android or iOS device/emulator/simulator. Returns the image as base64 JPEG. Optionally crop to a specific UI element (token-efficient way to inspect one component). |
| tapC | Tap at a specific coordinate on the device screen |
| double_tapC | Double-tap at a specific coordinate on the device screen |
| long_pressC | Long-press at a specific coordinate on the device screen |
| swipeA | Swipe on the device screen. Provide explicit coordinates or a direction (up/down/left/right) to auto-compute from screen center. |
| type_textA | Type text into the currently focused input field. Full Unicode support: non-ASCII text (accents, emoji) is delivered via clipboard paste on Android. |
| press_keyB | Press a hardware or navigation key, or send a raw Android keycode. Supports repeat for multiple presses in one call. |
| get_ui_treeA | Get a simplified flat list of UI elements on the current screen. Each element includes type, text, center coordinates (for tapping), size and state flags. Supports optional filters to reduce noise. |
| get_screen_infoB | Get screen dimensions, density, and orientation for a device |
| launch_appB | Launch an app on the device by package name (Android) or bundle ID (iOS) |
| open_urlB | Open a URL (including deep links with query params) on the device |
| wait_for_elementA | Poll the UI tree until an element matching the criteria appears on screen. Returns matched elements and optionally the full UI tree or screenshot. |
| wait_for_stableA | Wait until the screen stops changing (two consecutive UI tree snapshots are identical). Returns the stable UI tree and optionally a screenshot. |
| wait_for_element_goneA | Poll the UI tree until an element matching the criteria disappears from screen. Useful for waiting until loading indicators, skeletons, or dialogs go away. |
| tap_elementA | Find a UI element by text, resource_id, or type and tap its center. Combines get_ui_tree + tap in one call. Optionally waits for the element, or scrolls to find it. |
| get_screen_stateB | Get the current screen state: UI tree and/or screenshot in a single call. UI tree is filtered to relevant elements by default. |
| set_network_stateB | Control device network connectivity: Wi-Fi, mobile data, airplane mode, and emulator throttling. Android only. |
| find_elementA | Find UI elements by text, resource_id, or type without interacting. Returns matching element details (center, size, state flags). Useful for assertions and verifications. |
| kill_appB | Force-stop an application by package name (Android) or bundle ID (iOS) |
| clear_app_dataA | Clear app data. Mode "cache" clears only temporary files (preserves storage, databases, login). Mode "all" returns app to fresh install state. |
| get_device_logsA | Get OS-level device logs. Android: logcat. iOS: log show (simulators only). Captures native logs (crashes, ANRs, system events, SDK logs) — different from JavaScript console logs. |
| set_clipboardA | Set the device clipboard content. Useful for testing paste of URLs, tokens, OTP codes, etc. On iOS this targets the simulator's own pasteboard (not the host Mac's). |
| get_clipboardA | Read the device clipboard content. Useful for verifying copy-to-clipboard features (tracking codes, share links). Works best on emulators/simulators; Android 10+ physical devices restrict clipboard access. |
| install_appA | Install an app on the device. Android: local .apk path (installed with -r, replacing an existing install). iOS: .app bundle (simulator) or .ipa (physical device via idb). |
| uninstall_appA | Uninstall an app from the device by package name (Android) or bundle ID (iOS). Removes all app data. |
| get_app_infoA | Check whether an app is installed and get its version (Android: versionName/versionCode from dumpsys; iOS simulator: CFBundle versions). |
| get_current_appA | Get the app (package + activity) currently in the foreground. Useful for asserting navigation and deep link results. Android only. |
| set_locationA | Set the device's mock GPS location. Essential for testing delivery/route flows. Android: emulator only (adb emu geo fix). iOS: simulators (simctl location) and physical devices via idb. |
| record_screenA | Record the device screen to an mp4 file. action "start" begins recording (Android caps at 180s), action "stop" finalizes it and returns the local file path. Useful for bug repro evidence. |
| set_appearanceA | Switch the device between dark and light mode. Android: cmd uimode night. iOS: simulators only (simctl ui appearance). Useful for verifying both themes of a screen. |
| rotate_deviceA | Rotate the device screen to a fixed orientation (disables auto-rotate). Android only. |
| clear_textA | Clear the currently focused text field. On Android it reads the focused element's text length from the UI tree and deletes accordingly (move to end + backspaces). |
| doctorA | Diagnose the local mobile tooling setup: adb, ANDROID_HOME, connected devices, emulator, Xcode simctl, and idb. Run this when device commands fail unexpectedly. |
| run_flowA | Run a declarative flow of UI steps server-side in a single call, using a subset of Maestro's YAML syntax. Steps auto-wait for their elements (no manual sleeps); execution stops at the first failure and returns the failing step plus the current UI tree so the caller can take over from there. Commands: launchApp, tapOn, doubleTapOn, longPressOn, inputText, eraseText, assertVisible, assertNotVisible, extendedWaitUntil, scrollUntilVisible, swipe, back, pressKey, hideKeyboard, waitForAnimationToEnd, stopApp, clearState, openLink, runFlow (inline commands or file: for composing flow files, with when: visible/notVisible/platform — use it to handle known popups), repeat (times and/or while: visible/notVisible). Selectors: text/id/type match as case-insensitive substrings, index picks the Nth match (0-based), optional: true skips instead of failing. Flows support ${VAR} placeholders resolved from the env parameter (or header env defaults). A Maestro-style header (appId: ... env: ... --- ...) is supported in YAML flows; runFlow file: paths resolve relative to the referencing flow file. |
| dismiss_dev_overlaysA | Close React Native development overlays (LogBox error/warning boxes and the warning banner) that sit on top of the app. They intercept taps aimed at whatever is underneath, so clearing them first makes a debug build behave like a release one. |
| set_permissionsA | Grant or revoke Android runtime permissions, so a flow can start from a clean install without a human tapping the system dialog. Accepts shorthands (camera, location, background_location, storage, media, notifications, microphone, contacts, phone, bluetooth) or full names like android.permission.CAMERA. Android only. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 37 tools
Most tools target clearly distinct actions (tap vs swipe vs type_text; install vs launch vs kill), but the inspection and waiting helpers overlap: screenshot vs get_screen_state, get_ui_tree vs find_element, and wait_for_element vs wait_for_stable can be confused. run_flow also duplicates many lower-level actions, forcing a choice between high-level and granular paths.
Nearly all names use lowercase snake_case with predictable verb_noun phrasing such as get_screen_info, set_appearance, wait_for_element, and install_app. A few are bare nouns or verbs (screenshot, doctor, tap, swipe), but the convention remains readable and mostly consistent.
At 37 tools, the set is well above the typical 3-15 range and is heavy even for a broad mobile-automation domain. Many utilities are individually justified, but inspection/state helpers and high-level flow tools could be consolidated without losing capability.
The surface covers device discovery, UI inspection, input, app lifecycle, permissions, logs, clipboard, network/location, screen recording, and declarative flows, which is strong coverage for mobile interaction. Gaps are minor, such as no standalone hide-keyboard or get-network-state tool, and several capabilities are platform-limited to Android or simulators.