An MCP (Model Context Protocol) server for mobile automation and development across **HarmonyOS**, **iOS**, and **Android** — supporting simulators, emulators, and real devices.
This repository is empty
Translated by AI, submit an issue feedback
deveco-mobile-mcp
一款适用于 HarmonyOS、iOS 和 Android 跨平台移动自动化与开发的 MCP(模型上下文协议)服务器,支持模拟器、仿真器及真实设备。
本项目是基于 Mobile Next 贡献者开发的 mobile-mcp 衍生而来的作品,采用 Apache License 2.0 许可。有关归属详情,请参见 NOTICE。
与上游项目的差异
此分支在原始 mobile-mcp 的基础上新增了 HarmonyOS 设备支持:
- HarmonyOS 设备发现、截图、元素树解析
- 通过 HDC 实现应用启动、终止、安装与卸载
- 支持自定义 scheme 的 URL 打开(例如
alipays://) - HarmonyOS 按键事件映射
- 多平台设备日志获取
前提条件
- Node.js >= 18
- 平台工具(至少需安装一种):
- HarmonyOS:HDC(华为设备连接器)
- iOS:Xcode 命令行工具
- Android:Android 平台工具
快速开始
# Clone the repo
git clone https://gitcode.com/openharmony-mcp/deveco-mobile-mcp.git
cd deveco-mobile-mcp
# Install dependencies
npm install
# Build
npm run build
# Run
node lib/index.js
平台支持
| 平台 | 支持情况 |
|---|---|
| HarmonyOS 真实设备 | ✅ |
| iOS 真实设备 | ✅ |
| iOS 模拟器 | ✅ |
| Android 真实设备 | ✅ |
| Android 模拟器 | ✅ |
MCP 工具
设备管理
mobile_list_available_devices— 列出所有可用设备mobile_get_screen_size— 获取屏幕像素尺寸mobile_get_orientation— 获取当前屏幕方向mobile_set_orientation— 更改屏幕方向
应用管理
mobile_list_apps— 列出已安装应用mobile_launch_app— 通过包名启动应用mobile_terminate_app— 终止运行中的应用mobile_install_app— 从文件安装应用mobile_uninstall_app— 卸载应用
屏幕交互
mobile_take_screenshot— 截取屏幕mobile_save_screenshot— 将截图保存到文件mobile_list_elements_on_screen— 列出带坐标的 UI 元素mobile_click_on_screen_at_coordinates— 点击 x,y 坐标位置mobile_double_tap_on_screen— 在坐标位置双击mobile_long_press_on_screen_at_coordinates— 在坐标位置长按mobile_swipe_on_screen— 向任意方向滑动
输入与导航
mobile_type_keys— 在焦点元素中输入文本mobile_press_button— 按下设备按键(HOME、BACK 等)mobile_open_url— 在设备浏览器中打开 URL
与 Claude Code 配合使用
claude mcp add deveco-mobile-mcp -- npx -y deveco-mobile-mcp
或者添加到您的 MCP 设置中:
{
"mcpServers": {
"deveco-mobile-mcp": {
"command": "node",
"args": ["/path/to/deveco-mobile-mcp/lib/index.js"]
}
}
}
上游项目
本项目从 mobile-mcp(Apache-2.0 协议)分叉而来。
有关原始文档、维基和路线图,请访问 上游仓库。
许可协议
Copyright 2025 deveco-mobile-mcp Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Introduction
An MCP (Model Context Protocol) server for mobile automation and development across **HarmonyOS**, **iOS**, and **Android** — supporting simulators, emulators, and real devices.
https://gitcode.com/openharmony-mcp/deveco-mobile-mcpCustomize your domain