minitap-mcp 0.4.1__py3-none-any.whl → 0.4.2__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.
minitap/mcp/main.py CHANGED
@@ -48,6 +48,13 @@ def main() -> None:
48
48
  action="store_true",
49
49
  help="Run as network server (uses MCP_SERVER_HOST and MCP_SERVER_PORT from env)",
50
50
  )
51
+ parser.add_argument(
52
+ "--port",
53
+ type=int,
54
+ required=False,
55
+ default=None,
56
+ help="Port to run the server on (overrides MCP_SERVER_PORT env variable)",
57
+ )
51
58
 
52
59
  args = parser.parse_args()
53
60
 
@@ -61,6 +68,11 @@ def main() -> None:
61
68
  settings.__init__()
62
69
  sdk_settings.__init__()
63
70
 
71
+ if args.port:
72
+ os.environ["MCP_SERVER_PORT"] = str(args.port)
73
+ settings.__init__()
74
+ sdk_settings.__init__()
75
+
64
76
  if not settings.MINITAP_API_KEY:
65
77
  raise ValueError("Minitap API key is required to run the MCP")
66
78
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: minitap-mcp
3
- Version: 0.4.1
3
+ Version: 0.4.2
4
4
  Summary: Model Context Protocol server for controlling Android & iOS devices with natural language
5
5
  Author: Pierre-Louis Favreau, Jean-Pierre Lo, Clément Guiguet
6
6
  Requires-Dist: fastmcp>=2.12.4
@@ -11,16 +11,15 @@ minitap/mcp/core/logging_config.py,sha256=OJlArPJxflbhckerFsRHVTzy3jwsLsNSPN0LVp
11
11
  minitap/mcp/core/models.py,sha256=egLScxPAMo4u5cqY33UKba7z7DsdgqfPW409UAqW1Jg,1942
12
12
  minitap/mcp/core/sdk_agent.py,sha256=-9l1YetD93dzxOeSFOT_j8dDfDFjhJLiir8bhzEjI3Y,900
13
13
  minitap/mcp/core/utils.py,sha256=3uExpRoh7affIieZx3TLlZTmZCcoxWfx1YpPbwhjiJY,1791
14
- minitap/mcp/main.py,sha256=VBjwrZUoCGlddJaJM-17j180YXvnUPnd5IgR_ckheZs,4481
14
+ minitap/mcp/main.py,sha256=RsFAU32Rgrt66OiOtO74k7HSeTWRqnw31IurbnsOI3I,4811
15
15
  minitap/mcp/server/middleware.py,sha256=fbry_IiHmwUxVjsWgOU2goybcS1kLRXFZZ89KPH1d8E,880
16
16
  minitap/mcp/server/poller.py,sha256=Qakq4yO3EJ9dXmRqtE3sJjyk0ij7VBU-NuupHhTf37g,2539
17
17
  minitap/mcp/tools/analyze_screen.py,sha256=fjcjf3tTZDlxzmiQFHFNgw38bxPz4eisw57zuxshN2A,1984
18
18
  minitap/mcp/tools/compare_screenshot_with_figma.py,sha256=G69F6vRFI2tE2wW-oFYPjnY8oFMD9nRZH0H-yvtD4gE,4575
19
19
  minitap/mcp/tools/execute_mobile_command.py,sha256=qY3UfcDq1BtYcny1YlEF4WV9LwUJxLAmLJCm1VBzxS8,2442
20
- minitap/mcp/tools/go_back.py,sha256=lEmADkDkXu8JGm-sY7zL7M6GlBy-lD7Iffv4yzwoQfo,1301
21
20
  minitap/mcp/tools/save_figma_assets.py,sha256=T5a_7wi1aLoyCrn4FWwXEE_m8dXqUu2ZFGDKst_sKHI,9985
22
21
  minitap/mcp/tools/screen_analyzer.md,sha256=TTO80JQWusbA9cKAZn-9cqhgVHm6F_qJh5w152hG3YM,734
23
- minitap_mcp-0.4.1.dist-info/WHEEL,sha256=5w2T7AS2mz1-rW9CNagNYWRCaB0iQqBMYLwKdlgiR4Q,78
24
- minitap_mcp-0.4.1.dist-info/entry_points.txt,sha256=rYVoXm7tSQCqQTtHx4Lovgn1YsjwtEEHfddKrfEVHuY,55
25
- minitap_mcp-0.4.1.dist-info/METADATA,sha256=dmXqGtUSR1-KPIXxT-DLHyMWrHp5mzMzP40Bo-BmmDU,5918
26
- minitap_mcp-0.4.1.dist-info/RECORD,,
22
+ minitap_mcp-0.4.2.dist-info/WHEEL,sha256=5w2T7AS2mz1-rW9CNagNYWRCaB0iQqBMYLwKdlgiR4Q,78
23
+ minitap_mcp-0.4.2.dist-info/entry_points.txt,sha256=rYVoXm7tSQCqQTtHx4Lovgn1YsjwtEEHfddKrfEVHuY,55
24
+ minitap_mcp-0.4.2.dist-info/METADATA,sha256=eVB509gMxBsCE-RrIMoj2yNEo7FbADTejwKEcsB6GO0,5918
25
+ minitap_mcp-0.4.2.dist-info/RECORD,,
@@ -1,42 +0,0 @@
1
- import requests
2
-
3
- from minitap.mcp.core.decorators import handle_tool_errors
4
- from minitap.mcp.main import mcp
5
-
6
-
7
- @mcp.tool(
8
- name="go_back",
9
- tags={"requires-maestro"},
10
- description="""
11
- Sends a 'back' command to the mobile device automation server.
12
- """,
13
- )
14
- @handle_tool_errors
15
- async def go_back() -> str:
16
- """Send a back command to the mobile device."""
17
- try:
18
- response = requests.post(
19
- "http://localhost:9999/api/run-command",
20
- headers={
21
- "User-Agent": "python-requests/2.32.4",
22
- "Accept-Encoding": "gzip, deflate, zstd",
23
- "Accept": "*/*",
24
- "Connection": "keep-alive",
25
- "Content-Type": "application/json",
26
- },
27
- json={"yaml": "back\n"},
28
- timeout=30,
29
- )
30
-
31
- if response.status_code == 200:
32
- return f"Successfully sent back command. Response: {response.text}"
33
- else:
34
- return (
35
- f"Failed to send back command. "
36
- f"Status code: {response.status_code}, Response: {response.text}"
37
- )
38
-
39
- except requests.exceptions.RequestException as e:
40
- return f"Error sending back command: {str(e)}"
41
- except Exception as e:
42
- return f"Unexpected error: {str(e)}"