SM

srmorete/mobile-device-mcp

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

53 stars 2 forks 품질 78 트렌드 17MIT

MCP 서버는 iOS 및 Android에서 사용할 수 있습니다. 이음새가 없는 지도 Native 스크린 및 WebViews. 지원되는 다수 평행한 장치.

개요

AI Agent 제어 iOS 및 Android 기기 (탭, 스크롤, 유형, 스크린 샷을 찍고, UI 나무를 읽고, 코드를 실행) 할 수있는 MCP 서버. 동시에 여러 장치와 함께 작동합니다. 1. - 각 모바일 장치에서 실행되는 경량 HTTP 서버 (Android의 UIAutomator, iOS의 XCUITest)는 액세스 가능성 트리를 노출하고 상호 작용 명령을 받아들입니다. 2. — 모두 플랫폼에서 통일된 평평한 요소 목록에 원시 UI 나무를 정상화합니다. 3. - 외부 인터페이스. Device discovery, bootstrapping, port 할당 및 프록시 요청을 On-device 서버에 처리하십시오. 장치는 첫 번째 사용에 부트 스트랩 - 서버는 드라이버 앱을 설치하고 포트를 할당하고, 장치 서버를 시작하고, 건강 할 때까지 오염. 그 후, 모든 도구 호출은 per-device Bearer 토큰을 가진 localhost HTTP에 proxied. 에이전트는 UIAutomator 또는 XCUITest와 같은 코드를 전달할 수 있으며, 두 번의 Javascript가 될 수 있습니다.

개요(AI 번역)

AI Agent 제어 iOS 및 Android 기기 (탭, 스크롤, 유형, 스크린 샷을 찍고, UI 나무를 읽고, 코드를 실행) 할 수있는 MCP 서버. 동시에 여러 장치와 함께 작동합니다.

그것이 작동하는 방법

3 층 건축술:

  1. ** On-device 서버 ** - 각 모바일 장치에서 실행되는 경량 HTTP 서버 (Android의 UIAutomator, iOS의 XCUITest)는 접근성 트리를 노출하고 상호 작용 명령을 수락합니다.
  2. ** UI 트리 필터 ** - 두 플랫폼에서 통일된 평평한 요소 목록으로 원시 UI 트리를 정상화합니다.
  3. ** MCP 서버 ** - 외부 인터페이스. Device discovery, bootstrapping, port 할당 및 프록시 요청을 On-device 서버에 처리하십시오.

장치는 첫 번째 사용에 부트 스트랩 - 서버는 드라이버 앱을 설치하고 포트를 할당하고, 장치 서버를 시작하고, 건강 할 때까지 오염. 그 후, 모든 도구 호출은 per-device Bearer 토큰을 가진 localhost HTTP에 proxied.

도구

도구 설명
list_devices iOS 및 Android 기기 목록
screenshot 장치 화면 캡처 (JPEG)
uitree 옵션 검색 및 제한으로 UI 요소 트리를 플랫리스트로 가져옵니다.

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 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

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. Off-screen elements are excluded unless include_invisible: true
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 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
GitHub에서 전체 README 보기

설치

npx -y @srmorete/mobile-device-mcp@latest
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

{ "mcpServers": { "mobile-device-mcp": { "command": "npx", "args": ["-y", "@srmorete/mobile-device-mcp@latest"], "env": { "MDMS_PORT_ANDROID": "18000", # optional "MDMS_PORT_IOS": "19000" # optional } } } }