mobile-mcp-ai 2.2.6__py3-none-any.whl → 2.5.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. mobile_mcp/config.py +3 -2
  2. mobile_mcp/core/basic_tools_lite.py +3193 -0
  3. mobile_mcp/core/ios_client_wda.py +569 -0
  4. mobile_mcp/core/ios_device_manager_wda.py +306 -0
  5. mobile_mcp/core/mobile_client.py +246 -20
  6. mobile_mcp/core/template_matcher.py +429 -0
  7. mobile_mcp/core/templates/close_buttons/auto_x_0112_151217.png +0 -0
  8. mobile_mcp/core/templates/close_buttons/auto_x_0112_152037.png +0 -0
  9. mobile_mcp/core/templates/close_buttons/auto_x_0112_152840.png +0 -0
  10. mobile_mcp/core/templates/close_buttons/auto_x_0112_153256.png +0 -0
  11. mobile_mcp/core/templates/close_buttons/auto_x_0112_154847.png +0 -0
  12. mobile_mcp/core/templates/close_buttons/gray_x_stock_ad.png +0 -0
  13. mobile_mcp/mcp_tools/__init__.py +10 -0
  14. mobile_mcp/mcp_tools/mcp_server.py +992 -0
  15. mobile_mcp_ai-2.5.3.dist-info/METADATA +456 -0
  16. mobile_mcp_ai-2.5.3.dist-info/RECORD +32 -0
  17. mobile_mcp_ai-2.5.3.dist-info/entry_points.txt +2 -0
  18. mobile_mcp/core/ai/__init__.py +0 -11
  19. mobile_mcp/core/ai/ai_analyzer.py +0 -197
  20. mobile_mcp/core/ai/ai_config.py +0 -116
  21. mobile_mcp/core/ai/ai_platform_adapter.py +0 -399
  22. mobile_mcp/core/ai/smart_test_executor.py +0 -520
  23. mobile_mcp/core/ai/test_generator.py +0 -365
  24. mobile_mcp/core/ai/test_generator_from_history.py +0 -391
  25. mobile_mcp/core/ai/test_generator_standalone.py +0 -293
  26. mobile_mcp/core/assertion/__init__.py +0 -9
  27. mobile_mcp/core/assertion/smart_assertion.py +0 -341
  28. mobile_mcp/core/basic_tools.py +0 -945
  29. mobile_mcp/core/h5/__init__.py +0 -10
  30. mobile_mcp/core/h5/h5_handler.py +0 -548
  31. mobile_mcp/core/ios_client.py +0 -219
  32. mobile_mcp/core/ios_device_manager.py +0 -252
  33. mobile_mcp/core/locator/__init__.py +0 -10
  34. mobile_mcp/core/locator/cursor_ai_auto_analyzer.py +0 -119
  35. mobile_mcp/core/locator/cursor_vision_helper.py +0 -414
  36. mobile_mcp/core/locator/mobile_smart_locator.py +0 -1747
  37. mobile_mcp/core/locator/position_analyzer.py +0 -813
  38. mobile_mcp/core/locator/script_updater.py +0 -157
  39. mobile_mcp/core/nl_test_runner.py +0 -585
  40. mobile_mcp/core/smart_app_launcher.py +0 -421
  41. mobile_mcp/core/smart_tools.py +0 -311
  42. mobile_mcp/mcp/__init__.py +0 -13
  43. mobile_mcp/mcp/mcp_server.py +0 -1126
  44. mobile_mcp/mcp/mcp_server_simple.py +0 -23
  45. mobile_mcp/vision/__init__.py +0 -10
  46. mobile_mcp/vision/vision_locator.py +0 -405
  47. mobile_mcp_ai-2.2.6.dist-info/METADATA +0 -503
  48. mobile_mcp_ai-2.2.6.dist-info/RECORD +0 -49
  49. mobile_mcp_ai-2.2.6.dist-info/entry_points.txt +0 -2
  50. {mobile_mcp_ai-2.2.6.dist-info → mobile_mcp_ai-2.5.3.dist-info}/WHEEL +0 -0
  51. {mobile_mcp_ai-2.2.6.dist-info → mobile_mcp_ai-2.5.3.dist-info}/licenses/LICENSE +0 -0
  52. {mobile_mcp_ai-2.2.6.dist-info → mobile_mcp_ai-2.5.3.dist-info}/top_level.txt +0 -0
@@ -1,503 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: mobile-mcp-ai
3
- Version: 2.2.6
4
- Summary: 移动端自动化 MCP Server - 支持 Android/iOS,AI 功能可选(基础工具不需要 AI)
5
- Home-page: https://github.com/test111ddff-hash/mobile-mcp-ai
6
- Author: douzi
7
- Author-email: 1492994674@qq.com
8
- Project-URL: Documentation, https://github.com/test111ddff-hash/mobile-mcp-ai
9
- Project-URL: Source, https://github.com/test111ddff-hash/mobile-mcp-ai
10
- Project-URL: Tracker, https://github.com/test111ddff-hash/mobile-mcp-ai/issues
11
- Keywords: mobile,automation,testing,android,ios,mcp,ai,pytest,cursor
12
- Classifier: Development Status :: 4 - Beta
13
- Classifier: Intended Audience :: Developers
14
- Classifier: License :: OSI Approved :: Apache Software License
15
- Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.8
17
- Classifier: Programming Language :: Python :: 3.9
18
- Classifier: Programming Language :: Python :: 3.10
19
- Classifier: Programming Language :: Python :: 3.11
20
- Classifier: Topic :: Software Development :: Testing
21
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
- Requires-Python: >=3.8
23
- Description-Content-Type: text/markdown
24
- License-File: LICENSE
25
- Requires-Dist: uiautomator2>=2.16.0
26
- Requires-Dist: adbutils>=1.2.0
27
- Requires-Dist: Pillow>=10.0.0
28
- Requires-Dist: mcp>=0.9.0
29
- Requires-Dist: python-dotenv>=1.0.0
30
- Provides-Extra: ai
31
- Requires-Dist: dashscope>=1.10.0; extra == "ai"
32
- Requires-Dist: openai>=1.0.0; extra == "ai"
33
- Requires-Dist: anthropic>=0.3.0; extra == "ai"
34
- Provides-Extra: test
35
- Requires-Dist: pytest>=8.0.0; extra == "test"
36
- Requires-Dist: pytest-asyncio>=0.21.0; extra == "test"
37
- Requires-Dist: allure-pytest>=2.13.0; extra == "test"
38
- Provides-Extra: dev
39
- Requires-Dist: pytest>=8.0.0; extra == "dev"
40
- Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
41
- Requires-Dist: twine>=4.0.0; extra == "dev"
42
- Requires-Dist: build>=0.10.0; extra == "dev"
43
- Provides-Extra: ios
44
- Requires-Dist: Appium-Python-Client>=3.0.0; extra == "ios"
45
- Provides-Extra: h5
46
- Requires-Dist: Appium-Python-Client>=3.0.0; extra == "h5"
47
- Requires-Dist: selenium>=4.0.0; extra == "h5"
48
- Provides-Extra: all
49
- Requires-Dist: dashscope>=1.10.0; extra == "all"
50
- Requires-Dist: openai>=1.0.0; extra == "all"
51
- Requires-Dist: anthropic>=0.3.0; extra == "all"
52
- Requires-Dist: Appium-Python-Client>=3.0.0; extra == "all"
53
- Requires-Dist: selenium>=4.0.0; extra == "all"
54
- Requires-Dist: pytest>=8.0.0; extra == "all"
55
- Requires-Dist: pytest-asyncio>=0.21.0; extra == "all"
56
- Requires-Dist: allure-pytest>=2.13.0; extra == "all"
57
- Dynamic: author
58
- Dynamic: author-email
59
- Dynamic: classifier
60
- Dynamic: description
61
- Dynamic: description-content-type
62
- Dynamic: home-page
63
- Dynamic: keywords
64
- Dynamic: license-file
65
- Dynamic: project-url
66
- Dynamic: provides-extra
67
- Dynamic: requires-dist
68
- Dynamic: requires-python
69
- Dynamic: summary
70
-
71
- # Mobile MCP AI
72
-
73
- 移动端自动化 MCP Server - 为 Cursor AI 提供移动设备控制能力,支持 Android/iOS
74
-
75
- <div align="center">
76
-
77
- [![PyPI version](https://img.shields.io/pypi/v/mobile-mcp-ai.svg)](https://pypi.org/project/mobile-mcp-ai/)
78
- [![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
79
- [![License](https://img.shields.io/badge/license-Apache%202.0-green.svg)](LICENSE)
80
- [![Gitee Stars](https://gitee.com/chang-xinping/mobile-automation-mcp-service/badge/star.svg?theme=white)](https://gitee.com/chang-xinping/mobile-automation-mcp-service)
81
-
82
- **⭐ 如果这个项目对你有帮助,请给个 Star 支持一下!⭐**
83
-
84
- </div>
85
-
86
- ---
87
-
88
- ## 🎬 演示视频
89
-
90
- ![演示动图](docs/videos/demo.gif)
91
-
92
- > 💡 **提示**:上图为压缩版 GIF(5.3MB),查看高清完整版请下载 [demo.mp4](docs/videos/demo.mp4)(23MB)
93
-
94
- ---
95
-
96
- ## 📞 联系方式
97
-
98
- <div align="center">
99
-
100
- <img src="docs/images/wechat-qr.jpg" alt="微信二维码" width="300"/>
101
-
102
- **有问题或需要帮助?欢迎添加微信交流(备注:mobile-mcp)**
103
-
104
- </div>
105
-
106
- ---
107
-
108
- ## ✨ 核心特性
109
-
110
- ### 🎯 AI 功能可选化
111
- - **基础模式**:不需要配置 AI 密钥,Cursor AI 提供所有智能能力
112
- - **智能模式**:可选配置 AI 密钥,适合构建自动化测试平台
113
- - **零成本起步**:基础工具完全免费,无需额外 AI API 费用
114
- - **灵活选择**:根据使用场景自由选择是否启用 AI 功能
115
-
116
- ### 📦 工具特性
117
- - **39个工具**:涵盖元素操作、设备管理、测试生成等
118
- - **操作录制**:自动记录操作,一键生成 pytest 测试脚本
119
- - **双平台支持**:Android 和 iOS 统一接口
120
- - **智能验证**:按键操作自动验证是否生效
121
-
122
- ### 🤖 与 Cursor AI 深度集成
123
- - **MCP 协议**:基于 Model Context Protocol,无缝集成
124
- - **39 个工具**:丰富的移动端操作工具(完整版)
125
- - **视觉识别**:Cursor AI 可以直接分析截图并操作
126
- - **测试生成**:AI 操作后一键生成 pytest 脚本
127
-
128
- ## 📦 安装
129
-
130
- ### 基础安装(推荐,Cursor 用户首选)
131
- ```bash
132
- # 只包含核心依赖,Cursor AI 提供所有智能能力
133
- pip install mobile-mcp-ai
134
- ```
135
-
136
- **✅ 适用场景:**
137
- - 在 Cursor 中使用(最常见)
138
- - 使用 32 个基础工具即可
139
- - 不需要额外的 AI API 密钥
140
-
141
- ### 完整安装(构建自动化平台)
142
- ```bash
143
- # 额外安装 AI SDK:通义千问、OpenAI、Claude
144
- pip install mobile-mcp-ai[ai]
145
- ```
146
-
147
- **✅ 适用场景:**
148
- - 构建独立的自动化测试平台
149
- - 在 CI/CD 中使用智能工具
150
- - 需要脱离 Cursor 独立运行
151
-
152
- > 💡 **区别说明**:基础版不包含 `dashscope`、`openai`、`anthropic` 等 AI SDK,在 Cursor 中使用时完全够用(Cursor AI 提供智能能力)。只有需要在独立环境中运行智能工具时,才需要完整安装。
153
-
154
- ### 升级到最新版本
155
-
156
- **⚠️ 重要:如果你已经安装了旧版本,强烈建议升级到 v2.1.0!**
157
-
158
- ```bash
159
- # 升级到最新版本
160
- pip install --upgrade mobile-mcp-ai
161
-
162
- # 验证版本
163
- pip show mobile-mcp-ai
164
- ```
165
-
166
- ## 🚀 快速开始
167
-
168
- ### 1. 配置 Cursor MCP
169
-
170
- 编辑 `~/.cursor/mcp.json`(macOS/Linux)或 `%APPDATA%\Cursor\mcp.json`(Windows):
171
-
172
- ```json
173
- {
174
- "mcpServers": {
175
- "mobile-automation": {
176
- "command": "python",
177
- "args": ["-m", "mobile_mcp.mcp.mcp_server"],
178
- "cwd": "/path/to/your/project"
179
- }
180
- }
181
- }
182
- ```
183
-
184
- > 💡 **模式切换**(可选):
185
- > - **默认完整版(39工具)**:包含测试脚本生成、操作历史、动态配置等 ⭐ **推荐**
186
- > - **简化版(32工具)**:添加 `"env": {"MOBILE_MCP_MODE": "simple"}`
187
- > - ⚠️ 简化版**不支持**测试脚本生成(`mobile_generate_test_script`)
188
- > - 适合只需要基础操作的场景
189
-
190
- > 📝 **配置说明**:
191
- > - `"cwd"`: 项目根目录,测试脚本会保存到此目录的 `tests/` 下
192
- > - AI功能:Cursor 会自动使用内置 AI,无需额外配置
193
- > - 其他 AI 平台:需要时参考 [配置指南](docs/USER_CONFIGURATION_GUIDE.md)
194
-
195
- ### 2. 连接设备
196
-
197
- ```bash
198
- # Android 设备
199
- adb devices # 确认设备可见
200
-
201
- # iOS 设备(可选)
202
- pip install mobile-mcp-ai[ios]
203
- ```
204
-
205
- ### 3. 重启 Cursor
206
-
207
- 配置完成后,**完全退出**并重新启动 Cursor。
208
-
209
- ### 4. 开始使用
210
-
211
- #### 方式1:基础工具(明确指定元素)
212
- ```
213
- @MCP 帮我测试登录:
214
- 1. 列出所有元素
215
- 2. 点击 resource-id 为 "com.app:id/login_btn"
216
- 3. 在 resource-id "com.app:id/username" 输入 "admin"
217
- 4. 截图保存
218
- ```
219
-
220
- #### 方式2:让 Cursor AI 分析截图(推荐)
221
- ```
222
- @MCP 帮我测试登录:
223
- 1. 先截图看看当前页面
224
- 2. 分析后点击"登录"按钮
225
- 3. 在"用户名"输入框输入 "admin"
226
- 4. 截图确认
227
- ```
228
-
229
- Cursor AI 会自动截图、分析图片、找到元素坐标并操作!
230
-
231
- ## 💡 使用示例
232
-
233
- ### 场景1:基础工具测试(明确元素)
234
- ```
235
- @MCP 执行以下操作:
236
- 1. 启动应用 com.example.app
237
- 2. 列出所有可点击元素
238
- 3. 点击 resource-id "com.example:id/login_btn"
239
- 4. 等待元素 "com.example:id/home" 出现
240
- 5. 截图保存
241
- ```
242
-
243
- ### 场景2:Cursor AI 视觉分析(智能推荐)
244
- ```
245
- @MCP 帮我测试登录功能:
246
- 1. 截图看看当前页面
247
- 2. 找到并点击"登录"按钮
248
- 3. 再截图,找到"用户名"输入框并输入 "test123"
249
- 4. 找到"密码"输入框并输入 "pass123"
250
- 5. 点击"确定"按钮
251
- 6. 截图确认结果
252
- ```
253
-
254
- ### 场景3:智能工具(需要配置 AI)
255
- ```
256
- @MCP 检查 AI 功能状态
257
- @MCP 用智能方式点击"登录"按钮
258
- @MCP 在"用户名"输入框输入 "test123"
259
- ```
260
-
261
- ### 场景4:生成测试脚本(推荐)✨ 新增
262
- ```
263
- @MCP 帮我测试登录功能:
264
- 1. 启动应用 com.example.app
265
- 2. 截图,找到"登录"按钮并点击
266
- 3. 在"用户名"输入 "test123"
267
- 4. 在"密码"输入 "pass123"
268
- 5. 点击"提交"按钮
269
-
270
- @MCP 生成刚才操作的测试脚本
271
- ```
272
-
273
- AI 会自动生成一个完整的 pytest 测试脚本:
274
- - ✅ 保存到你的项目 `tests/` 目录
275
- - ✅ 包含智能等待逻辑(页面加载、跳转、输入)
276
- - ✅ 自动处理弹窗(存在则点击,不存在跳过)
277
- - ✅ 支持多设备(自动检测设备ID)
278
- - ✅ 独立运行(只需要 `pip install uiautomator2 pytest`)
279
-
280
- 生成的脚本示例:
281
- ```python
282
- def test_登录(device):
283
- d = device
284
-
285
- # 步骤1: 点击"登录"
286
- d.click(540, 338)
287
- time.sleep(2.0) # 智能等待页面跳转
288
-
289
- # 步骤2: 输入用户名
290
- d(resourceId="com.example:id/username").set_text("test123")
291
- time.sleep(1.5)
292
-
293
- # 步骤3: 点击提交
294
- d.click(972, 1200)
295
- time.sleep(2.0)
296
-
297
- assert d(text="首页").exists()
298
- ```
299
-
300
- ## 🛠️ 工具列表概览
301
-
302
- ### 📊 工具分类统计
303
-
304
- | 分类 | 完整版 | 简化版 | 说明 |
305
- |------|--------|--------|------|
306
- | 基础工具 | 10 | 9 | 元素操作、截图等,不需要 AI |
307
- | 设备管理 | 6 | 6 | 设备列表、屏幕尺寸、方向、连接管理 |
308
- | 应用管理 | 5 | 5 | 安装、卸载、启动、终止应用 |
309
- | 高级交互 | 4 | 4 | 双击、长按、URL打开、断言 |
310
- | 智能工具 | 6 | 4 | 智能定位、测试执行、脚本生成 |
311
- | 操作历史 | 2 | 0 | 查看和清空操作历史记录 |
312
- | 通用工具 | 4 | 4 | 快照、启动、按键、滑动 |
313
- | 动态配置 | 2 | 0 | 运行时配置调整 |
314
- | **总计** | **39** | **32** | |
315
-
316
- ### 🔥 常用工具速览
317
-
318
- #### 基础操作(不需要 AI)
319
- - `mobile_list_elements` - 列出所有可交互元素
320
- - `mobile_click_by_id` / `mobile_click_by_text` - 精确点击
321
- - `mobile_input_text_by_id` - 输入文本
322
- - `mobile_take_screenshot` - 截图(供 Cursor AI 分析)
323
- - `mobile_wait` - 等待指定时间或元素 ⭐ 完整版独有
324
- - `mobile_wait_for_element` - 等待元素出现
325
-
326
- #### 智能操作(需要 AI,可选)
327
- - `mobile_smart_click` - 自然语言智能点击
328
- - `mobile_smart_input` - 自然语言智能输入
329
- - `mobile_analyze_screenshot` - AI 视觉分析
330
- - `mobile_execute_test_case` - 智能执行测试 ⭐ 完整版独有
331
- - `mobile_generate_test_script` - 生成 pytest 脚本 ⭐ 完整版独有
332
-
333
- #### 设备与应用管理
334
- - `mobile_list_devices` - 列出连接的设备
335
- - `mobile_launch_app` - 启动应用
336
- - `mobile_list_apps` - 列出已安装应用
337
- - `mobile_get_screen_size` - 获取屏幕尺寸
338
-
339
- #### 动态配置 ⭐ 完整版独有
340
- - `mobile_configure` - 调整等待时间、验证策略等
341
- - `mobile_get_config` - 查看当前配置
342
-
343
- > 📋 **新增工具**:设备连接管理(check_connection, reconnect_device)、操作历史管理(get_operation_history, clear_operation_history)
344
-
345
- ## 🎯 智能验证功能详解
346
-
347
- ### `mobile_press_key` - 彻底解决"假成功"问题
348
-
349
- **问题背景:**
350
-
351
- 传统按键操作只检查命令是否执行,不验证按键是否真的生效,导致:
352
- - ✗ 命令执行成功 ≠ 按键生效
353
- - ✗ 测试显示通过,实际操作失败
354
- - ✗ 搜索键在某些应用/输入法中不起作用
355
-
356
- **智能验证方案:**
357
-
358
- ```python
359
- # 方式1: 验证模式(推荐,默认)
360
- await press_key("search", verify=True)
361
- # ✅ 自动检测页面变化
362
- # ✅ 搜索键无效时自动尝试回车键
363
- # ✅ 返回真实操作结果
364
-
365
- # 方式2: 快速模式
366
- await press_key("back", verify=False)
367
- # ⚡ 执行后立即返回
368
- # ⚠️ 不保证按键效果
369
- ```
370
-
371
- **工作原理:**
372
-
373
- 1. **操作前快照** - 记录当前页面状态
374
- 2. **执行按键** - 发送按键命令
375
- 3. **页面监测** - 等待并检测页面变化(最多2秒)
376
- 4. **智能判断** - 页面变化 > 5% 认为成功
377
- 5. **搜索键回退** - SEARCH 无效时自动尝试 ENTER
378
-
379
- **使用示例:**
380
-
381
- ```
382
- @MCP 帮我搜索:
383
- 1. 在搜索框输入 "测试内容"
384
- 2. 按搜索键(自动验证)
385
- ```
386
-
387
- 返回结果:
388
- ```json
389
- {
390
- "success": true,
391
- "key": "search",
392
- "keycode": 84,
393
- "verified": true,
394
- "page_changed": true,
395
- "fallback_used": false,
396
- "message": "搜索键(SEARCH)生效"
397
- }
398
- ```
399
-
400
- 如果 SEARCH 键无效:
401
- ```json
402
- {
403
- "success": true,
404
- "key": "search",
405
- "keycode": 66,
406
- "verified": true,
407
- "page_changed": true,
408
- "fallback_used": true,
409
- "message": "搜索键(SEARCH)无效,已使用ENTER键替代并成功"
410
- }
411
- ```
412
-
413
- 如果按键无效:
414
- ```json
415
- {
416
- "success": false,
417
- "key": "search",
418
- "verified": true,
419
- "page_changed": false,
420
- "message": "按键命令执行成功但页面未变化,可能按键未生效"
421
- }
422
- ```
423
-
424
- **使用建议:**
425
-
426
- | 场景 | 模式 | 原因 |
427
- |------|------|------|
428
- | 搜索、提交等关键操作 | `verify=True` | 确保操作真的成功 |
429
- | 返回上一页 | `verify=True` | 确保页面跳转 |
430
- | 连续快速导航 | `verify=False` | 提高执行速度 |
431
- | 调试/测试 | `verify=True` | 发现潜在问题 |
432
-
433
- **性能对比:**
434
-
435
- - 快速模式:~0.05秒(不保证效果)
436
- - 验证模式:~0.5-2秒(确保成功)
437
- - 额外耗时:小于2秒,换来可靠性
438
-
439
- **支持的按键:**
440
-
441
- - `enter` / `回车` - Enter键 (keycode=66)
442
- - `search` / `搜索` - 搜索键 (keycode=84, 自动回退到66)
443
- - `back` / `返回` - 返回键 (keycode=4)
444
- - `home` - Home键 (keycode=3)
445
- - 直接使用keycode数字(如 `66`)
446
-
447
- **演示脚本:**
448
-
449
- 运行 `python backend/mobile_mcp/examples/press_key_verification_demo.py` 查看完整演示
450
-
451
- ## 📚 文档
452
-
453
- - [用户配置指南](docs/USER_CONFIGURATION_GUIDE.md) - AI 密钥配置、常见问题
454
- - [启动指南](docs/START_GUIDE.md) - 完整的安装和配置步骤
455
- - [测试脚本生成](docs/如何生成测试脚本.md) - 如何生成 pytest 测试脚本
456
- - [自动化行为配置说明](docs/自动化行为配置说明.md) - 控制屏幕方向和自动关闭广告
457
-
458
- ## 🆕 更新日志
459
-
460
- ### v2.2.6 (最新)
461
- - ✅ 修复截图目录路径问题(修复路径计算错误)
462
- - ✅ 修复 MCP 包导入冲突(延迟导入,避免与系统包冲突)
463
- - ✅ 改进目录创建逻辑(使用 parents=True 确保父目录创建)
464
-
465
- ### v2.2.5
466
- - ✅ 合并双服务端为统一架构,通过环境变量控制模式
467
- - ✅ 新增设备连接管理(check_connection, reconnect_device)
468
- - ✅ 新增操作历史管理(get_operation_history, clear_operation_history)
469
- - ✅ 统一返回值格式为标准 JSON
470
- - ✅ 修复逻辑错误(device_info字段、重复切片等)
471
-
472
- 完整日志请查看 [CHANGELOG.md](CHANGELOG.md)
473
-
474
- ## 📊 技术栈
475
-
476
- - **MCP 协议**:与 Cursor AI 无缝集成
477
- - **UIAutomator2**:Android 自动化引擎
478
- - **Appium**:iOS 自动化支持(可选)
479
- - **多 AI 支持**:通义千问、OpenAI、Claude(可选)
480
-
481
- ## 🤝 贡献
482
-
483
- 欢迎提交 Issue 和 Pull Request!
484
-
485
- 有问题或建议?欢迎在 Issues 中反馈。
486
-
487
- ## 📄 License
488
-
489
- Apache License 2.0
490
-
491
- ---
492
-
493
- <div align="center">
494
-
495
- **⭐ 如果这个项目对你有帮助,请给个 Star 支持一下!⭐**
496
-
497
- [![Gitee Stars](https://gitee.com/chang-xinping/mobile-automation-mcp-service/badge/star.svg?theme=dark)](https://gitee.com/chang-xinping/mobile-automation-mcp-service/stargazers)
498
-
499
- [Gitee 仓库](https://gitee.com/chang-xinping/mobile-automation-mcp-service) | [GitHub 仓库](https://github.com/test111ddff-hash/mobile-mcp-ai) | [PyPI 发布](https://pypi.org/project/mobile-mcp-ai/)
500
-
501
- **让移动端测试更简单!** 🚀
502
-
503
- </div>
@@ -1,49 +0,0 @@
1
- mobile_mcp/__init__.py,sha256=sQJZTL_sxQFzmcS7jOtS2AHCfUySz40vhX96N6u1qy4,816
2
- mobile_mcp/config.py,sha256=7l5I_E2d_3utKYmGgEIuLCH3WXzNzbF_HI_MqODpNqs,4360
3
- mobile_mcp/core/__init__.py,sha256=ndMy-cLAIsQDG5op7gM_AIplycqZSZPWEkec1pEhvEY,170
4
- mobile_mcp/core/basic_tools.py,sha256=77ZDDyFjbTK1WlZmcg0TvSQFjEDZQR1_mHaBGrvZp6M,32061
5
- mobile_mcp/core/device_manager.py,sha256=PX3-B5bJFnKNt6C8fT7FSY8JwD-ngZ3toF88bcOV9qA,8766
6
- mobile_mcp/core/dynamic_config.py,sha256=Ja1n1pfb0HspGByqk2_A472mYVniKmGtNEWyjUjmgK8,9811
7
- mobile_mcp/core/ios_client.py,sha256=DCPmB7IfPAmE7-WqUrI3m3cvYSHnEj4EKdFlJgMg9Ws,6999
8
- mobile_mcp/core/ios_device_manager.py,sha256=3fZUrUs0nXbeSMqWsn3qzJt_mlos6-xNzpgCqEBRHpc,8628
9
- mobile_mcp/core/mobile_client.py,sha256=WLi1tsqkTGTBOG5KGfw-vCZssXYVKXdY1HjHo2M7IMQ,52803
10
- mobile_mcp/core/nl_test_runner.py,sha256=OTTKelRc3EqKnh6KRHzw_mwSNVDGUTF2vc7W5icuaa4,23039
11
- mobile_mcp/core/smart_app_launcher.py,sha256=jk_tgk5KrXAFnoAjnb4H50FWWAUBl7cH6PS_M5JgiuQ,16927
12
- mobile_mcp/core/smart_tools.py,sha256=rnbcCV3jpJUniNwbUf8RWAlDT9wUAsn52rNSCdhkJ6Y,11861
13
- mobile_mcp/core/ai/__init__.py,sha256=aZDI74p0ytVwVy0EWSL4Ajt9dPMe0ZuYoQfqjzzxoYw,162
14
- mobile_mcp/core/ai/ai_analyzer.py,sha256=BbuE44Cdk-CV0XJUqgYDDcc0R0zJgpt6f-epKiPQlmo,7293
15
- mobile_mcp/core/ai/ai_config.py,sha256=QDw1D10n1gk5ZAqNuD3lFBHbkF5RR8KFr1ORIzlrkKY,3457
16
- mobile_mcp/core/ai/ai_platform_adapter.py,sha256=eKqrd7oolO2c_Ij_t3eWrVe7D00uew8WcOHbzngTH1c,13513
17
- mobile_mcp/core/ai/smart_test_executor.py,sha256=N4G5jN7nyKRtct6bA4dBa4TJfe5tKFyQFaibQsefQa0,19318
18
- mobile_mcp/core/ai/test_generator.py,sha256=JhvAV-NsviD3Z6JtcWXLPDRi8Ji0IRiuU-L0B2mo5mc,18091
19
- mobile_mcp/core/ai/test_generator_from_history.py,sha256=pi3qGM9dcjSiUfZ2OYloIASSTngHfywTBUBTsm8Roas,19687
20
- mobile_mcp/core/ai/test_generator_standalone.py,sha256=Lbu6WaqxBMvmYyBkndilT6DuaJIDNvM_3aPTYETIhdI,10287
21
- mobile_mcp/core/assertion/__init__.py,sha256=qgqhSOtGvcFpLajWOhftk8VPg6GuosiWdrMjtSLbyrw,143
22
- mobile_mcp/core/assertion/smart_assertion.py,sha256=jddTZIfqw84mBqgOugL_jPGIEkpWvpmbpIciHCpQWc0,11945
23
- mobile_mcp/core/h5/__init__.py,sha256=hJ4_s10BXzmy-nrffxm_ZeHfncR7dgcYWv7Y_uS9Yoc,171
24
- mobile_mcp/core/h5/h5_handler.py,sha256=rFSpA6FXpo-UeM9aa2P3lt-Gxcc2Q9Gm06Kdlwj0IOw,20432
25
- mobile_mcp/core/locator/__init__.py,sha256=vINnuy4K0LTQEpr45E7EWCi6GFOCLHVzFtru-ofLw9I,129
26
- mobile_mcp/core/locator/cursor_ai_auto_analyzer.py,sha256=WxC4D4YYE5q9jAoMTh0bxx-0tO-ASdweOPb6VFovHIc,3999
27
- mobile_mcp/core/locator/cursor_vision_helper.py,sha256=wuJtLcJyPn0MJpv5KF6Ty4LbTVG6CYpfgF8Hf7Assck,16070
28
- mobile_mcp/core/locator/mobile_smart_locator.py,sha256=5463ay6ujhbbfabxMuLhXfZDKmQbV_5I1KOf8VrkBa4,92419
29
- mobile_mcp/core/locator/position_analyzer.py,sha256=-ujqJB274wLpitbZaHa5kXfkxnlXw9riDAzFGcjOsXo,31292
30
- mobile_mcp/core/locator/script_updater.py,sha256=DOkhMwcdwamJuc7lkKt0YOwyATusN7RGrhaMherUHlo,5484
31
- mobile_mcp/core/utils/__init__.py,sha256=RhMMsPszmEn8Q8GoNufypVSHJxyM9lio9U6jjpnuoPI,378
32
- mobile_mcp/core/utils/logger.py,sha256=XXQAHUwT1jc70pq_tYFmL6f_nKrFlYm3hcgl-5RYRg0,3402
33
- mobile_mcp/core/utils/operation_history_manager.py,sha256=gi8S8HJAMqvkUrY7_-kVbko3Xt7c4GAUziEujRd-N-Y,4792
34
- mobile_mcp/core/utils/smart_wait.py,sha256=PvKXImfN9Irru3bQJUjf4FLGn8LjY2VLzUNEl-i7xLE,8601
35
- mobile_mcp/mcp/__init__.py,sha256=c6g0aLZ7qU8kckIhfrS06QxgqlFxyLqNYnB_AqzBXko,328
36
- mobile_mcp/mcp/mcp_server.py,sha256=QY_wjZnOf6efdXH6mZi6Fdj91K3ylpXZI12_9Oh-ZfU,51965
37
- mobile_mcp/mcp/mcp_server_simple.py,sha256=Xgsz7iu8Z8Dy9STCaBMDMMWN75UkZANFq6Gpb3rj7Ag,594
38
- mobile_mcp/utils/__init__.py,sha256=8EH0i7UGtx1y_j_GEgdN-cZdWn2sRtZSEOLlNF9HRnY,158
39
- mobile_mcp/utils/logger.py,sha256=Sqq2Nr0Y4p03erqcrbYKVPCGiFaNGHMcE_JwCkeOfU4,3626
40
- mobile_mcp/utils/xml_formatter.py,sha256=uwTRb3vLbqhT8O-udzWT7s7LsV-DyDUz2DkofD3hXOE,4556
41
- mobile_mcp/utils/xml_parser.py,sha256=QhL8CWbdmNDzmBLjtx6mEnjHgMFZzJeHpCL15qfXSpI,3926
42
- mobile_mcp/vision/__init__.py,sha256=S_fu_WGTFefnw2Gyxr1DhAW0P9Jo3yZT7HgOs_mx1Iw,128
43
- mobile_mcp/vision/vision_locator.py,sha256=-ZdAiNF000oW6cVzH56R15OTYRI5OT_noA_XShlsn8M,14964
44
- mobile_mcp_ai-2.2.6.dist-info/licenses/LICENSE,sha256=HrhfyXIkWY2tGFK11kg7vPCqhgh5DcxleloqdhrpyMY,11558
45
- mobile_mcp_ai-2.2.6.dist-info/METADATA,sha256=fKmC-6Yce9MDIujTJjAbPauGLljcT8WxVNv8NzMEeOY,15950
46
- mobile_mcp_ai-2.2.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
47
- mobile_mcp_ai-2.2.6.dist-info/entry_points.txt,sha256=xGgGmMIRfLyYyuzlh8p6yy__n0VnCa0HZazY3wfEDMM,69
48
- mobile_mcp_ai-2.2.6.dist-info/top_level.txt,sha256=lLm6YpbTv855Lbh8BIA0rPxhybIrvYUzMEk9OErHT94,11
49
- mobile_mcp_ai-2.2.6.dist-info/RECORD,,
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- mobile-mcp = mobile_mcp.mcp.mcp_server_simple:main