
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 分