mcpe2e 0.3.1
mcpe2e: ^0.3.1 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 #
0.3.1 - 2026-03-09 #
Fixed #
getRenderBoxahora encuentra widgets que usanMcpMetadataKeydirectamente como key (singetGlobalKey()). Agrega fallback de element-tree walk: busca el primer elemento cuyowidget.key.idcoincida, luego retorna su primerRenderBoxdescendiente. Fix para tap/swipe/scroll que fallaban cuando la app usaconst McpMetadataKey(...)directo en 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