# Repository Briefing: mobile-next/mobile-mcp
> Source: https://repoforai.com/repo/mobile-next/mobile-mcp (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/mobile-next/mobile-mcp
- **Official Docs / Website**: https://mobilenext.ai
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: TypeScript
- **License**: Apache-2.0
- **Engineering Health**: A+ (95/100 · Maintenance 35/35 · Adoption 20/25 · Releases 20/20 · License 20/20)
- **Latest Release**: 1.0.21 (2026-11-30) — https://github.com/mobile-next/mobile-mcp/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: Docker, MCP, CLI, Self-Hosted
- **Momentum**: 11,100 ★ total (+28 24h / +157 7d) · 989 forks
- **Topics**: `agent`, `android`, `android-automation`, `appium-alternative`, `claude-code`, `codex`, `cursor`, `emulator`, `ios`, `ios-automation`, `mcp`, `mcp-server`
- **When to Use**: Best for: Mobile teams that want agents to explore builds on iOS and Android, run cross-platform smoke checks, and turn stable flows into assertion-based CI tests. Skip if: You need a standalone test runner with deterministic assertions and isolated fixtures out of the box, or you cannot provide compatible device hosts or cloud devices.

## Overview
```text
### Architecture & Core Mechanics
Mobile MCP is a TypeScript bridge between an MCP client and a mobile device. The client’s agent chooses actions; the server exposes device discovery, UI inspection, and input as callable tools. `mobilewright` is the key automation dependency. The primary feedback loop reads a structured accessibility snapshot and targets controls by element reference when possible. When a control is missing from the snapshot, the client can inspect a screenshot and use coordinates instead.

The npm package exposes `mcp-server-mobile`; the container starts `node lib/index.js`. The manifest includes the MCP Node, server, and Express packages alongside Express itself. Stdio is the default transport, while `--listen` enables stateless Streamable HTTP at `/mcp`. Transport statelessness removes the need for HTTP session affinity, but it does not make device state stateless: actions against the same device still share its foreground app, screen, and input focus.

### Key Capabilities & Differentiators
A single MCP tool surface covers iOS simulators, Android emulators, and physical devices on both platforms. Agents can inspect the foreground app, install or launch builds, target controls by reference or coordinates, type, swipe, and drag. `mobile_batch_commands` can run an ordered sequence with pauses and return a final element snapshot, reducing client round trips for a known flow. Launch options include locale and platform-specific inputs such as Android intent extras and iOS environment variables.

The server can save screenshots, record video, collect Android logcat or iOS unified logs, and list and retrieve crash reports. Some operations are platform-specific: clearing app data is supported on Android and iOS Simulator, and folding applies to supported virtual foldables. Mobile Next Cloud adds browser-based device-code login and tools to list, reserve, and release physical devices while retaining the same interaction tools.

### Trade-offs & Limitations
Mobile MCP is most useful as an exploration layer, not as the release gate itself. Compared with authoring Appium, XCUITest, or Espresso tests up front, an agent can explore a flow against a shared cross-platform interface with less initial scripting. Accessibility snapshots can avoid sending images on every step, but the benefit depends on the app exposing useful labels and controls. Coordinate fallbacks are more sensitive to layout, orientation, and device size. Once a flow is stable, move it into an assertion-based Mobilewright test or an existing test suite rather than relying on repeated agent interpretation.

Self-hosting keeps device setup and access under your control, but does not remove host tooling requirements or the need to isolate concurrent runs targeting the same device. Cloud reservations reduce local device upkeep at the cost of a service dependency. Screenshots, clipboard contents, logs, and persistent app state can contain sensitive data. Use test devices and accounts, and limit who can invoke tools that clear data or uninstall apps.

### Hardware & Deployment Guide
For local use, run the npm package with Node.js 20+ and register it as a stdio server. Verify setup with `mobile_list_available_devices`. On iOS, boot a simulator with Xcode or connect and trust a physical device over USB. On Android, use Platform Tools with a running emulator or a device with USB debugging enabled and authorized. The multi-stage Node.js 22-slim image runs as `node` and uses `ADB_SERVER_SOCKET=tcp:host.docker.internal:5037` to reach the host ADB server; it does not bundle an emulator or an iOS host stack.

For a shared HTTP endpoint, use a Streamable HTTP client, keep the listener private where possible, and configure `MOBILEMCP_AUTH` plus TLS before exposing it beyond localhost. Without the token, clients can call the server unauthenticated. Recent changes include launch arguments and environment variables in 1.0.19, support for `DO_NOT_TRACK=1` and real-parent-directory validation for output paths in 1.0.20, and an upgrade to `mobilewright` 0.0.73 in 1.0.21 that brings iOS physical-device information reporting without the device agent installed.
```

## Key Capabilities
```text
- UI inspection: Accessibility snapshots expose element properties, coordinates, and refs; screenshots cover controls the tree misses.
- Batch execution: `mobile_batch_commands` runs actions in order, supports delays, and can return a final element snapshot.
- Diagnostics: Collect Android logcat or iOS unified logs, retrieve crash reports, and record the screen.
- Transport: Stdio by default or stateless Streamable HTTP at `/mcp`, with optional Bearer authentication via `MOBILEMCP_AUTH`.
- Container boundary: The non-root Node.js 22 image ships an ADB client and delegates device connections to the host ADB server.
- Terminal integration: The Claude Code `/mobile-mirror` plugin provides a live, interactive device pane in terminals that support the kitty graphics protocol.
```

## Quick Start / Clone
```bash
npx @mobilenext/mobile-mcp@latest install
```
