
Mobile Device MCP
io.github.srmorete由 GitHub 帳號 srmorete 發布v0.1.10更新於 Oct 24, 2026
Control iOS and Android devices with multi-device and seamless Native/WebView support.
概覽
讓助理控制已連線的 iOS 與 Android 裝置:點擊、捲動、輸入、截圖、讀取 UI 樹,並在裝置上執行程式碼。
- 可以做什麼
- 提供列出裝置、擷取畫面、讀取扁平化 UI 元素樹,以及送出點擊、雙擊、長按、滑動與硬體按鍵等手勢的工具。它可以輸入文字、啟動或終止應用程式、列出已安裝應用程式,並從主機本機檔案安裝應用程式。run_code 工具在 Android 上以 UIAutomator 綁定、在 iOS 上以 XCUITest 綁定執行沙箱 JavaScript,且可同時處理多台裝置。
- 適用情境
- 適合讓助理操作實機或模擬器:UI 自動化、探索性測試、重現缺陷,或在多台裝置上執行腳本化互動。適用於助理需要查看畫面並對其操作,而不只是產生程式碼的情境。
- 執行需求
- 透過 npx 以 stdio 在本機執行,需要 Node.js 18 或更新版本。Android 需要 Android SDK 且 adb 在 PATH 中;iOS 模擬器需要 Xcode 及 xcrun、simctl;iOS 實機需要 xcodebuild、devicectl 以及 libimobiledevice 的 iproxy。選用環境變數 MDMS_PORT_ANDROID 與 MDMS_PORT_IOS 可設定裝置端伺服器的起始連接埠。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Mobile Device MCP,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
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:
- 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.
- UI tree filter — Normalizes raw UI trees from both platforms into a unified flat element list.
- 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
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
adbon PATH - iOS Simulator: Xcode with
xcrun,simctl - iOS Real Device: Xcode with
xcodebuild,devicectl, andiproxy(from libimobiledevice) - Building from source: Bun runtime, Gradle (Android), Xcode (iOS)
Installation
Claude Code
Or with custom ports:
Modifying .mcp.json (Cursor, Claude Desktop, etc)
Building from Source
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:
Configuration
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
來源:README.md,提交 ec853d4
工具
0版本歷史
1- v0.1.10最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分