Mobile Device MCP

io.github.srmoretePublished by GitHub account srmoretev0.1.10Updated Oct 24, 2026

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

VerifiedSTDIODesktop onlyBrowser AutomationDeveloper Tools

Overview

AI-generated overview

Lets an assistant control connected iOS and Android devices: tap, scroll, type, take screenshots, read UI trees, and run on-device code.

What you can do
Exposes tools to list devices, capture screenshots, read a flattened UI element tree, and send gestures such as tap, double tap, long press, scroll, and hardware button presses. It can type text, launch or terminate apps, list installed apps, and install an app from a host-local file. A run_code tool executes sandboxed JavaScript with UIAutomator bindings on Android and XCUITest bindings on iOS, and multiple devices can be handled at once.
When to use it
Useful for driving real or simulated mobile devices from an assistant: UI automation, exploratory testing, reproducing bugs, or scripted interactions across several devices. It fits workflows where the assistant needs to see the screen and act on it rather than only generate code.
Requirements
Runs locally over stdio via npx, so Node.js 18 or newer is needed. Android requires the Android SDK with adb on PATH; iOS simulators require Xcode with xcrun and simctl; real iOS devices require xcodebuild, devicectl, and iproxy from libimobiledevice. Optional environment variables MDMS_PORT_ANDROID and MDMS_PORT_IOS set the base ports for on-device servers.
Before you install
The server installs a driver app on each device on first use and starts an on-device HTTP server, with per-device bearer token auth over localhost. Tools can change device state: install_app replaces existing installs, terminate_app force-stops apps, and run_code executes JavaScript on the device, though the sandbox restricts some operations and kills runaway scripts. Only connect devices you are willing to have controlled.

Installation

In SourceWeft

  1. Open Mobile Device MCP in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

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

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

Or with custom ports:

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

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-mcpbun 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 serverbun 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

Source: README.md at commit ec853d4

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.10LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts