Skip to main content
ClaudeWave
srmorete avatar
srmorete

mobile-device-mcp

Ver en GitHub

An MCP server to use with iOS and Android. Seamlessly maps Native screens and WebViews. Multiple parallel devices supported.

MCP ServersRegistry oficial37 estrellas1 forksTypeScriptMITActualizado today
ClaudeWave Trust Score
87/100
Trusted
Passed
  • Open-source license (MIT)
  • Actively maintained (<30d)
  • Clear description
  • Topics declared
Last scanned: 6/11/2026
Install in Claude Code / Claude Desktop
Method: NPX · @srmorete/mobile-device-mcp
Claude Code CLI
claude mcp add mobile-device-mcp -- npx -y @srmorete/mobile-device-mcp
claude_desktop_config.json (Claude Desktop)
{
  "mcpServers": {
    "mobile-device-mcp": {
      "command": "npx",
      "args": ["-y", "@srmorete/mobile-device-mcp"]
    }
  }
}
1. Run the command above in your terminal (Claude Code), or paste the JSON config into claude_desktop_config.json (Claude Desktop).
2. Replace any <placeholder> values with your API keys or paths.
3. Restart Claude. The MCP server and its tools appear automatically.
Casos de uso

Resumen de MCP Servers

# 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 |
| `install_app` | Install an app from a host-local file (`.apk` for Android, `.app` for iOS simulator, `.app`/`.ipa` for iOS device). Replaces existing installs |
| `run_code` | Execute sandboxed JavaScript on-device (see [run_code](#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](https://libimobiledevice.org/))
- **Building from source:** [Bun](https://bun.sh/) 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-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 Variable | Default | Description |
|---------------------|---------|-------------|
| `MDMS_PORT_ANDROID` | 18000 | Base port for Android on-device servers |
| `MDMS_PORT_IOS` | 19000 | Base 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](https://github.com/mobile-next/mobile-mcp) and [Maestro](https://github.com/mobile-dev-inc/maestro).
Used as inspiration but reframed the current approach to be multi-device and with seamless Native/WebView support (especially on Android).

## License

MIT
aiai-agentsandroidautomationiosmcpqaqa-agentui-testing

Lo que la gente pregunta sobre mobile-device-mcp

¿Qué es srmorete/mobile-device-mcp?

+

srmorete/mobile-device-mcp es mcp servers para el ecosistema de Claude AI. An MCP server to use with iOS and Android. Seamlessly maps Native screens and WebViews. Multiple parallel devices supported. Tiene 37 estrellas en GitHub y se actualizó por última vez today.

¿Cómo se instala mobile-device-mcp?

+

Puedes instalar mobile-device-mcp clonando el repositorio (https://github.com/srmorete/mobile-device-mcp) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.

¿Es seguro usar srmorete/mobile-device-mcp?

+

Nuestro agente de seguridad ha analizado srmorete/mobile-device-mcp y le ha asignado un Trust Score de 87/100 (tier: Trusted). Revisa el desglose completo de comprobaciones superadas y flags en esta página.

¿Quién mantiene srmorete/mobile-device-mcp?

+

srmorete/mobile-device-mcp es mantenido por srmorete. La última actividad registrada en GitHub es de today, con 2 issues abiertos.

¿Hay alternativas a mobile-device-mcp?

+

Sí. En ClaudeWave puedes explorar mcp servers similares en /categories/mcp, ordenados por popularidad o actividad reciente.

Despliega mobile-device-mcp en tu cloud

Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.

¿Mantienes este repo? Añade un badge a tu README

Pega el badge en tu README de GitHub para mostrar que está auditado por ClaudeWave. Cada badge enlaza de vuelta a esta página y muestra el Trust Score actual.

Featured on ClaudeWave: srmorete/mobile-device-mcp
[![Featured on ClaudeWave](https://claudewave.com/api/badge/srmorete-mobile-device-mcp)](https://claudewave.com/repo/srmorete-mobile-device-mcp)
<a href="https://claudewave.com/repo/srmorete-mobile-device-mcp"><img src="https://claudewave.com/api/badge/srmorete-mobile-device-mcp" alt="Featured on ClaudeWave: srmorete/mobile-device-mcp" width="320" height="64" /></a>

Más MCP Servers

Alternativas a mobile-device-mcp