McpEventServer class

HTTP server that exposes the E2E testing API to the external MCP server.

Runs inside the app in debug/profile mode. Listens on :7777 by default. Automatically stops when the app is closed (AppLifecycleState.detached). McpConnectivity configures platform forwarding on startup.

Constructors

McpEventServer()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

forwardPort int
Local port on the dev's PC for forwarding (default port + 1).
getter/setter pair
host String
Bind host. 0.0.0.0 allows access from ADB forward and iproxy.
getter/setter pair
port int
Port where the HTTP server listens inside the app (default 7777).
getter/setter pair

Static Methods

start({int? customPort, String? customHost, int? customForwardPort}) Future<void>
Starts the HTTP server and configures platform connectivity.
stop() Future<void>
Stops the HTTP server and removes the lifecycle observer.