flutter-skill-mcp 0.7.0 → 0.7.2
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.
- package/README.md +215 -274
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,60 +1,83 @@
|
|
|
1
1
|
# Flutter Skill
|
|
2
2
|
|
|
3
|
-
> **
|
|
3
|
+
> **AI-Powered End-to-End Testing for Flutter Apps**
|
|
4
4
|
|
|
5
5
|

|
|
6
6
|

|
|
7
7
|

|
|
8
8
|

|
|
9
9
|
|
|
10
|
-
**Flutter Skill** is
|
|
10
|
+
**Flutter Skill** is an E2E testing bridge that gives AI agents (Claude Code, Cursor, Windsurf, etc.) full control over running Flutter apps. Describe what you want to test in natural language, and the AI sees the screen, taps buttons, fills forms, scrolls, and verifies results - just like a human tester would.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
```
|
|
13
|
+
You: "Test the login flow - enter test@example.com and password123, tap Login, verify Dashboard appears"
|
|
14
|
+
|
|
15
|
+
AI Agent:
|
|
16
|
+
1. screenshot() → sees the login screen
|
|
17
|
+
2. enter_text("email") → types the email
|
|
18
|
+
3. enter_text("password") → types the password
|
|
19
|
+
4. tap("Login") → taps the button
|
|
20
|
+
5. wait_for_element("Dashboard") → confirms navigation
|
|
21
|
+
6. screenshot() → captures the result
|
|
22
|
+
✅ Login flow verified!
|
|
23
|
+
```
|
|
13
24
|
|
|
14
|
-
|
|
25
|
+
## Why Flutter Skill?
|
|
15
26
|
|
|
16
|
-
|
|
27
|
+
| Traditional E2E Testing | Flutter Skill |
|
|
28
|
+
|------------------------|---------------|
|
|
29
|
+
| Write Dart test code manually | Describe tests in natural language |
|
|
30
|
+
| Learn WidgetTester API | AI handles the automation |
|
|
31
|
+
| Maintain brittle test scripts | AI adapts to UI changes |
|
|
32
|
+
| Debug test failures manually | AI sees screenshots and self-corrects |
|
|
33
|
+
| Setup takes hours | Setup takes 2 minutes |
|
|
17
34
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
35
|
+
**Flutter Skill is for you if:**
|
|
36
|
+
- You want E2E tests without writing test code
|
|
37
|
+
- You're using AI coding agents (Claude Code, Cursor, Windsurf)
|
|
38
|
+
- You want to automate QA workflows with natural language
|
|
39
|
+
- You need to test real app behavior on simulators/emulators
|
|
21
40
|
|
|
22
|
-
|
|
23
|
-
iwr https://raw.githubusercontent.com/ai-dashboad/flutter-skill/main/install.ps1 -useb | iex
|
|
24
|
-
```
|
|
41
|
+
---
|
|
25
42
|
|
|
26
|
-
|
|
43
|
+
## Quick Start (2 minutes)
|
|
44
|
+
|
|
45
|
+
### 1. Install
|
|
27
46
|
|
|
28
47
|
```bash
|
|
29
|
-
#
|
|
30
|
-
|
|
48
|
+
# One-click install (macOS/Linux) - recommended
|
|
49
|
+
curl -fsSL https://raw.githubusercontent.com/ai-dashboad/flutter-skill/main/install.sh | bash
|
|
31
50
|
|
|
32
|
-
#
|
|
33
|
-
|
|
34
|
-
brew install flutter-skill
|
|
51
|
+
# Or: npm (all platforms)
|
|
52
|
+
npm install -g flutter-skill-mcp
|
|
35
53
|
|
|
36
|
-
#
|
|
37
|
-
|
|
38
|
-
scoop install flutter-skill
|
|
54
|
+
# Or: Homebrew (macOS/Linux)
|
|
55
|
+
brew tap ai-dashboad/flutter-skill && brew install flutter-skill
|
|
39
56
|
|
|
40
|
-
# Dart
|
|
57
|
+
# Or: Dart
|
|
41
58
|
dart pub global activate flutter_skill
|
|
42
|
-
|
|
43
|
-
# IDE Extensions
|
|
44
|
-
# - VSCode: Search "Flutter Skill" in Extensions
|
|
45
|
-
# - IntelliJ/Android Studio: Search "Flutter Skill" in Plugins
|
|
46
59
|
```
|
|
47
60
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
-
|
|
61
|
+
<details>
|
|
62
|
+
<summary>More installation methods (Windows, Docker, IDE extensions...)</summary>
|
|
63
|
+
|
|
64
|
+
| Method | Command | Platform |
|
|
65
|
+
|--------|---------|----------|
|
|
66
|
+
| **One-click** | `curl -fsSL .../install.sh \| bash` | macOS/Linux |
|
|
67
|
+
| **Windows** | `iwr .../install.ps1 -useb \| iex` | Windows |
|
|
68
|
+
| **npm** | `npm install -g flutter-skill-mcp` | All |
|
|
69
|
+
| **Homebrew** | `brew install ai-dashboad/flutter-skill/flutter-skill` | macOS/Linux |
|
|
70
|
+
| **Scoop** | `scoop install flutter-skill` | Windows |
|
|
71
|
+
| **Docker** | `docker pull ghcr.io/ai-dashboad/flutter-skill` | All |
|
|
72
|
+
| **pub.dev** | `dart pub global activate flutter_skill` | All |
|
|
73
|
+
| **VSCode** | Extensions -> "Flutter Skill" | All |
|
|
74
|
+
| **IntelliJ** | Plugins -> "Flutter Skill" | All |
|
|
75
|
+
|
|
76
|
+
</details>
|
|
54
77
|
|
|
55
|
-
### 2. Configure AI Agent
|
|
78
|
+
### 2. Configure Your AI Agent
|
|
56
79
|
|
|
57
|
-
Add to your
|
|
80
|
+
Add to your agent's MCP config:
|
|
58
81
|
|
|
59
82
|
**Claude Code** (`~/.claude/settings.json`):
|
|
60
83
|
```json
|
|
@@ -68,6 +91,9 @@ Add to your AI agent's MCP config:
|
|
|
68
91
|
}
|
|
69
92
|
```
|
|
70
93
|
|
|
94
|
+
<details>
|
|
95
|
+
<summary>Cursor, Windsurf, and other agents</summary>
|
|
96
|
+
|
|
71
97
|
**Cursor** (`~/.cursor/mcp.json`):
|
|
72
98
|
```json
|
|
73
99
|
{
|
|
@@ -80,274 +106,204 @@ Add to your AI agent's MCP config:
|
|
|
80
106
|
}
|
|
81
107
|
```
|
|
82
108
|
|
|
83
|
-
|
|
109
|
+
Any MCP-compatible agent uses the same config format.
|
|
84
110
|
|
|
85
|
-
|
|
111
|
+
</details>
|
|
86
112
|
|
|
87
|
-
|
|
88
|
-
flutter_skill setup
|
|
89
|
-
```
|
|
113
|
+
### 3. Add to Your Flutter App
|
|
90
114
|
|
|
91
|
-
|
|
115
|
+
```yaml
|
|
116
|
+
# pubspec.yaml
|
|
117
|
+
dependencies:
|
|
118
|
+
flutter_skill: ^0.7.2
|
|
119
|
+
```
|
|
92
120
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
- ✅ No manual tool selection needed
|
|
121
|
+
```dart
|
|
122
|
+
// main.dart
|
|
123
|
+
import 'package:flutter/foundation.dart';
|
|
124
|
+
import 'package:flutter_skill/flutter_skill.dart';
|
|
98
125
|
|
|
99
|
-
|
|
100
|
-
|
|
126
|
+
void main() {
|
|
127
|
+
if (kDebugMode) {
|
|
128
|
+
FlutterSkillBinding.ensureInitialized();
|
|
129
|
+
}
|
|
130
|
+
runApp(MyApp());
|
|
131
|
+
}
|
|
132
|
+
```
|
|
101
133
|
|
|
102
|
-
**
|
|
134
|
+
> **Tip:** `launch_app` can auto-add this for you. The `kDebugMode` guard ensures it's stripped from release builds.
|
|
103
135
|
|
|
104
|
-
### 4.
|
|
136
|
+
### 4. Start Testing
|
|
105
137
|
|
|
106
|
-
|
|
107
|
-
// Option 1: Launch app with environment variables
|
|
108
|
-
flutter-skill.launch_app({
|
|
109
|
-
project_path: "/path/to/flutter/project",
|
|
110
|
-
dart_defines: ["ENV=staging", "DEBUG=true"],
|
|
111
|
-
flavor: "staging"
|
|
112
|
-
})
|
|
138
|
+
Just tell your AI agent what to test:
|
|
113
139
|
|
|
114
|
-
|
|
115
|
-
|
|
140
|
+
```
|
|
141
|
+
"Launch my app on iPhone simulator, tap the Sign Up button, fill in the form, and verify the success screen"
|
|
142
|
+
```
|
|
116
143
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
flutter-skill.
|
|
120
|
-
flutter-skill.inspect()
|
|
144
|
+
Or use tools directly:
|
|
145
|
+
```javascript
|
|
146
|
+
flutter-skill.launch_app({ project_path: "." })
|
|
147
|
+
flutter-skill.inspect() // See all interactive elements
|
|
148
|
+
flutter-skill.tap({ text: "Sign Up" }) // Tap by text
|
|
149
|
+
flutter-skill.enter_text({ key: "email", text: "user@test.com" })
|
|
150
|
+
flutter-skill.screenshot() // Visual verification
|
|
121
151
|
```
|
|
122
152
|
|
|
123
153
|
---
|
|
124
154
|
|
|
125
|
-
##
|
|
155
|
+
## What Can It Do?
|
|
126
156
|
|
|
127
|
-
### App
|
|
128
|
-
|
|
157
|
+
### 40+ MCP Tools for Complete App Control
|
|
158
|
+
|
|
159
|
+
**Launch & Connect**
|
|
160
|
+
| Tool | What it does |
|
|
129
161
|
|------|-------------|
|
|
130
|
-
| `launch_app` | Launch
|
|
131
|
-
| `scan_and_connect` | Auto-
|
|
132
|
-
| `
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
|
136
|
-
| `get_connection_status` | Get connection info and suggestions |
|
|
137
|
-
| `hot_reload` | Fast reload (keeps state) |
|
|
138
|
-
| `hot_restart` | Full restart (resets state) |
|
|
139
|
-
|
|
140
|
-
### UI Inspection
|
|
141
|
-
| Tool | Description |
|
|
162
|
+
| `launch_app` | Launch app with dart-defines, flavors, custom targets |
|
|
163
|
+
| `scan_and_connect` | Auto-find and connect to any running Flutter app |
|
|
164
|
+
| `hot_reload` / `hot_restart` | Reload code without restarting |
|
|
165
|
+
|
|
166
|
+
**See the Screen**
|
|
167
|
+
| Tool | What it does |
|
|
142
168
|
|------|-------------|
|
|
143
|
-
| `
|
|
144
|
-
| `
|
|
145
|
-
| `
|
|
146
|
-
| `
|
|
147
|
-
| `
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
|
169
|
+
| `screenshot` | Full app screenshot (configurable quality) |
|
|
170
|
+
| `screenshot_region` | Screenshot a specific area |
|
|
171
|
+
| `screenshot_element` | Screenshot a single widget |
|
|
172
|
+
| `native_screenshot` | OS-level screenshot (native dialogs, permission popups) |
|
|
173
|
+
| `inspect` | List all interactive elements with coordinates |
|
|
174
|
+
| `get_widget_tree` | Full widget tree structure |
|
|
175
|
+
| `find_by_type` | Find widgets by type (e.g., `ElevatedButton`) |
|
|
176
|
+
| `get_text_content` | Extract all visible text |
|
|
177
|
+
|
|
178
|
+
**Interact Like a User**
|
|
179
|
+
| Tool | What it does |
|
|
151
180
|
|------|-------------|
|
|
152
|
-
| `tap` | Tap
|
|
153
|
-
| `double_tap` | Double tap
|
|
181
|
+
| `tap` | Tap by Key, text, or coordinates |
|
|
182
|
+
| `double_tap` | Double tap |
|
|
154
183
|
| `long_press` | Long press with configurable duration |
|
|
155
|
-
| `
|
|
156
|
-
| `
|
|
184
|
+
| `enter_text` | Type into text fields (by key or focused field) |
|
|
185
|
+
| `swipe` | Swipe gestures (up/down/left/right) |
|
|
186
|
+
| `scroll_to` | Scroll until element is visible |
|
|
157
187
|
| `drag` | Drag from one element to another |
|
|
158
|
-
| `scroll_to` | Scroll to make an element visible |
|
|
159
|
-
| `enter_text` | Enter text into a text field (returns success/failure) |
|
|
160
|
-
|
|
161
|
-
### State & Validation
|
|
162
|
-
| Tool | Description |
|
|
163
|
-
|------|-------------|
|
|
164
|
-
| `get_text_value` | Get current value of a text field |
|
|
165
|
-
| `get_checkbox_state` | Get checked state of a checkbox/switch |
|
|
166
|
-
| `get_slider_value` | Get current value of a slider |
|
|
167
|
-
| `wait_for_element` | Wait for an element to appear (with timeout) |
|
|
168
|
-
| `wait_for_gone` | Wait for an element to disappear |
|
|
169
|
-
|
|
170
|
-
### Screenshots
|
|
171
|
-
| Tool | Description |
|
|
172
|
-
|------|-------------|
|
|
173
|
-
| `screenshot` | Take full app screenshot (quality, max_width options) |
|
|
174
|
-
| `screenshot_region` | Take screenshot of specific region (x, y, width, height) |
|
|
175
|
-
| `screenshot_element` | Take screenshot of specific element |
|
|
176
|
-
|
|
177
|
-
### Navigation
|
|
178
|
-
| Tool | Description |
|
|
179
|
-
|------|-------------|
|
|
180
|
-
| `get_current_route` | Get the current route name |
|
|
181
188
|
| `go_back` | Navigate back |
|
|
182
|
-
| `
|
|
189
|
+
| `native_tap` | Tap native UI (permission dialogs, photo pickers) |
|
|
190
|
+
| `native_input_text` | Type into native text fields |
|
|
191
|
+
| `native_swipe` | Scroll native views |
|
|
183
192
|
|
|
184
|
-
|
|
185
|
-
| Tool |
|
|
193
|
+
**Verify & Assert**
|
|
194
|
+
| Tool | What it does |
|
|
186
195
|
|------|-------------|
|
|
187
|
-
| `
|
|
188
|
-
| `
|
|
189
|
-
| `
|
|
190
|
-
| `
|
|
196
|
+
| `assert_text` | Verify element contains expected text |
|
|
197
|
+
| `assert_visible` | Verify element is visible |
|
|
198
|
+
| `assert_not_visible` | Verify element is gone |
|
|
199
|
+
| `assert_element_count` | Verify number of matching elements |
|
|
200
|
+
| `wait_for_element` | Wait for element to appear (with timeout) |
|
|
201
|
+
| `wait_for_gone` | Wait for element to disappear |
|
|
202
|
+
| `get_checkbox_state` | Read checkbox/switch state |
|
|
203
|
+
| `get_slider_value` | Read slider value |
|
|
204
|
+
| `get_text_value` | Read text field value |
|
|
205
|
+
|
|
206
|
+
**Debug & Monitor**
|
|
207
|
+
| Tool | What it does |
|
|
208
|
+
|------|-------------|
|
|
209
|
+
| `get_logs` | Read application logs |
|
|
210
|
+
| `get_errors` | Read application errors |
|
|
211
|
+
| `get_performance` | Performance metrics |
|
|
212
|
+
| `get_memory_stats` | Memory usage stats |
|
|
191
213
|
|
|
192
|
-
|
|
193
|
-
| Tool |
|
|
214
|
+
**Multi-Session**
|
|
215
|
+
| Tool | What it does |
|
|
194
216
|
|------|-------------|
|
|
195
|
-
| `
|
|
217
|
+
| `list_sessions` | See all connected apps |
|
|
218
|
+
| `switch_session` | Switch between apps |
|
|
219
|
+
| `close_session` | Disconnect from an app |
|
|
196
220
|
|
|
197
221
|
---
|
|
198
222
|
|
|
199
|
-
##
|
|
200
|
-
|
|
201
|
-
| Method | Command | Platform |
|
|
202
|
-
|--------|---------|----------|
|
|
203
|
-
| **npm** | `npm install -g flutter-skill-mcp` | All |
|
|
204
|
-
| **Homebrew** | `brew install ai-dashboad/flutter-skill/flutter-skill` | macOS/Linux |
|
|
205
|
-
| **Docker** | `docker pull ghcr.io/ai-dashboad/flutter-skill` | All |
|
|
206
|
-
| **Snap** | `snap install flutter-skill` | Linux |
|
|
207
|
-
| **Scoop** | `scoop install flutter-skill` | Windows |
|
|
208
|
-
| **Winget** | `winget install AIDashboard.FlutterSkill` | Windows |
|
|
209
|
-
| **pub.dev** | `dart pub global activate flutter_skill` | All |
|
|
210
|
-
| **VSCode** | Extensions → "Flutter Skill" | All |
|
|
211
|
-
| **IntelliJ** | Plugins → "Flutter Skill" | All |
|
|
212
|
-
| **Devcontainer** | See below | All |
|
|
213
|
-
|
|
214
|
-
### Docker
|
|
223
|
+
## Example Workflows
|
|
215
224
|
|
|
216
|
-
|
|
217
|
-
# Run MCP server
|
|
218
|
-
docker run --rm -it ghcr.io/ai-dashboad/flutter-skill server
|
|
219
|
-
|
|
220
|
-
# Or use in docker-compose
|
|
221
|
-
services:
|
|
222
|
-
flutter-skill:
|
|
223
|
-
image: ghcr.io/ai-dashboad/flutter-skill:latest
|
|
224
|
-
command: ["server"]
|
|
225
|
+
### Login Flow Test
|
|
225
226
|
```
|
|
226
|
-
|
|
227
|
-
### Devcontainer Feature
|
|
228
|
-
|
|
229
|
-
Add to your `.devcontainer/devcontainer.json`:
|
|
230
|
-
```json
|
|
231
|
-
{
|
|
232
|
-
"features": {
|
|
233
|
-
"ghcr.io/ai-dashboad/flutter-skill/flutter-skill:latest": {}
|
|
234
|
-
}
|
|
235
|
-
}
|
|
227
|
+
You: "Test login with test@example.com / password123, verify it reaches the dashboard"
|
|
236
228
|
```
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
- Windows (x64)
|
|
248
|
-
|
|
249
|
-
---
|
|
250
|
-
|
|
251
|
-
## Flutter App Setup
|
|
252
|
-
|
|
253
|
-
For the MCP tools to work, your Flutter app needs the `flutter_skill` package:
|
|
254
|
-
|
|
255
|
-
### Automatic Setup (Recommended)
|
|
256
|
-
```bash
|
|
257
|
-
flutter-skill launch /path/to/project
|
|
258
|
-
# Automatically adds dependency and initializes
|
|
229
|
+
The AI agent will:
|
|
230
|
+
1. `launch_app` or `scan_and_connect` to your app
|
|
231
|
+
2. `screenshot` to see the current screen
|
|
232
|
+
3. `enter_text(key: "email_field", text: "test@example.com")`
|
|
233
|
+
4. `enter_text(key: "password_field", text: "password123")`
|
|
234
|
+
5. `tap(text: "Login")`
|
|
235
|
+
6. `wait_for_element(text: "Dashboard")`
|
|
236
|
+
7. `screenshot` to confirm
|
|
237
|
+
|
|
238
|
+
### Form Validation Test
|
|
259
239
|
```
|
|
260
|
-
|
|
261
|
-
### Manual Setup
|
|
262
|
-
1. Add dependency:
|
|
263
|
-
```yaml
|
|
264
|
-
dependencies:
|
|
265
|
-
flutter_skill: ^0.7.0
|
|
240
|
+
You: "Submit the registration form empty and check that all validation errors appear"
|
|
266
241
|
```
|
|
267
242
|
|
|
268
|
-
|
|
269
|
-
```
|
|
270
|
-
|
|
243
|
+
### Navigation Test
|
|
244
|
+
```
|
|
245
|
+
You: "Navigate through all tabs, take a screenshot of each, and verify the back button works"
|
|
246
|
+
```
|
|
271
247
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
}
|
|
248
|
+
### Visual Regression
|
|
249
|
+
```
|
|
250
|
+
You: "Take screenshots of the home, profile, and settings pages - compare them with last time"
|
|
276
251
|
```
|
|
277
252
|
|
|
278
253
|
---
|
|
279
254
|
|
|
280
|
-
##
|
|
255
|
+
## Native Platform Support
|
|
281
256
|
|
|
282
|
-
|
|
283
|
-
```javascript
|
|
284
|
-
// Launch staging environment
|
|
285
|
-
flutter-skill.launch_app({
|
|
286
|
-
project_path: "./",
|
|
287
|
-
dart_defines: ["ENV=staging", "API_URL=https://staging.api.com"],
|
|
288
|
-
flavor: "staging",
|
|
289
|
-
target: "lib/main_staging.dart"
|
|
290
|
-
})
|
|
291
|
-
|
|
292
|
-
// Wait for app to load
|
|
293
|
-
flutter-skill.wait_for_element({ text: "Welcome" })
|
|
257
|
+
Flutter Skill can interact with **native dialogs** that Flutter can't see (permission popups, photo pickers, share sheets):
|
|
294
258
|
|
|
295
|
-
|
|
296
|
-
|
|
259
|
+
| Tool | iOS Simulator | Android Emulator |
|
|
260
|
+
|------|--------------|-----------------|
|
|
261
|
+
| `native_screenshot` | `xcrun simctl screenshot` | `adb screencap` |
|
|
262
|
+
| `native_tap` | macOS Accessibility API | `adb input tap` |
|
|
263
|
+
| `native_input_text` | Pasteboard + Cmd+V | `adb input text` |
|
|
264
|
+
| `native_swipe` | Accessibility scroll | `adb input swipe` |
|
|
297
265
|
|
|
298
|
-
|
|
299
|
-
flutter-skill.tap({ text: "Login" })
|
|
300
|
-
flutter-skill.enter_text({ key: "email_field", text: "test@example.com" })
|
|
301
|
-
flutter-skill.enter_text({ key: "password_field", text: "password123" })
|
|
302
|
-
flutter-skill.tap({ text: "Submit" })
|
|
266
|
+
No external tools needed - works with built-in OS capabilities.
|
|
303
267
|
|
|
304
|
-
|
|
305
|
-
flutter-skill.wait_for_element({ text: "Dashboard" })
|
|
306
|
-
```
|
|
268
|
+
---
|
|
307
269
|
|
|
308
|
-
|
|
309
|
-
```javascript
|
|
310
|
-
// List all running Flutter apps
|
|
311
|
-
flutter-skill.list_running_apps()
|
|
312
|
-
// Returns: { apps: ["ws://127.0.0.1:50123/ws", ...], count: 2 }
|
|
270
|
+
## Flutter 3.x Compatibility
|
|
313
271
|
|
|
314
|
-
|
|
315
|
-
flutter-skill.scan_and_connect()
|
|
272
|
+
Flutter 3.x defaults to the DTD protocol. Flutter Skill auto-adds `--vm-service-port=50000` to ensure VM Service protocol is available. No manual configuration needed.
|
|
316
273
|
|
|
317
|
-
|
|
318
|
-
|
|
274
|
+
If you see "no VM Service URI" errors:
|
|
275
|
+
```javascript
|
|
276
|
+
// Explicitly set a port
|
|
277
|
+
flutter-skill.launch_app({
|
|
278
|
+
project_path: ".",
|
|
279
|
+
extra_args: ["--vm-service-port=50000"]
|
|
280
|
+
})
|
|
319
281
|
```
|
|
320
282
|
|
|
321
|
-
|
|
322
|
-
```javascript
|
|
323
|
-
// Get widget tree
|
|
324
|
-
flutter-skill.get_widget_tree({ max_depth: 5 })
|
|
283
|
+
---
|
|
325
284
|
|
|
326
|
-
|
|
327
|
-
flutter-skill.find_by_type({ type: "ElevatedButton" })
|
|
285
|
+
## Tool Priority Setup (Claude Code)
|
|
328
286
|
|
|
329
|
-
|
|
330
|
-
flutter-skill.inspect()
|
|
287
|
+
For Claude Code users, ensure it always uses Flutter Skill for Flutter testing:
|
|
331
288
|
|
|
332
|
-
|
|
333
|
-
|
|
289
|
+
```bash
|
|
290
|
+
flutter_skill setup
|
|
334
291
|
```
|
|
335
292
|
|
|
293
|
+
This installs priority rules so Claude Code automatically chooses Flutter Skill over Dart MCP, giving you full UI automation (tap, screenshot, swipe) instead of read-only inspection.
|
|
294
|
+
|
|
336
295
|
---
|
|
337
296
|
|
|
338
297
|
## IDE Extensions
|
|
339
298
|
|
|
340
299
|
### VSCode Extension
|
|
341
300
|
- Auto-detects Flutter projects
|
|
342
|
-
- Prompts to add `flutter_skill` dependency
|
|
343
|
-
- Auto-downloads native binary
|
|
344
301
|
- Status bar shows connection state
|
|
345
302
|
- Commands: Launch, Inspect, Screenshot
|
|
346
303
|
|
|
347
|
-
### IntelliJ/Android Studio Plugin
|
|
304
|
+
### IntelliJ / Android Studio Plugin
|
|
348
305
|
- Same features as VSCode
|
|
349
306
|
- Integrates with IDE notifications
|
|
350
|
-
- Tool window for status
|
|
351
307
|
|
|
352
308
|
---
|
|
353
309
|
|
|
@@ -355,49 +311,22 @@ flutter-skill.wait_for_element({ key: "submit_button", timeout: 3000 })
|
|
|
355
311
|
|
|
356
312
|
### "Not connected to Flutter app"
|
|
357
313
|
```javascript
|
|
358
|
-
//
|
|
359
|
-
flutter-skill.
|
|
360
|
-
|
|
361
|
-
// This returns:
|
|
362
|
-
// - Current connection state
|
|
363
|
-
// - List of available apps
|
|
364
|
-
// - Actionable suggestions
|
|
314
|
+
flutter-skill.get_connection_status() // Shows suggestions
|
|
315
|
+
flutter-skill.scan_and_connect() // Auto-find running apps
|
|
365
316
|
```
|
|
366
317
|
|
|
367
318
|
### "Unknown method ext.flutter.flutter_skill.xxx"
|
|
368
|
-
Your
|
|
319
|
+
Your app doesn't have the flutter_skill package:
|
|
369
320
|
```bash
|
|
370
321
|
flutter pub add flutter_skill
|
|
371
322
|
```
|
|
372
|
-
Then restart the app (hot reload is not enough).
|
|
323
|
+
Then restart the app (hot reload is not enough for new packages).
|
|
373
324
|
|
|
374
|
-
###
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
# For Homebrew
|
|
381
|
-
brew upgrade flutter-skill
|
|
382
|
-
```
|
|
383
|
-
|
|
384
|
-
---
|
|
385
|
-
|
|
386
|
-
## 📚 Documentation
|
|
387
|
-
|
|
388
|
-
### Core Documentation
|
|
389
|
-
- [Usage Guide](docs/USAGE_GUIDE.md) - Detailed usage instructions
|
|
390
|
-
- [Architecture](docs/ARCHITECTURE.md) - System architecture and communication flow
|
|
391
|
-
- [Troubleshooting](docs/TROUBLESHOOTING.md) - Common issues and solutions
|
|
392
|
-
- [Flutter 3.x Fix](docs/FLUTTER_3X_FIX.md) - Flutter 3.x compatibility guide
|
|
393
|
-
|
|
394
|
-
### Research & Deep Dives
|
|
395
|
-
- [DTD Protocol Research](docs/research/DTD_PROTOCOL_RESEARCH.md) - DTD vs VM Service analysis
|
|
396
|
-
- [Communication Flow](docs/COMMUNICATION_FLOW.md) - Complete communication flow examples
|
|
397
|
-
- [Protocol Details](docs/research/DTD_PROTOCOL_DETAILS.md) - DTD protocol specifications
|
|
398
|
-
|
|
399
|
-
### Release Notes
|
|
400
|
-
- [v0.3.2 Auto VM Service](docs/releases/v0.3.2_AUTO_VM_SERVICE.md) - Auto-configuration feature
|
|
325
|
+
### More help
|
|
326
|
+
- [Usage Guide](docs/USAGE_GUIDE.md)
|
|
327
|
+
- [Architecture](docs/ARCHITECTURE.md)
|
|
328
|
+
- [Troubleshooting](docs/TROUBLESHOOTING.md)
|
|
329
|
+
- [Flutter 3.x Fix](docs/FLUTTER_3X_FIX.md)
|
|
401
330
|
|
|
402
331
|
---
|
|
403
332
|
|
|
@@ -407,7 +336,19 @@ brew upgrade flutter-skill
|
|
|
407
336
|
- [pub.dev](https://pub.dev/packages/flutter_skill)
|
|
408
337
|
- [npm](https://www.npmjs.com/package/flutter-skill-mcp)
|
|
409
338
|
- [VSCode Marketplace](https://marketplace.visualstudio.com/items?itemName=ai-dashboad.flutter-skill)
|
|
410
|
-
- [JetBrains Marketplace](https://plugins.jetbrains.com/plugin/
|
|
339
|
+
- [JetBrains Marketplace](https://plugins.jetbrains.com/plugin/29991-flutter-skill)
|
|
340
|
+
- [Roadmap](docs/ROADMAP.md)
|
|
341
|
+
|
|
342
|
+
## Support This Project
|
|
343
|
+
|
|
344
|
+
If Flutter Skill helps you build better Flutter apps, consider supporting its development:
|
|
345
|
+
|
|
346
|
+
- [GitHub Sponsors](https://github.com/sponsors/ai-dashboad)
|
|
347
|
+
- [Buy Me a Coffee](https://buymeacoffee.com/ai-dashboad)
|
|
348
|
+
|
|
349
|
+
Your support helps maintain the project, add new features, and keep it free and open source.
|
|
350
|
+
|
|
351
|
+
---
|
|
411
352
|
|
|
412
353
|
## License
|
|
413
354
|
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flutter-skill-mcp",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "MCP Server for Flutter app automation - Give your AI Agent eyes and hands inside your Flutter app",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"flutter-skill-mcp": "./bin/cli.js"
|
|
7
|
+
"flutter-skill-mcp": "./bin/cli.js",
|
|
8
|
+
"flutter-skill": "./bin/cli.js"
|
|
8
9
|
},
|
|
9
10
|
"scripts": {
|
|
10
11
|
"postinstall": "node scripts/postinstall.js"
|