Skip to content
Download Longwave

Mobile

Mobile is an MCP server for controlling mobile devices and emulators. The connected implementation exposes 34 tools for inspecting and interacting with mobile app sessions.

Add to Longwave Source

Install elsewhere

Install Mobile

Choose a harness. These instructions start the same local MCP server shown on this page.

Claude Code

Run this in your terminal. It adds a user-scoped server; use --scope project instead if it should apply only to the current project.

terminal
claude mcp add --scope user --transport stdio mobile -- npx -y @mobilenext/mobile-mcp@latest

What it does

Mobile MCP connects an agent to a mobile device or emulator. The agent can inspect the current app state and use the mobile controls exposed by the server.

  • Inspect the current device or emulator state.
  • Interact with mobile app controls.
  • Work with Android and iOS targets through one MCP connection.
  • Use screenshots and device information when a test needs visual evidence.
  • Check the live function arguments before calling a mobile operation.

Skills that ship with it

The skill has the agent read the accessibility tree before it takes a screenshot, because element labels are faster and more reliable to target than pixels, and it re-checks the screen after every action. Longwave installs it with the server, and each name below opens the skill's source.

Available functions

get_more_tools Check for additional tools whenever your task might benefit from specialized capabilities - even if existing tools could work as a fallback. The context is sent to the mobile-mcp developers, so never include PII, secrets, credentials or other private information in it.

Arguments

context required
string A description of your goal and what kind of tool would help accomplish it.
mobile_allocate_remote_device Reserve a physical device from the remote cloud fleet for exclusive use, returning a device identifier usable with the other mobile_* tools. Unlike local devices, a remote device is a shared and billed resource borrowed for the session - never call this silently. If no local device is available, offer a remote device to the user and call this only after they agree. Requires mobile_login_to_cloud_provider to have been called first; if this fails with an authentication error, call that tool then retry. Use mobile_list_remote_devices first to see which names and versions actually exist in the fleet before filtering by them. Release the device with mobile_release_remote_device once the whole task is finished - releasing wipes the device's state, so do not release and reallocate between steps of the same task just to be tidy.

Arguments

name
string Filter by device name/model. Supports a trailing * for prefix match (e.g. "iPhone*"), or an exact name (e.g. "iPhone 16").
platform required
string The platform to allocate a device for Allowed values: ios, android
timeoutSeconds
integer Seconds to wait for allocation when wait is true. Defaults to 900 (15 minutes). Only relevant when wait is true.
type
string Device type filter. Currently only "real" (physical devices) is supported by the fleet. Allowed values: real
version
array Filter by OS version. Supports comparison prefixes >=, >, <=, < (e.g. ">=18"), or an exact version (e.g. "18.6.2"). Multiple values are ANDed together.
wait
boolean If true, block until the device has finished allocating and is ready to use, up to timeoutSeconds. If false/omitted, this returns as soon as the reservation is made, but the device may not be immediately ready.
mobile_batch_commands Run multiple tools in sequence in a single call, e.g. click, type, click, type. Use this to fill forms or perform multi-step flows without round-trips. The device argument is applied to every step unless a step provides its own. Tools allowed as steps: get_more_tools, mobile_list_available_devices, mobile_login_to_cloud_provider, mobile_list_remote_devices, mobile_allocate_remote_device, mobile_release_remote_device, mobile_list_apps, mobile_get_foreground_app, mobile_launch_app, mobile_terminate_app, mobile_install_app, mobile_uninstall_app, mobile_get_screen_size, mobile_click_on_screen_at_coordinates, mobile_double_tap_on_screen, mobile_long_press_on_screen_at_coordinates, mobile_list_elements_on_screen, mobile_press_button, mobile_open_url, mobile_swipe_on_screen, mobile_type_keys, mobile_save_screenshot, mobile_set_orientation, mobile_fold_device, mobile_set_location, mobile_clipboard, mobile_get_device_logs, mobile_get_orientation, mobile_start_screen_recording, mobile_stop_screen_recording, mobile_list_crashes, mobile_get_crash.

Arguments

device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
listElementsAtEnd
boolean Run mobile_list_elements_on_screen after the last step and include its result. Defaults to false
steps required
array Tools to run, in order
stopOnError
boolean Stop at the first failing step. Defaults to true
mobile_click_on_screen_at_coordinates Click on the screen, either at x,y coordinates or on an element by its ref (e.g. "@e5") from the latest mobile_list_elements_on_screen result. Prefer ref when the element is listed.

Arguments

device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
ref
string Element ref from mobile_list_elements_on_screen, e.g. "@e5". Takes precedence over x,y
x
number The x coordinate to click on the screen, in pixels. Required unless ref is given
y
number The y coordinate to click on the screen, in pixels. Required unless ref is given
mobile_clipboard Read or replace the device clipboard. Pass text to set the clipboard, omit it to read the current clipboard.

Arguments

device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
text
string Text to place on the clipboard. Omit to read the clipboard instead.
mobile_double_tap_on_screen Double-tap on the screen, either at x,y coordinates or on an element by its ref (e.g. "@e5") from the latest mobile_list_elements_on_screen result. Prefer ref when the element is listed.

Arguments

device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
ref
string Element ref from mobile_list_elements_on_screen, e.g. "@e5". Takes precedence over x,y
x
number The x coordinate to double-tap, in pixels. Required unless ref is given
y
number The y coordinate to double-tap, in pixels. Required unless ref is given
mobile_fold_device Fold or unfold a foldable device, such as iPhone Duo simulators and foldable Android emulators. Provide either posture or angle.

Arguments

angle
number The desired hinge angle in degrees, between 0 (folded) and 180 (open). iOS only, e.g. iPhone Duo. Use instead of posture.
device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
posture
string The desired hinge posture: folded (0 degrees), half-open (90 degrees) or open (180 degrees) Allowed values: folded, half-open, open
mobile_get_crash Get the full content of a crash report by its ID. Use mobile_list_crashes to find available crash IDs.

Arguments

device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
id required
string The crash report ID to retrieve
mobile_get_device_logs Collect live device logs (logcat on Android, unified log on iOS) as one JSON object per line. Only logs emitted after the call starts are captured, so trigger the behavior you want to observe right before or during the call. Stops after `limit` entries or after 30 seconds of silence. Each line of a stack trace counts as one entry, so filter by process or tag to avoid filling the limit with noise. Start with a small limit (20-50) for a quick look. For large captures, pass `saveTo` to write logs to a file and only the entry count is returned.

Arguments

device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
filter
array Filters, ANDed together. key=value includes, key!=value excludes. Keys: pid, process, tag, level, subsystem, category, message. Example: ["tag=ActivityManager", "level=Error", "process!=SpringBoard"] Default: []
limit
integer Stop after this many log entries Default: 100
saveTo
string Path to write the logs to instead of returning them. Filename must end with .log, .txt, or .jsonl
mobile_get_foreground_app Get the app currently in the foreground on the device. Use this to verify which app or screen you are on before interacting with it.

Arguments

device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
mobile_get_orientation Get the current screen orientation of the device

Arguments

device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
mobile_get_screen_size Get the screen size of the mobile device in pixels

Arguments

device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
mobile_install_app Install an app on mobile device

Arguments

device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
path required
string The path to the app file to install. For iOS simulators, provide a .zip file or a .app directory. For Android provide an .apk file. For iOS real devices provide an .ipa file
mobile_launch_app Launch an app on mobile device. Use this to open a specific app. You can find the package name of the app by calling mobile_list_apps.

Arguments

device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
locale
string Comma-separated BCP 47 locale tags to launch the app with (e.g., fr-FR,en-GB)
packageName required
string The package name of the app to launch
mobile_list_apps List all the installed apps on the device

Arguments

device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
mobile_list_available_devices List all available devices. This includes both physical mobile devices and mobile simulators and emulators. It returns both Android and iOS devices. These are local devices already connected to this machine, ready to use immediately at no cost - for devices from the shared remote cloud fleet, use mobile_list_remote_devices instead.
mobile_list_crashes List crash reports available on the device

Arguments

device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
mobile_list_elements_on_screen List elements on screen with their ref, coordinates, and display text or accessibility label. Use the ref with mobile_click_on_screen_at_coordinates, mobile_double_tap_on_screen or mobile_long_press_on_screen_at_coordinates. Refs and coordinates stay valid as long as the screen does not change; re-list only after navigation or a layout change.

Arguments

device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
format
string Output format. "text" (default) is one compact line per element, "json" is a json array Allowed values: text, json
mobile_list_remote_devices List the catalog of device models (make, platform, OS version) available to reserve from the remote cloud device fleet. This is different from mobile_list_available_devices, which lists real devices and simulators/emulators already connected to this local machine and ready to use immediately at no cost. Remote devices live in a shared cloud fleet: they are not usable until reserved with mobile_allocate_remote_device, and reserving one may be a limited/billed resource. Requires mobile_login_to_cloud_provider to have been called first; if this fails with an authentication error, call that tool then retry.
mobile_login_to_cloud_provider Start authenticating this machine with the remote device cloud provider. This is required once before mobile_list_remote_devices or mobile_allocate_remote_device will work; if either of those fails with an authentication error, call this tool and then retry. This starts a browser-based device-code login and returns quickly with a URL and a one-time code - it does NOT wait for the login to complete. Show the URL and code to the user verbatim and ask them to open the URL and enter the code in their own browser. The login keeps running in the background after this tool returns; once the user confirms they've completed it, retry the remote devices tool that originally failed. Only call this after the user has asked for, or agreed to, remote/cloud devices - never call it speculatively, since it interrupts the user to act in their browser.
mobile_long_press_on_screen_at_coordinates Long press on the screen, either at x,y coordinates or on an element by its ref (e.g. "@e5") from the latest mobile_list_elements_on_screen result. Prefer ref when the element is listed.

Arguments

device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
duration
number Duration of the long press in milliseconds. Defaults to 500ms.
ref
string Element ref from mobile_list_elements_on_screen, e.g. "@e5". Takes precedence over x,y
x
number The x coordinate to long press on the screen, in pixels. Required unless ref is given
y
number The y coordinate to long press on the screen, in pixels. Required unless ref is given
mobile_open_url Open an http:// or https:// URL in the browser on device. Other URL schemes, such as app deep links, are rejected unless the server was started with MOBILEMCP_ALLOW_UNSAFE_URLS=1.

Arguments

device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
url required
string The URL to open, starting with http:// or https://
mobile_press_button Press a button on device

Arguments

button required
string The button to press, in upper case. Supported buttons: Android: HOME, BACK, VOLUME_UP, VOLUME_DOWN, ENTER, BACKSPACE, APP_SWITCH, POWER, DPAD_CENTER, DPAD_UP, DPAD_DOWN, DPAD_LEFT, DPAD_RIGHT iOS: HOME, VOLUME_UP, VOLUME_DOWN, ENTER, LOCK BACKSPACE deletes the character before the cursor, APP_SWITCH opens the recent apps, POWER turns the screen on or off, LOCK locks the screen, and the DPAD buttons move focus on Android TV.
device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
mobile_release_remote_device Release a device previously reserved with mobile_allocate_remote_device back to the remote cloud fleet so it becomes available to others. Releasing is destructive to the device's state: apps installed, files pushed, and any other changes made during this session are lost, and a later mobile_allocate_remote_device call may take time and could return a different physical unit. Only release once the whole task is finished - if there is more work to do on the same device shortly, keep holding it rather than releasing and reallocating.

Arguments

device required
string The device identifier to release back to the remote fleet
mobile_save_screenshot Save a screenshot of the mobile device to a file

Arguments

device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
maxSize
integer Maximum width/height in pixels, keeping aspect ratio. Omit for full size.
saveTo required
string The path to save the screenshot to. Filename must end with .png, .jpg, or .jpeg
scale
number Scale factor (0.0-1.0). Ignored if maxSize is provided.
mobile_set_location Override the GPS location reported by the device, or clear the override to restore the real location. Omit latitude and longitude to clear.

Arguments

device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
latitude
number Latitude in decimal degrees, e.g. 37.7749. Omit together with longitude to clear the override.
longitude
number Longitude in decimal degrees, e.g. -122.4194. Omit together with latitude to clear the override.
mobile_set_orientation Change the screen orientation of the device

Arguments

device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
orientation required
string The desired orientation Allowed values: portrait, landscape
mobile_start_screen_recording Start recording the screen of a mobile device. The recording runs in the background until stopped with mobile_stop_screen_recording. Returns the path where the recording will be saved.

Arguments

device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
output
string The file path to save the recording to. Filename must end with .mp4. If not provided, a temporary path will be used.
timeLimit
number Maximum recording duration in seconds. The recording will stop automatically after this time.
mobile_stop_screen_recording Stop an active screen recording on a mobile device. Returns the file path, size, and approximate duration of the recording.

Arguments

device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
mobile_swipe_on_screen Swipe on the screen

Arguments

device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
direction required
string The direction to swipe Allowed values: up, down, left, right
distance
number The distance to swipe in pixels. Defaults to 400 pixels for iOS or 30% of screen dimension for Android
x
number The x coordinate to start the swipe from, in pixels. If not provided, uses center of screen
y
number The y coordinate to start the swipe from, in pixels. If not provided, uses center of screen
mobile_take_screenshot Take a screenshot of the mobile device. Use this to understand what's on screen, if you need to press an element that is available through view hierarchy then you must list elements on screen instead. The screenshot is usually smaller than the screen, so when the device reports its screen size the result also states how to convert positions in the screenshot into screen coordinates before tapping. Do not cache this result.

Arguments

device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
maxSize
integer Maximum width/height in pixels, keeping aspect ratio. Defaults to 1024.
scale
number Scale factor (0.0-1.0). Ignored if maxSize is provided.
mobile_terminate_app Stop and terminate an app on mobile device

Arguments

device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
packageName required
string The package name of the app to terminate
mobile_type_keys Type text into the focused element

Arguments

device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
submit
boolean Whether to submit the text. If true, the text will be submitted as if the user pressed the enter key. Defaults to false
text required
string The text to type
mobile_uninstall_app Uninstall an app from mobile device

Arguments

device required
string The device identifier to use. Use mobile_list_available_devices to find which devices are available to you.
packageName required
string The package name of the app to uninstall

Questions people ask

Can Mobile MCP control an Android device?

The catalog describes Mobile MCP as a server for Android and iOS devices or emulators. The connected device must be visible to the machine running the MCP process.

Can Mobile MCP control an iPhone or iOS device?

The server is intended for mobile device control, including iOS targets. Check the live function arguments for the device and app operations supported by the installed version.

Can Mobile MCP use an Android or iOS emulator?

Yes. An emulator can be used when it is running and available to the environment that starts Mobile MCP. The MCP connection does not create the emulator for you.

How do I use Mobile MCP with Claude Code?

Add Mobile MCP to Claude Code on the machine that can reach the device or emulator. Once the server connects, Claude Code can call the mobile functions returned by the process.

How do I install Mobile MCP?

Add the catalog-backed Mobile MCP server to the client that will use it, then start it with a reachable Android or iOS target. The device setup is separate from the MCP connection.

Test the app where users actually run it.

Connect the agent to a device or emulator and keep mobile checks in the same work session.