mobile-mcp-ai 2.5.2__tar.gz → 2.5.3__tar.gz
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.
- {mobile_mcp_ai-2.5.2/mobile_mcp_ai.egg-info → mobile_mcp_ai-2.5.3}/PKG-INFO +1 -1
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/mcp_tools/mcp_server.py +18 -2
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3/mobile_mcp_ai.egg-info}/PKG-INFO +1 -1
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/setup.py +1 -1
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/LICENSE +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/MANIFEST.in +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/README.md +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/__init__.py +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/config.py +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/core/__init__.py +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/core/basic_tools_lite.py +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/core/device_manager.py +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/core/dynamic_config.py +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/core/ios_client_wda.py +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/core/ios_device_manager_wda.py +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/core/mobile_client.py +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/core/template_matcher.py +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/core/templates/close_buttons/auto_x_0112_151217.png +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/core/templates/close_buttons/auto_x_0112_152037.png +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/core/templates/close_buttons/auto_x_0112_152840.png +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/core/templates/close_buttons/auto_x_0112_153256.png +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/core/templates/close_buttons/auto_x_0112_154847.png +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/core/templates/close_buttons/gray_x_stock_ad.png +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/core/utils/__init__.py +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/core/utils/logger.py +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/core/utils/operation_history_manager.py +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/core/utils/smart_wait.py +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/docs/iOS_SETUP_GUIDE.md +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/mcp_tools/__init__.py +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/mobile_mcp_ai.egg-info/SOURCES.txt +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/mobile_mcp_ai.egg-info/dependency_links.txt +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/mobile_mcp_ai.egg-info/entry_points.txt +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/mobile_mcp_ai.egg-info/not-zip-safe +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/mobile_mcp_ai.egg-info/requires.txt +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/mobile_mcp_ai.egg-info/top_level.txt +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/requirements.txt +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/setup.cfg +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/templates/close_buttons/auto_x_0112_151217.png +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/templates/close_buttons/auto_x_0112_152037.png +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/templates/close_buttons/auto_x_0112_152840.png +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/templates/close_buttons/auto_x_0112_153256.png +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/templates/close_buttons/auto_x_0112_154847.png +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/templates/close_buttons/gray_x_stock_ad.png +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/tests/test_mind_cloud_my_space.py +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/tests/test_mind_correct.py +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/tests/test_mind_improved.py +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/tests/test_mind_optimized.py +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/tests/test_open_mind.py +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/tests/test_priority_demo.py +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/tests/test_simple.py +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/tests/test_/344/270/276/346/212/245.py" +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/tests/test_/345/210/207/346/215/242/350/257/255/350/250/200/345/210/260English.py" +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/tests/test_/346/265/213/350/257/225.py" +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/utils/__init__.py +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/utils/logger.py +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/utils/xml_formatter.py +0 -0
- {mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/utils/xml_parser.py +0 -0
|
@@ -89,6 +89,7 @@ class MobileMCPServer:
|
|
|
89
89
|
self.client = None
|
|
90
90
|
self.tools = None
|
|
91
91
|
self._initialized = False
|
|
92
|
+
self._last_error = None # 保存最后一次连接失败的错误
|
|
92
93
|
|
|
93
94
|
@staticmethod
|
|
94
95
|
def format_response(result) -> str:
|
|
@@ -114,9 +115,11 @@ class MobileMCPServer:
|
|
|
114
115
|
self._initialized = True # 只在成功时标记
|
|
115
116
|
print(f"📱 已连接到 {platform.upper()} 设备", file=sys.stderr)
|
|
116
117
|
except Exception as e:
|
|
117
|
-
|
|
118
|
+
error_msg = str(e)
|
|
119
|
+
print(f"⚠️ 设备连接失败: {error_msg},下次调用时将重试", file=sys.stderr)
|
|
118
120
|
self.client = None
|
|
119
121
|
self.tools = None
|
|
122
|
+
self._last_error = error_msg # 保存错误信息
|
|
120
123
|
# 不设置 _initialized = True,下次调用会重试
|
|
121
124
|
|
|
122
125
|
def _detect_platform(self) -> str:
|
|
@@ -722,7 +725,20 @@ class MobileMCPServer:
|
|
|
722
725
|
await self.initialize()
|
|
723
726
|
|
|
724
727
|
if not self.tools:
|
|
725
|
-
|
|
728
|
+
# 提供详细的错误信息和解决方案
|
|
729
|
+
error_detail = self._last_error or "未知错误"
|
|
730
|
+
help_msg = (
|
|
731
|
+
f"❌ 设备连接失败\n\n"
|
|
732
|
+
f"错误详情: {error_detail}\n\n"
|
|
733
|
+
f"🔧 解决方案:\n"
|
|
734
|
+
f"1. 检查 USB 连接: adb devices\n"
|
|
735
|
+
f"2. 重启 adb: adb kill-server && adb start-server\n"
|
|
736
|
+
f"3. 初始化 uiautomator2: python -m uiautomator2 init\n"
|
|
737
|
+
f"4. 手机上允许 USB 调试授权\n"
|
|
738
|
+
f"5. 确保手机已解锁\n\n"
|
|
739
|
+
f"完成后请重试操作。"
|
|
740
|
+
)
|
|
741
|
+
return [TextContent(type="text", text=help_msg)]
|
|
726
742
|
|
|
727
743
|
try:
|
|
728
744
|
# 截图
|
|
@@ -25,7 +25,7 @@ if requirements_file.exists():
|
|
|
25
25
|
|
|
26
26
|
setup(
|
|
27
27
|
name="mobile-mcp-ai",
|
|
28
|
-
version="2.5.
|
|
28
|
+
version="2.5.3", # 修复:设备连接失败时显示详细错误和解决方案
|
|
29
29
|
author="douzi",
|
|
30
30
|
author_email="1492994674@qq.com",
|
|
31
31
|
description="移动端自动化 MCP Server - 支持 Android/iOS,AI 功能可选(基础工具不需要 AI)",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/core/templates/close_buttons/auto_x_0112_151217.png
RENAMED
|
File without changes
|
{mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/core/templates/close_buttons/auto_x_0112_152037.png
RENAMED
|
File without changes
|
{mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/core/templates/close_buttons/auto_x_0112_152840.png
RENAMED
|
File without changes
|
{mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/core/templates/close_buttons/auto_x_0112_153256.png
RENAMED
|
File without changes
|
{mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/core/templates/close_buttons/auto_x_0112_154847.png
RENAMED
|
File without changes
|
{mobile_mcp_ai-2.5.2 → mobile_mcp_ai-2.5.3}/core/templates/close_buttons/gray_x_stock_ad.png
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|