open-mobile-mcp

open-mobile-mcp

An MCP server for mobile automation that enables LLMs to interact with Android and iOS devices through screenshot, tap, swipe, log analysis, and app lifecycle management.

Category
访问服务器

README

Open Mobile MCP Server 📱

An open-source Model Context Protocol (MCP) server for mobile automation. Give any LLM eyes and hands on a real Android or iOS device — screenshot, tap, swipe, read logs, and verify your app without writing test code.

Works with Claude Code, Claude Desktop, Cursor, and any other MCP-compatible client.

Features

  • Perception: Screenshots, semantic UI hierarchy, OCR, element finder, layout health analysis.
  • Interaction: Tap, swipe, type, pinch, rotate, long-press, hardware key presses.
  • Logging: Per-app Android log filtering via PID (pass deviceId + packageId to eliminate system noise). Background log watching via wait_for_log.
  • Environment: Metro bundler management, app lifecycle, deep links, screen recording, locale switching.
  • Text Input: Unicode/Cyrillic/CJK/Emoji support via ADB Keyboard with automatic keyboard restore.

Prerequisites

  1. Node.js (v18+)

  2. ADB installed and in PATH (for Android).

  3. Maestro (required for iOS; fallback for Android input).

    • Mac/Linux: curl -Ls "https://get.maestro.mobile.dev" | bash

    • Windows:

      powershell -Command "iwr -useb https://get.maestro.mobile.dev | iex"
      
  4. (Optional) ADB Keyboard — only needed for non-ASCII input (Unicode, Cyrillic, Emoji).

    • Download from GitHub and install: adb install ADBKeyboard.apk.

Configuration

macOS / Linux

{
  "mcpServers": {
    "open-mobile-mcp": {
      "command": "npx",
      "args": ["open-mobile-mcp"]
    }
  }
}

Windows

{
  "mcpServers": {
    "open-mobile-mcp": {
      "command": "npx",
      "args": ["open-mobile-mcp"],
      "env": {
        "MAESTRO_HOME": "C:\\Users\\YOUR_USER\\.maestro",
        "PATH": "C:\\Users\\YOUR_USER\\.maestro\\maestro\\bin;C:\\Windows\\system32;C:\\Windows;..."
      }
    }
  }
}

Note: On Windows, explicitly setting MAESTRO_HOME and PATH is often required for maestro to be found.

<details> <summary>Running from source</summary>

git clone https://github.com/xzaleksey/open-mobile-mcp.git
cd open-mobile-mcp
npm install && npm run build

Then use "command": "node", "args": ["/path/to/open-mobile-mcp/build/index.js"] in your MCP config. </details>

Tools

Perception

Tool Platform Description
device_list Android/iOS List connected emulators and simulators
get_viewport Android/iOS Screenshot (~800px wide). Use originalWidth/originalHeight for tap coordinates — the image is scaled down, tapping at image pixels will miss.
get_semantic_hierarchy Android/iOS Pruned UI tree as JSON
get_screen_text Android/iOS OCR via Tesseract.js (default eng)
configure_ocr Android/iOS Set default OCR language (e.g. eng+fra)
find_element Android/iOS Find elements by testId, text, or contentDescription
wait_for_element Android/iOS Poll until element appears (default 20s)
get_element_image Android/iOS Cropped screenshot of a specific element
capture_diff Compare two base64 screenshots, returns diff %
analyze_layout_health Android/iOS Detect deep nesting and layout performance issues

Interaction

Tool Platform Description
tap_on_element Android/iOS Recommended — find + tap by selector. Note: text matching is exact; emoji prefixes (e.g. 🇫🇷 French A2) break text matching — check get_semantic_hierarchy for exact text first.
device_tap Android/iOS Raw coordinate tap. Must use original device pixels, not screenshot pixels.
device_swipe Android/iOS Swipe by coordinates
device_type Android/iOS Type text (handles Unicode)
device_pinch Android Two-finger pinch/zoom
device_rotate_gesture Android Two-finger rotation
device_press_key Android/iOS Hardware keys: back, home, recents, enter, delete, volume_up, volume_down, power, tab, search, space, menu, dpad_*. Also accepts raw Android keycodes.

Environment & Logs

Tool Platform Description
manage_bundler Android/iOS Start/stop/restart Metro. Pass deviceId + packageId for PID-based Android log filtering.
manage_platform_logs Android/iOS Manual control over adb logcat / xcrun capture. Pass deviceId + packageId for per-app filtering.
get_bundler_logs Android/iOS Recent Metro/Android/iOS logs. Returns [status] line — if buffer is empty, capture may not be running.
stream_errors Android/iOS Recent error/exception lines across all sources
get_network_logs Android/iOS Network logcat lines. For iOS, filters the internal log capture buffer (enable via manage_platform_logs).
wait_for_log Android/iOS Block until a log pattern matches. See subagent pattern below.
manage_app_lifecycle Android/iOS Launch, stop, install, or uninstall apps
open_deep_link Android/iOS Open a URL or deep link
clear_app_data Android/iOS Reset app to fresh-install state
get_app_info Android Version, permissions, install date
start_recording / stop_recording Android/iOS Screen recording to .mp4 (Android uses screenrecord, iOS uses simctl io).
run_maestro_flow Android/iOS Run a Maestro YAML flow
run_doctor Run npx expo-doctor
install_deps Run npx expo install <packages>

wait_for_log — Background Subagent Pattern

wait_for_log blocks until a pattern appears in the log buffer. Calling it directly in the main agent freezes the conversation. Always delegate it to a background subagent in Claude Code:

// Step 1 — spawn the watcher BEFORE the action that will trigger the log
// (In Claude Code, use Agent tool with run_in_background: true)
// Subagent prompt: "Call wait_for_log with pattern 'route: /home', timeout 60000. Report the result."

// Step 2 — perform the action in the main agent
tap_on_element({ selector: "Home", strategy: "text" });

// Step 3 — main agent continues freely; gets notified when subagent finishes

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选