Mobile Device MCP logo

Mobile Device MCP

Control iOS and Android devices with multi-device and seamless Native/WebView support.

Install Mobile Device MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "mobile-device-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@srmorete/mobile-device-mcp@latest"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y @srmorete/mobile-device-mcp@latest

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 9d ago.

Overview

Tools14

What Mobile Device MCP lets your agent do. Expand a tool for its parameters.

Self-reported~227 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

9/9 checks healthy over the last 47d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 11d ago via OSV.dev · @srmorete/mobile-device-mcp@latest (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars52Stargazers on the source repository.
npm downloads410Package downloads in the last 30 days.
Last commit2mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed14Callable tools this server registers over MCP.
Directory activity6 viewsConfig copies, upvotes, and views on AllMCPs.

From the project README

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

Terminal
claude mcp add mobile-device-mcp -- npx -y @srmorete/mobile-device-mcp@latest

Or with custom ports:

Terminal
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)

config.json
{
  "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

# 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:

bash
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

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Mobile Device MCP

Mobile Device MCP is an MCP server that lets AI agents control iOS and Android devices through taps, scrolling, text entry, screenshots, UI-tree access, app management, and code execution. It supports multiple devices simultaneously, normalizes accessibility trees, and provides seamless interaction across native apps and WebViews through on-device servers.

Install Mobile Device MCP with Node.js 18+ by configuring your MCP client to run `npx -y @srmorete/mobile-device-mcp@latest`; Claude Code users can use `claude mcp add mobile-device-mcp -- npx -y @srmorete/mobile-device-mcp@latest`.

Mobile Device MCP supports iOS and Android devices, including iOS simulators and real iOS devices. Android requires the Android SDK with `adb`, while iOS support requires Xcode tooling such as `xcrun` and `simctl`, with additional tools required for real devices.

Mobile Device MCP tools can discover devices, capture screenshots, inspect UI trees, tap and scroll, enter text, press hardware or navigation buttons, launch and terminate apps, list or install apps, and execute sandboxed JavaScript using Android UIAutomator or iOS XCUITest-style bindings.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMobile Device MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mobile-device-mcp?style=directory)](https://allmcps.com/mcp/mobile-device-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/mobile-device-mcp"><img src="https://allmcps.com/api/badge/mobile-device-mcp?style=directory" alt="Mobile Device MCP on AllMCPs" /></a>