local-only server
The server can only run on the client’s local machine because it depends on local resources.
Integrations
Enables automation of native Android applications through accessibility snapshots or coordinate-based interactions, supporting both emulators and physical devices for testing, data-entry, and multi-step user journeys.
Provides platform-agnostic automation of iOS applications using accessibility trees and screenshots, allowing for scripted flows and form interactions on both simulators and physical devices without manual control.
Supports interaction with Samsung mobile devices for application testing and automation through structured accessibility snapshots or coordinate-based taps.
Mobile Next - 用于移动自动化的 MCP 服务器
这是一个模型上下文协议 (MCP) 服务器,它通过与平台无关的接口实现可扩展的移动自动化,无需掌握 iOS 或 Android 知识。该服务器允许代理和 LLM 通过结构化的无障碍快照或基于屏幕截图的坐标点击操作与原生 iOS/Android 应用程序和设备进行交互。
https://github.com/user-attachments/assets/c4e89c4f-cc71-4424-8184-bdbc8c638fa1
🚀 移动 MCP 路线图:构建移动的未来
加入我们,持续增强移动 MCP!查看我们详细的路线图,了解即将推出的功能、改进和里程碑。您的反馈对于塑造移动自动化的未来至关重要。
主要用例
我们如何帮助扩展移动自动化:
- 📲 用于测试或数据输入场景的本机应用程序自动化(iOS 和 Android)。
- 📝 无需手动控制模拟器/仿真器或物理设备(iPhone、三星、Google Pixel 等)即可编写脚本流程并形成交互
- 🧭 由 LLM 驱动的自动化多步骤用户旅程
- 👆 基于代理框架的通用移动应用程序交互
- 🤖 支持代理与代理之间的通信,用于移动自动化用例和数据提取
主要特点
- 🚀快速轻量:在大多数交互中使用本机可访问性树,或在 a11y 标签不可用时使用基于屏幕截图的坐标。
- 🤖 LLM 友好:辅助功能(快照)不需要计算机视觉模型。
- 🧿视觉感知:评估并分析屏幕上实际渲染的内容,以决定下一步操作。如果无障碍数据或视图层次结构坐标不可用,则回退到基于屏幕截图的分析。
- 📊确定性工具应用程序:尽可能依赖结构化数据,减少纯基于屏幕截图的方法中发现的歧义。
- 📺提取结构化数据:使您能够从屏幕上可见的任何内容中提取结构化数据。
移动MCP架构
安装和配置
先决条件
将 MCP 与您的代理和移动设备连接起来需要:
- Xcode 命令行工具
- Android 平台工具
- 节点.js
- MCP支持基础模型或代理,例如Claude MCP 、 OpenAI Agent SDK 、 Copilot Studio
模拟器、仿真器和物理设备
启动后,移动 MCP 可以连接到:
- macOS/Linux 上的 iOS 模拟器
- Linux/Windows/macOS 上的 Android 模拟器
- 物理 iOS 或 Android 设备(需要适当的平台工具和驱动程序)
在运行 Mobile Next Mobile MCP 之前,请确保已安装并正确配置了移动平台 SDK(Xcode、Android SDK)。
在模拟器/仿真器上以“无头”模式运行
当您的机器上没有连接实体电话时,您可以在后台使用模拟器或模拟器运行 Mobile MCP。
例如,在 Android 上:
- 启动模拟器(avdmanager/emulator 命令)。
- 使用所需标志运行 Mobile MCP
在 iOS 上,您需要 Xcode 并运行模拟器,然后才能将 Mobile MCP 与该模拟器实例一起使用。
xcrun simctl list
xcrun simctl boot "iPhone 16"
移动命令和交互工具
命令和工具支持基于可访问性的定位器(首选)和基于坐标的输入,当可访问性/自动化 ID 缺失时,为您提供可靠、无缝的自动化的灵活性。
mobile_list_apps
- **描述:**列出设备上所有已安装的应用程序
- 参数:
bundleId
(字符串):应用程序的唯一捆绑包/包标识符,例如:com.google.android.keep 或 com.apple.mobilenotes)
mobile_launch_app
- **描述:**在设备/模拟器上启动指定的应用程序
- 参数:
bundleId
(字符串):应用程序的唯一捆绑包/包标识符,例如:com.google.android.keep 或 com.apple.mobilenotes)
mobile_terminate_app
- **描述:**终止正在运行的应用程序
- 参数:
packageName
(字符串):根据应用程序的包/包标识符调用强制停止或根据 pid 终止应用程序。
mobile_get_screen_size
- **描述:**获取移动设备的屏幕尺寸(以像素为单位)
- **参数:**无
mobile_click_on_screen_at_coordinates
- **描述:**根据坐标点击指定的屏幕坐标。
- 参数:
x
(数字):X 坐标y
(数字):Y 坐标
mobile_list_elements_on_screen
- **描述:**列出屏幕上的元素及其坐标,并显示文本或可访问性标签。
- **参数:**无
mobile_element_tap
- **描述:**点击由辅助功能定位器识别的 UI 元素
- 参数:
element
(字符串):人类可读的元素描述(例如“登录按钮”)ref
(字符串):可访问性/自动化 ID 或来自快照的引用
mobile_tap
- **描述:**点击指定的屏幕坐标
- 参数:
x
(数字):X 坐标y
(数字):Y 坐标
移动端按下按钮
- **描述:**按下设备上的按钮(主页、返回、音量、输入、电源按钮。)
- **参数:**无
mobile_open_url
- **描述:**在设备上的浏览器中打开 URL
- 参数:
url
(字符串):要打开的 URL(例如“ https://example.com ”)。
mobile_type_text
- **描述:**将文本输入到聚焦的 UI 元素中(例如,TextField、SearchField)
- 参数:
text
(字符串):要输入的文本submit
(布尔值):输入后是否按 Enter/Return
mobile_element_swipe
- **描述:**执行从一个 UI 元素到另一个 UI 元素的滑动手势
- 参数:
startElement
(字符串):起始元素的可读描述startRef
(字符串):起始元素的可访问性/自动化 IDendElement
(字符串):结束元素的人类可读描述endRef
(字符串):结束元素的可访问性/自动化 ID
mobile_swipe
- **描述:**在两组屏幕坐标之间执行滑动手势
- 参数:
startX
(数字):起始X坐标startY
(数字):起始 Y 坐标endX
(数字):结束X坐标endY
(数字):结束 Y 坐标
移动按键
- **描述:**按下硬件按键或触发特殊事件(例如 Android 上的返回按钮)
- 参数:
key
(字符串):按键标识符(例如,HOME、BACK、VOLUME_UP 等)
手机截屏
- **描述:**捕获当前设备屏幕的屏幕截图
- **参数:**无
mobile_get_source
- **描述:**获取当前设备 UI 结构(可访问性快照)(xml 格式)
- **参数:**无
感谢所有贡献者❤️
我们感谢所有帮助改进这个项目的人。
You must be authenticated.
Tools
模型上下文协议服务器通过适用于 iOS 和 Android 设备的平台无关界面实现可扩展的移动自动化,允许代理和 LLM 使用可访问性快照或基于坐标的交互与移动应用程序进行交互。
- 🚀 Mobile MCP Roadmap: Building the Future of Mobile
- Main use cases
- Main Features
- Mobile MCP Architecture
- Installation and configuration
- Prerequisites
- Mobile Commands and interaction tools
- mobile_list_apps
- mobile_launch_app
- mobile_terminate_app
- mobile_get_screen_size
- mobile_click_on_screen_at_coordinates
- mobile_list_elements_on_screen
- mobile_element_tap
- mobile_tap
- mobile_press_button
- mobile_open_url
- mobile_type_text
- mobile_element_swipe
- mobile_swipe
- mobile_press_key
- mobile_take_screenshot
- mobile_get_source
- Thanks to all contributors ❤️