minitap-mcp 0.4.1__py3-none-any.whl → 0.4.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.
- minitap/mcp/main.py +12 -0
- {minitap_mcp-0.4.1.dist-info → minitap_mcp-0.4.3.dist-info}/METADATA +112 -24
- {minitap_mcp-0.4.1.dist-info → minitap_mcp-0.4.3.dist-info}/RECORD +5 -6
- minitap/mcp/tools/go_back.py +0 -42
- {minitap_mcp-0.4.1.dist-info → minitap_mcp-0.4.3.dist-info}/WHEEL +0 -0
- {minitap_mcp-0.4.1.dist-info → minitap_mcp-0.4.3.dist-info}/entry_points.txt +0 -0
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.
|
|
3
|
+
Version: 0.4.3
|
|
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
|
|
@@ -84,11 +84,18 @@ minitap-mcp --server
|
|
|
84
84
|
|
|
85
85
|
CLI flags always override environment variables when both are present.
|
|
86
86
|
|
|
87
|
-
By default, the server will bind to `0.0.0.0:8000`.
|
|
87
|
+
By default, the server will bind to `0.0.0.0:8000`. You can customize the port:
|
|
88
88
|
|
|
89
89
|
```bash
|
|
90
|
+
# Using CLI argument
|
|
91
|
+
minitap-mcp --server --port 9000
|
|
92
|
+
|
|
93
|
+
# Or using environment variable
|
|
94
|
+
export MCP_SERVER_PORT="9000"
|
|
95
|
+
minitap-mcp --server
|
|
96
|
+
|
|
97
|
+
# You can also customize the host
|
|
90
98
|
export MCP_SERVER_HOST="0.0.0.0"
|
|
91
|
-
export MCP_SERVER_PORT="8000"
|
|
92
99
|
```
|
|
93
100
|
|
|
94
101
|
## IDE Integration
|
|
@@ -120,41 +127,122 @@ export MCP_SERVER_PORT="8000"
|
|
|
120
127
|
```
|
|
121
128
|
|
|
122
129
|
|
|
123
|
-
## Available Tools
|
|
130
|
+
## Available Resources & Tools
|
|
131
|
+
|
|
132
|
+
Once connected, your AI assistant can use these resources and tools:
|
|
133
|
+
|
|
134
|
+
### Resource: `data://devices`
|
|
135
|
+
|
|
136
|
+
Lists all connected mobile devices (Android and iOS).
|
|
124
137
|
|
|
125
|
-
|
|
138
|
+
**Returns:** Array of device information objects with:
|
|
126
139
|
|
|
127
|
-
|
|
128
|
-
|
|
140
|
+
- `device_id`: Device serial (Android) or UDID (iOS)
|
|
141
|
+
- `platform`: `"android"` or `"ios"`
|
|
142
|
+
- `name`: Device name
|
|
143
|
+
- `state`: Device state (`"connected"` or `"Booted"`)
|
|
144
|
+
|
|
145
|
+
### Tool: `analyze_screen`
|
|
146
|
+
|
|
147
|
+
Captures a screenshot from a mobile device and analyzes it using a vision language model.
|
|
129
148
|
|
|
130
149
|
**Parameters:**
|
|
131
|
-
- `goal` (required): High-level goal describing the action to perform
|
|
132
|
-
- `output_description` (optional): Natural language description of the desired output format. Results are returned as structured JSON (e.g., "An array with sender and subject for each email")
|
|
133
|
-
- `profile` (optional): Profile name to use (defaults to "default")
|
|
134
150
|
|
|
135
|
-
|
|
151
|
+
- `prompt` (required): Analysis prompt describing what information to extract
|
|
152
|
+
- `device_id` (optional): Specific device ID to target. If not provided, uses the first available device.
|
|
153
|
+
|
|
154
|
+
**Returns:** AI-generated analysis of the screenshot based on the prompt.
|
|
155
|
+
|
|
156
|
+
**Example:**
|
|
157
|
+
|
|
136
158
|
```
|
|
137
|
-
"
|
|
138
|
-
"Find the first 3 unread emails in Gmail"
|
|
139
|
-
"Open Google Maps and search for the nearest coffee shop"
|
|
140
|
-
"Take a screenshot and save it"
|
|
159
|
+
Prompt: "What app is currently open? List all visible UI elements."
|
|
141
160
|
```
|
|
142
161
|
|
|
143
|
-
|
|
144
|
-
|
|
162
|
+
The tool will:
|
|
163
|
+
|
|
164
|
+
1. Find the specified device (or first available)
|
|
165
|
+
2. Capture a screenshot
|
|
166
|
+
3. Analyze it with the vision model
|
|
167
|
+
4. Return the analysis
|
|
168
|
+
|
|
169
|
+
### Tool: `execute_mobile_command`
|
|
170
|
+
|
|
171
|
+
Execute natural language commands on your mobile device using the mobile-use SDK. This tool allows you to control your Android or iOS device with simple instructions.
|
|
145
172
|
|
|
146
173
|
**Parameters:**
|
|
147
|
-
|
|
148
|
-
- `
|
|
174
|
+
|
|
175
|
+
- `goal` (required): Natural language command to execute on the device
|
|
176
|
+
- `output_description` (optional): Description of the expected output format (e.g., "A JSON list of objects with sender and subject keys")
|
|
177
|
+
- `profile` (optional): Name of the profile to use for this task. Defaults to 'default'
|
|
178
|
+
|
|
179
|
+
**Returns:** Execution result with status, output, and any extracted data.
|
|
149
180
|
|
|
150
181
|
**Examples:**
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
"
|
|
155
|
-
|
|
182
|
+
|
|
183
|
+
```python
|
|
184
|
+
# Simple command
|
|
185
|
+
goal: "Go to settings and tell me my current battery level"
|
|
186
|
+
|
|
187
|
+
# Data extraction with structured output
|
|
188
|
+
goal: "Open Gmail, find first 3 unread emails, and list their sender and subject line"
|
|
189
|
+
output_description: "A JSON list of objects, each with 'sender' and 'subject' keys"
|
|
190
|
+
|
|
191
|
+
# App navigation
|
|
192
|
+
goal: "Open Twitter and scroll to the latest tweet"
|
|
156
193
|
```
|
|
157
194
|
|
|
195
|
+
The tool will:
|
|
196
|
+
|
|
197
|
+
1. Find the specified device (or first available)
|
|
198
|
+
2. Execute the command using the mobile-use AI agent
|
|
199
|
+
3. Return the result or extracted data
|
|
200
|
+
|
|
201
|
+
### Tool: `save_figma_assets`
|
|
202
|
+
|
|
203
|
+
Fetch Figma design assets and React implementation code, then save them locally in the workspace.
|
|
204
|
+
|
|
205
|
+
**Parameters:**
|
|
206
|
+
|
|
207
|
+
- `node_id` (required): The node ID of the Figma design in format "1:2" (colon-separated). Extract from URLs like `https://figma.com/design/:fileKey/:fileName?node-id=1-2`
|
|
208
|
+
- `file_key` (required): The file key from the Figma URL (e.g., "abc123" from `https://figma.com/design/abc123/MyFile`)
|
|
209
|
+
- `workspace_path` (optional): The workspace path where assets should be saved. Defaults to current directory.
|
|
210
|
+
|
|
211
|
+
**Returns:** Download summary with list of successfully downloaded assets and any failures.
|
|
212
|
+
|
|
213
|
+
**Example:**
|
|
214
|
+
|
|
215
|
+
```python
|
|
216
|
+
node_id: "1:2"
|
|
217
|
+
file_key: "abc123xyz"
|
|
218
|
+
workspace_path: "."
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
The tool will:
|
|
222
|
+
|
|
223
|
+
1. Call `get_design_context` from Figma MCP to get React/TypeScript code
|
|
224
|
+
2. Extract all asset URLs from the code implementation
|
|
225
|
+
3. Download each asset to `.mobile-use/figma_assets/<node-id>/` folder
|
|
226
|
+
4. Save the code implementation to `.mobile-use/figma_assets/<node-id>/code_implementation.ts`
|
|
227
|
+
5. Return a list of downloaded files with success/failure status
|
|
228
|
+
|
|
229
|
+
### Tool: `compare_screenshot_with_figma`
|
|
230
|
+
|
|
231
|
+
Compare a screenshot of the current mobile device state with a Figma design to identify visual differences.
|
|
232
|
+
|
|
233
|
+
**Parameters:**
|
|
234
|
+
|
|
235
|
+
- `node_id` (required): The node ID of the Figma design in format "1:2" (colon-separated). Extract from URLs like `https://figma.com/design/:fileKey/:fileName?node-id=1-2`
|
|
236
|
+
|
|
237
|
+
**Returns:** Detailed comparison report with both the Figma design and current device screenshots for visual context.
|
|
238
|
+
|
|
239
|
+
The tool will:
|
|
240
|
+
|
|
241
|
+
1. Capture a screenshot of the current device state
|
|
242
|
+
2. Fetch the Figma design screenshot
|
|
243
|
+
3. Compare both screenshots using vision AI
|
|
244
|
+
4. Return a detailed analysis highlighting differences
|
|
245
|
+
|
|
158
246
|
## Advanced Configuration
|
|
159
247
|
|
|
160
248
|
### Custom ADB Server
|
|
@@ -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=
|
|
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.
|
|
24
|
-
minitap_mcp-0.4.
|
|
25
|
-
minitap_mcp-0.4.
|
|
26
|
-
minitap_mcp-0.4.
|
|
22
|
+
minitap_mcp-0.4.3.dist-info/WHEEL,sha256=5w2T7AS2mz1-rW9CNagNYWRCaB0iQqBMYLwKdlgiR4Q,78
|
|
23
|
+
minitap_mcp-0.4.3.dist-info/entry_points.txt,sha256=rYVoXm7tSQCqQTtHx4Lovgn1YsjwtEEHfddKrfEVHuY,55
|
|
24
|
+
minitap_mcp-0.4.3.dist-info/METADATA,sha256=-3t9Ox1LrXQfWtYQRyar6Bneyp_T1FQkBV0djX1lJBY,8641
|
|
25
|
+
minitap_mcp-0.4.3.dist-info/RECORD,,
|
minitap/mcp/tools/go_back.py
DELETED
|
@@ -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)}"
|
|
File without changes
|
|
File without changes
|