Back to MCP directory
publicPublicdnsLocal runtime

android-mobile-mcp

Android Mobile MCP是一个通过模型上下文协议实现Android设备自动化的工具,提供UI操作、应用管理和屏幕捕获等功能

article

README

🚀 Android Mobile MCP

Android Mobile MCP 搭建了模型上下文协议与安卓设备自动化之间的桥梁,使 AI 代理能够通过 UI 操作、应用管理和屏幕截图等方式与安卓设备进行交互。

🚀 快速开始

前提条件

  1. 通过 USB 或网络连接安卓设备。
  2. 在安卓设备上启用 USB 调试。
  3. 安装 ADB(安卓调试桥)。

📦 安装指南

在配置文件中添加以下内容:

{
  "mcpServers": {
    "android-mobile-mcp": {
      "command": "uvx",
      "args": ["android-mobile-mcp"]
    }
  }
}

📚 详细文档

工具参考

屏幕分析

  • mobile_dump_ui - 将 UI 元素提取为分层 JSON
    • 解析屏幕 XML 以识别可聚焦元素和文本内容。
    • 计算每个交互元素的中心坐标。
    • 返回结构化的父子元素关系。
  • mobile_take_screenshot - 捕获当前屏幕状态
    • 返回 PNG 图像数据以进行视觉分析。

触摸交互

  • mobile_click - 在特定坐标处点击
    • 根据当前 UI 状态验证坐标。
    • 需要事先调用 mobile_dump_ui 进行坐标验证。
    • 防止点击无效或非交互区域。
  • mobile_swipe - 执行滑动手势
    • 在两个坐标点之间执行定向滑动。
    • 可配置滑动持续时间以控制手势速度。

文本输入

  • mobile_type - 在聚焦字段中输入文本
    • 将文本发送到当前活动的输入字段。
    • 可选择使用回车键自动提交。

导航

  • mobile_key_press - 按下系统按钮
    • 支持硬件和虚拟按键:返回、主页、最近任务、回车键。

应用管理

  • mobile_list_apps - 列出已安装的应用程序
    • 过滤掉系统应用和不可启动的软件包。
    • 仅返回用户可访问的应用程序。
  • mobile_launch_app - 按软件包名称启动应用程序
    • 在尝试启动前验证软件包是否存在。
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client