mcpe2e 2.2.0
mcpe2e: ^2.2.0 copied to clipboard
E2E testing library integrated with Model Context Protocol (MCP) for Flutter apps. Enables remote control via HTTP and Claude Desktop integration.
Changelog #
2.2.0 - 2026-03-13 #
Changed #
- Version bump to 2.2.0 (sync with mcpe2e_server v2.2.0 — mcpe2e_expert master prompt, docs standardized to English, widget resolution priority corrected).
2.1.2 - 2026-03-11 #
Changed #
- Version bump to 2.1.2 (sync with mcpe2e_server v2.1.2 — widget registry now
resolves plain
ValueKey<String>in addition to MCP-specific keys).
2.1.0 - 2026-03-10 #
Changed #
- Version bump to 2.1.0 (sync with mcpe2e_server v2.1.0 — MCP Prompts skill + agent protocol).
2.0.5 - 2026-03-10 #
Changed #
- Version bump to 2.0.5 (sync with mcpe2e_server v2.0.5 — input_text dual-option docs, run_command ADB fallback).
2.0.4 - 2026-03-10 #
Changed #
- Version bump to 2.0.4 (sync with mcpe2e_server v2.0.4 — input_text/toggle_widget string coord fix).
2.0.3 - 2026-03-10 #
Changed #
- Version bump to 2.0.3 (sync with mcpe2e_server v2.0.3 — smart press_back avoids closing app).
2.0.2 - 2026-03-10 #
Changed #
- Version bump to 2.0.2 (sync with mcpe2e_server v2.0.2 — inspect_ui reverted to raw JSON, inspect_ui_compact added as separate tool).
2.0.1 - 2026-03-10 #
Changed #
- Version bump to 2.0.1 (sync with mcpe2e_server v2.0.1 — OTHER section in inspect_ui, comprehensive widget type coverage).
2.0.0 - 2026-03-10 #
Fixed #
tap_at,drag_widget,swipe_widget,scroll_widget,set_slider_value,long_press_widget,pinch_widget,waitandscroll_until_visibleno longer crash withtype 'String' is not a subtype of type 'num'when the LLM passes numeric arguments as JSON strings (e.g."263.8"instead of263.8). New_toNum/_toInthelpers coerce both String and num transparently.
Added #
PopupMenuButtonnow appears ininspect_uioutput under INTERACTIVE with its tooltip and center coordinates. Previously invisible to the LLM — it could not open AppBar dropdowns without guessing coordinates.
1.1.9 - 2026-03-10 #
Added #
docs/writing-tests.mdSection 10: recommends addingMcpMetadataKeyto dialogs, bottom sheets, drawers and snackbars. Coordinates on animated overlay surfaces can shift during the open animation; a key avoids that.README.md"Recommended: add keys to overlaid widgets" subsection with code examples and the explicit note that it is a suggestion, not a requirement.
1.1.8 - 2026-03-10 #
Added #
McpNavigatorObserver— singletonNavigatorObserverthat captures the active route from the Navigator and exposes it inget_app_contextas the realroute. Register with a single line:MaterialApp(navigatorObservers: [McpNavigatorObserver.instance])GoRouter(observers: [McpNavigatorObserver.instance])Without registration: previous behavior (fallback to/unknownscreen).
Changed #
GET /mcp/contextnow passesMcpNavigatorObserver.instance.currentRoutetotoJson(), replacing the mechanically derived route from the screen name.mcpe2e.dartexportsMcpNavigatorObserver.
1.1.7 - 2026-03-10 #
Fixed #
inspect_uino longer crashes withConverting object to an encodable object failed: NaNduring UI transitions (language change, settings screens, mid-layout rebuilds)._position()now discards widget coordinates that are not finite — if aRenderBoxexists but layout has not completed, the widget appears in the tree withoutx/y/w/hinstead of crashing the JSON encoder.- Added recursive JSON sanitizer (
sanitizeList/Map/Value) applied to the fullinspect()output before returning — catches any non-finite double from any source (Slider.value, partial transforms, etc.) and converts it tonullsojsonEncodealways succeeds.
Added #
- 33 regression tests for
McpTreeInspector(test/core/tree_inspector_test.dart):- Group A (6):
round()— rounding precision + NaN/Inf propagation. - Group B (12):
sanitizeValue()— all types, nested Maps and Lists. - Group C (11):
inspect()— widget extraction for Text, TextField, ElevatedButton, AppBar, Checkbox, Switch; empty tree; structural consistency. - Group D (4): JSON regression —
jsonEncode(inspect())must never throw.
- Group A (6):
docs/writing-tests.md— LLM guide for writing script-mode and goal-mode tests, including templates, timing heuristics, decision tree, and coordinate calculation rules.
Changed #
- Internal sanitize helpers and
round()exposed as@visibleForTestingstatic methods for direct unit testing without requiring a widget tree.
1.1.6 - 2026-03-10 #
Changed #
- Version bump to 1.1.6 (sync with mcpe2e_server v1.1.6 — auto ADB forwarding + device watcher).
1.1.5 - 2026-03-10 #
1.1.4 - 2026-03-10 #
Changed #
- Version bump to 1.1.4 (sync with mcpe2e_server v1.1.4 — dialog interaction, coordinate gestures, loading-aware wait).
1.1.2 - 2026-03-10 #
1.1.1 - 2026-03-10 #
1.1.0 - 2026-03-10 #
1.0.7 - 2026-03-10 #
Added #
dart run mcpe2e:setup— one-command setup: downloadsmcpe2e_serverbinary for your platform and opens the interactive agent registration menu. No curl, no manual binary install. Run afterflutter pub get.
Changed #
- Version unified to 1.0.7 across all components (Flutter lib, MCP server, GitHub tags)
- Primary testing approach is now coordinate-based:
inspect_uireturns the full widget tree withx/y/w/hcoordinates;tap_attaps by absolute position without requiring widget registration - Minimal Flutter integration reduced to two lines in
main.dart: import +if (kDebugMode) await McpEventServer.start() McpMetadataKeyand widget registration are now optional — coordinate-based testing requires zero app changes beyond starting the server
1.0.0 [1.0.6] #
Internal development iterations (see git log)
0.3.4 - 2026-03-09 #
Added #
tapAtevent type — tap by absolute screen coordinates (logical pixels). No widget registration required. Useful for dynamic cards, list items, or any widget without an ID. Acceptsdx(X) anddy(Y) params. Coordinates match thex/yvalues frominspect_ui.McpEventParams.dxandMcpEventParams.dyfields for absolute coordinate taps.
0.3.1 - 2026-03-09 #
Fixed #
getRenderBoxnow finds widgets that useMcpMetadataKeydirectly as a key (withoutgetGlobalKey()). Added fallback element-tree walk: finds the first element whosewidget.key.idmatches, then returns its firstRenderBoxdescendant. Fix for tap/swipe/scroll that failed when the app usesconst McpMetadataKey(...)directly on widgets.
0.3.0 - 2026-03-09 #
Added #
McpTreeInspector— walks the full widget tree fromWidgetsBinding.rootElementwith zero intrusion. Reads Text values, TextField content, button labels/enabled state, Checkbox/Switch/Radio checked state, Slider current value, AppBar titles, AlertDialog and SnackBar presence. No widget registration required.McpScreenCapture— captures the current screen as PNG using Flutter's internal layer tree (renderViews.first.debugLayer). Zero widgets added to the tree. Returns{"error":"not_available_in_release"}gracefully in release builds.GET /mcp/treeendpoint — returns the full widget tree JSON viaMcpTreeInspectorGET /mcp/screenshotendpoint — returns the screen as PNG base64 viaMcpScreenCapture- Production guard in
McpEventServer.start(): exits immediately if not in debug or profile mode mcpe2e.dartexportsMcpTreeInspectorandMcpScreenCapture
0.2.0 - 2026-03-09 #
Added #
- 11 new event types:
toggle,setSliderValue,pressBack,clearText,scrollUntilVisible,tapByLabel,assertVisible,assertEnabled,assertSelected,assertValue,assertCount(total: 25 event types) - 5 new widget types:
checkbox,radio,switchWidget,slider,tab(total: 14 widget types) - New
McpEventParamsfields:sliderValue,targetKey,maxScrollAttempts,label,expectedCount McpWidgetRegistry— single source of truth for the registered widget map (core/mcp_widget_registry.dart)McpGestureSimulator— low-level pointer simulation isolated to its own class (core/mcp_gesture_simulator.dart)McpEventExecutor— all 25 event implementations using Dart 3 switch expressions (core/mcp_event_executor.dart)McpConnectivity— platform detection and automatic port forwarding (platform/mcp_connectivity.dart): ADB forward (Android), iproxy (iOS), direct localhost (Desktop), unsupported (Web)McpEventsredesigned as a thin facade delegating to the three core classes
Changed #
McpEventServerno longer handles ADB forwarding — moved toMcpConnectivityMcpEventServer._parseEventTypeuses Dart 3 switch expression, accepts both camelCase and snake_caseMcpEventServer.start()callsMcpConnectivity.setup()automatically on startup- All
if-elsechains replaced with Dart 3 switch expressions
Removed #
event_bridge.dart— redundant wrapper removed
0.1.0 - 2026-03-09 #
Added #
- Initial release as
mcpe2e(renamed frome2e_mcp) McpMetadataKey— extends Flutter'sKey, carries semantic metadata for MCP-testable widgetsMcpWidgetTypeenum (9 types: button, textField, text, list, card, image, container, dropdown, custom)McpEventTypeenum (14 types: tap, doubleTap, longPress, swipe, drag, scroll, pinch, textInput, selectDropdown, hideKeyboard, showKeyboard, wait, assertExists, assertText)McpEventParams— typed event parametersMcpEvents— singleton facade for widget registration and event executionMcpEventServer— embedded HTTP server with endpoints:/ping,/mcp/context,/action,/event,/widgets- 14 event implementations via
GestureBinding.instance.handlePointerEvent - Android ADB forwarding support