Skip to content

Commit b6318b5

Browse files
authored
feat(mcp): full CLI parity — 18 tools, composite tests, validation, bug fixes (#99)
New tools: - init_project: scaffold probe.yaml and tests/ directory - generate_report: HTML report from JSON results file - record: capture interactions → .probe file with configurable timeout shutdown_device: now accepts serial (Android) in addition to udid (iOS) run_tests: composite_devices parameter maps ALIAS=SPEC pairs to --composite-device flags; description now enumerates all key flags (--format, --parallel, --shard, --host/--token, --disable-animations, --video, --stream) write_test: validates ProbeScript via parser.ParseFile before writing; syntax errors returned immediately without creating the file; description documents composite test syntax get_report / generate_report: fixed alphabetical-sort bug — now uses os.Stat modification time to find the most recently written report Docs: rewrote mcp.md with full 18-tool reference, composite test examples, run_tests flags table, record/report workflows, and troubleshooting for write_test validation errors Tests: 5 new tests (tool count = 18, shutdown accepts udid or serial, write_test rejects invalid syntax, run_tests exposes composite_devices, init/generate_report/record present in tools/list)
1 parent 9465643 commit b6318b5

9 files changed

Lines changed: 503 additions & 192 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
66

77
## [Unreleased]
88

9+
## [0.9.1] - 2026-05-09
10+
11+
### Added
12+
- **MCP: 3 new tools**`init_project` (scaffold `probe.yaml` + `tests/`), `generate_report` (HTML from JSON results), `record` (record interactions → `.probe` file with configurable timeout)
13+
- **MCP: Android emulator shutdown**`shutdown_device` now accepts `serial` for Android emulators in addition to `udid` for iOS simulators
14+
- **MCP: composite test support**`run_tests` exposes a `composite_devices` parameter (`"A=host:port/token B=udid"`) that maps directly to `--composite-device` flags; `write_test` description documents the full `composite test` syntax
15+
- **MCP: `run_tests` flags documented** — tool description now enumerates key flags (`--timeout`, `--format`, `--parallel`, `--shard`, `--host/--token`, `--disable-animations`, `--video`, `--stream`)
16+
- **MCP: `write_test` validates before writing** — content is parsed in-process before the file is created; syntax errors are returned immediately without touching the filesystem
17+
18+
### Fixed
19+
- **MCP: `get_report` used alphabetical order instead of modification time**`get_report` and `generate_report` now find the most recently *modified* JSON file in `reports/`, not the lexicographically last one
20+
921
## [0.9.0] - 2026-05-09
1022

1123
### Added

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,25 @@ Studio binaries also ship as part of every GitHub release. See the dedicated [St
412412

413413
## MCP Server
414414

415-
For AI agents (Claude Desktop, Cursor, any MCP-compatible client), v0.6.0 ships **`probe-mcp`** as a standalone binary alongside `probe`. It exposes 10 tools: `get_widget_tree`, `take_screenshot`, `read_test`, `write_test`, `run_script`, `run_tests`, `list_files`, `lint`, `get_report`, `generate_test`.
415+
**`probe-mcp`** is a standalone binary that exposes all FlutterProbe capabilities to AI agents (Claude Desktop, Cursor, any MCP-compatible client) via 18 tools:
416+
417+
| Category | Tools |
418+
|---|---|
419+
| Device lifecycle | `list_devices`, `list_simulators`, `list_avds`, `start_device`, `shutdown_device` |
420+
| Authoring | `get_widget_tree`, `read_test`, `write_test`, `run_script` |
421+
| Execution | `run_tests`, `list_files`, `lint`, `take_screenshot` |
422+
| Reporting | `get_report`, `generate_report`, `generate_test` |
423+
| Project | `init_project`, `record` |
424+
425+
Every CLI feature is accessible from MCP. Key capabilities an agent can use:
426+
427+
- **Composite tests**`write_test` supports the full `composite test` syntax; `run_tests` accepts a `composite_devices` parameter (`"A=host:port/token B=udid"`)
428+
- **Structured results** — pass `--format json` in `run_tests`'s `flags` to get machine-readable output, then call `get_report` or `generate_report` for HTML
429+
- **Parallel/shard**`--parallel` or `--shard 1/3` via `flags`
430+
- **WiFi physical devices**`--host <ip> --token <tok>` via `flags`
431+
- **Android + iOS shutdown**`shutdown_device` accepts `udid` (iOS) or `serial` (Android)
432+
- **Pre-write validation**`write_test` parses the content before writing; syntax errors are returned immediately without creating the file
433+
- **Interaction recording**`record` captures gestures and returns a `.probe` file
416434

417435
Configure your MCP client:
418436

@@ -426,7 +444,7 @@ Configure your MCP client:
426444
}
427445
```
428446

429-
The legacy `probe mcp-server` subcommand still works for backwards compatibility but prints a one-time deprecation notice. Full setup guide for Claude Desktop, Cursor, and other MCP clients: [MCP Server docs](https://flutterprobe.dev/tools/mcp/).
447+
The legacy `probe mcp-server` subcommand still works but prints a deprecation notice. Full setup guide for Claude Desktop, Cursor, and other MCP clients: [MCP Server docs](https://flutterprobe.dev/tools/mcp/).
430448

431449
## Visual Regression
432450

docs/wiki/Home.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Welcome to the FlutterProbe wiki. This documentation covers architecture details
1818

1919
## Project Status
2020

21-
FlutterProbe is in active development. Current version: **0.9.0**.
21+
FlutterProbe is in active development. Current version: **0.9.1**.
2222

2323
### Repository Structure
2424

0 commit comments

Comments
 (0)