PluginBench
MCP Server
Active
MIT

Mobile Device MCP MCP Server

io.github.srmorete/mobile-device-mcp

Control iOS and Android devices with AI—tap, scroll, type, screenshot, and run code across multiple devices.

What is the Mobile Device MCP MCP server?

Mobile Device MCP is an MCP server that enables AI agents to control iOS and Android devices through a unified interface. It supports multi-device operation with tools for screenshots, UI tree inspection, touch interactions, app management, and sandboxed code execution on both platforms.

This server bridges AI agents to physical or simulated iOS and Android devices. It handles device discovery, bootstrapping lightweight on-device HTTP servers, and proxies interaction commands (taps, scrolls, typing, screenshots, UI tree reads, and JavaScript execution). Use it to automate mobile app testing, UI interaction, or build AI-driven mobile workflows.

How to install Mobile Device MCP

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "mobile-device-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@srmorete/mobile-device-mcp"
      ]
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • list_devices — List available iOS and Android devices
  • screenshot — Capture the device screen as JPEG
  • uitree — Get the UI element tree as a flat list, with optional search and limit; off-screen elements excluded unless include_invisible is true
  • tap — Tap at screen coordinates
  • double_tap — Double-tap at screen coordinates
  • long_press — Long-press at screen coordinates with configurable duration
  • scroll — Swipe from start to end coordinates
  • type_text — Type text into the focused element
  • press_button — Press a hardware or navigation button (home, back, enter, volumeUp/Down, dpadUp/Down/Left/Right/Center)
  • launch_app — Launch an app by bundle ID or package name
  • terminate_app — Force-stop an app
  • list_apps — List installed apps
  • install_app — Install an app from a host-local file (.apk for Android, .app for iOS simulator, .app/.ipa for iOS device)
  • run_code — Execute sandboxed JavaScript on-device using UIAutomator (Android) or XCUITest (iOS) bindings

Use cases

  • Automate mobile app UI testing by scripting taps, scrolls, and assertions across multiple devices simultaneously
  • Capture screenshots and inspect UI trees to validate app layouts and element visibility
  • Install, launch, and terminate apps programmatically for testing workflows
  • Execute custom JavaScript logic on-device to interact with native and web views
  • Build AI-driven mobile automation workflows that respond to app state in real time

Mobile Device MCP MCP server FAQ

What is Mobile Device MCP?

It's an MCP server that lets AI agents control iOS and Android devices—taking screenshots, reading UI trees, tapping, scrolling, typing, running apps, and executing sandboxed code on both platforms, with support for multiple devices at once.

Is it free?

Yes, Mobile Device MCP is open-source under the MIT license.

How do I install it in Cursor or Claude?

Add it to your `.mcp.json` file with `npx -y @srmorete/mobile-device-mcp@latest` as the command, or use `claude mcp add mobile-device-mcp -- npx -y @srmorete/mobile-device-mcp@latest` for Claude Code.

What are the prerequisites?

Node.js 18+, Android SDK with adb on PATH (for Android), and Xcode with xcrun and simctl (for iOS Simulator) or xcodebuild, devicectl, and iproxy (for iOS real devices).

Can I control multiple devices at the same time?

Yes, the server supports multi-device operation. Devices are discovered and bootstrapped automatically, and each gets its own port for communication.

Does it support both native and web views?

Yes, it provides seamless Native/WebView support on both Android and iOS through a unified UI tree interface and JavaScript execution sandbox.

README (reference)

Source of truth, from the repository.

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

ToolDescription
list_devicesList available iOS and Android devices
screenshotCapture the device screen (JPEG)
uitreeGet the UI element tree as a flat list, with optional search and limit. Off-screen elements are excluded unless include_invisible: true
tapTap at screen coordinates
double_tapDouble-tap at screen coordinates
long_pressLong-press at screen coordinates (configurable duration)
scrollSwipe from start to end coordinates
type_textType text into the focused element
press_buttonPress a hardware/navigation button (home, back, enter, volumeUp/Down, dpadUp/Down/Left/Right/Center)
launch_appLaunch an app by bundle ID / package name
terminate_appForce-stop an app
list_appsList installed apps
install_appInstall an app from a host-local file (.apk for Android, .app for iOS simulator, .app/.ipa for iOS device). Replaces existing installs
run_codeExecute 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

git clone <repo-url>
cd mobile-device-mcp
bun install

# Build drivers for both platforms and pack tarball
./scripts/build.sh

The build script compiles the on-device drivers (Android APKs via Gradle, iOS test bundle via xcodebuild), copies them to drivers/, and creates an npm tarball.

To run locally during development:

bun run start           # Start the MCP server
bun test                # Run the test suite

Configuration

Environment VariableDefaultDescription
MDMS_PORT_ANDROID18000Base port for Android on-device servers
MDMS_PORT_IOS19000Base port for iOS on-device servers

Ports are assigned sequentially — first Android device gets 18000, second gets 18001, and so on. Same for iOS starting at 19000.

Acknowledgements

Mobile Device MCP server stands on the shoulders of giants such as mobile-mcp and Maestro. Used as inspiration but reframed the current approach to be multi-device and with seamless Native/WebView support (especially on Android).

License

MIT

Related MCP servers

EXExecute Intent logo

Execute Intent

Maintained

Intent execution engine for autonomous agent task routing

0
JavaScript
MIT
View repository →

Trust & settlement for AI agents: DID, ZK reputation, audit, USDC/USDCx/USAD/ALEO. First DID free.

0
JavaScript
MIT
View repository →

A/B experiment runner for the A2A network with x402 micropayments on Base USDC.

0
JavaScript
MIT
View repository →

HiveAddressScreen MCP — pre-settlement on-chain risk screen. 17-vector GoPlus rail

0
JavaScript
MIT
View repository →
HIHive Agent Kyc logo

Hive Agent Kyc

Maintained

KYA agent identity verification and trust scoring for autonomous A2A networks

0
JavaScript
MIT
View repository →

Per-agent rate limits and quota enforcement for the Hive A2A economy

0
JavaScript
MIT
View repository →