Mobile Device Mcp
About
An MCP server to use with iOS and Android. Seamlessly maps Native screens and WebViews. Multiple parallel devices supported.
Details
- Author
- srmorete
- Downloads
- 353
- Categories
- Developer Tools, Other, Automation
Jump to
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Mobile Device McpCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install via npx and add to your MCP client (e.g., Claude Code, Cursor, Claude Desktop). Use claude mcp add mobile-device-mcp -- npx -y @srmorete/mobile-device-mcp@latest or configure .mcp.json with the command and optional environment variables MDMS_PORT_ANDROID and MDMS_PORT_IOS to customize base ports. Ensure Node
list_devices
Lists available mobile devices
tap
Taps at coordinates on the device screen
double_tap
Double-taps at coordinates on the device screen
long_press
Long-presses at coordinates on the device screen
scroll
Scrolls on the device screen from start to end coordinates
type_text
Types text on the device
press_button
Presses a hardware/navigation button on the device
screenshot
Takes a screenshot of the device screen
uitree
Returns the UI element tree of the device screen. Off-screen elements are excluded by default; pass include_invisible: true to keep them. With search, results are ranked leaf-first (visible, non-container, smaller area).
launch_app
Launches an app on the device
terminate_app
Terminates an app on the device
list_apps
Lists installed apps on the device
install_app
Installs an app on the device from a file on the host: .apk for Android, .app bundle for iOS simulator, .app or .ipa for iOS real device. Replaces existing installs.
run_code
Execute test automation code on the device
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"mobile device mcp": {
"mobile-device-mcp": {
"command": "npx",
"args": [
"-y",
"@srmorete/mobile-device-mcp"
]
}
}
}
}
McpServers
{
"mobile-device-mcp": {
"command": "npx",
"args": [
"-y",
"@srmorete/mobile-device-mcp"
]
}
}
Mobile Device MCP
An MCP server that lets AI agents control iOS and Android devices (tap, scroll, type, take screenshots, read UI trees, and run code). Works with multiple devices at the same time.
How It Works
Three-layer architecture:
1. On-device servers — Lightweight HTTP servers running on each mobile device (UIAutomator on Android, XCUITest on iOS) that expose the accessibility tree and accept interaction commands.
2. UI tree filter — Normalizes raw UI trees from both platforms into a unified flat element list.
3. MCP server — The external interface. Handles device discovery, bootstrapping, port allocation, and proxies requests to on-device servers.
Devices are bootstrapped on first use — the server installs the driver app, allocates a port, starts the on-device server, and polls until it's healthy. After that, all tool calls are proxied over localhost HTTP with per-device bearer token auth.
Tools
| Tool | Description |
|------|-------------|
| list_devices | List available iOS and Android devices |
| screenshot | Capture the device screen (JPEG) |
| uitree | Get the UI element tree as a flat list, with optional search and limit |
| tap | Tap at screen coordinates |
| double_tap | Double-tap at screen coordinates |
| long_press | Long-press at screen coordinates (configurable duration) |
| scroll | Swipe from start to end coordinates |
| type_text | Type text into the focused element |
| press_button | Press a hardware/navigation button (home, back, enter, volumeUp/Down, dpadUp/Down/Left/Right/Center) |
| launch_app | Launch an app by bundle ID / package name |
| terminate_app | Force-stop an app |
| list_apps | List installed apps |
| run_code | Execute sandboxed JavaScript on-device (see run_code below) |
run_code
Agents can pass code _that looks like_ UIAutomator or XCUITest, both being Javascript under the hood.
The sandbox restricts (Android) potentially dangerous Java operations and only allows (iOS) some XCUITest-ish commands
- Android: Rhino engine with UIAutomator bindings — uiDevice (click, swipe, find elements, press keys, read display info), By (selectors), Until (wait conditions), console.log()
- iOS: JavaScriptCore with XCUITest bindings — app (query elements, tap, type, swipe), springboard, device, openApp(bundleId), sleep(ms), console.log()
Both platforms automatically kill runaway scripts (infinite loops) and create a fresh sandbox per call.
Prerequisites
- Node.js 18+ (for running via npx)
- Android: Android SDK with adb on PATH
- iOS Simulator: Xcode with xcrun, simctl
- iOS Real Device: Xcode with xcodebuild, devicectl, and iproxy (from libimobiledevice)
- Building from source: Bun runtime, Gradle (Android), Xcode (iOS)
Installation
Claude Code
claude mcp add mobile-device-mcp -- npx -y @srmorete/mobile-device-mcp@latest
Or with custom ports:
claude mcp add mobile-device-mcp -e MDMS_PORT_ANDROID=20000 -e MDMS_PORT_IOS=21000 -- npx -y @srmorete/mobile-device-mcp@latest
Modifying .mcp.json (Cursor, Claude Desktop, etc)
{
"mcpServers": {
"mobile-device-mcp": {
"command": "npx",
"args": ["-y", "@srmorete/mobile-device-mcp@latest"],
"env": {
"MDMS_PORT_ANDROID": "18000", # optional
"MDMS_PORT_IOS": "19000" # optional
}
}
}
}
Building from Source
```bash
git clone <repo-url>
cd mobile-device-mcp
bun install
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.


