McpClientKernelHost class

Implemented types

Constructors

McpClientKernelHost({String name = 'brain_kernel', String version = '0.1.0'})

Properties

connections → Iterable<KernelClientConnection>
Currently open connections.
no setteroverride
hashCode → int
The hash code for this object.
no setterinherited
name → String
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
version → String
final

Methods

adoptClient({required String id, required Client client}) → Future<KernelClientConnection>
Adopt a client the HOST already holds, under id.
override
connect({required String id, required KernelTransportKind transport, String? endpoint, Map<String, dynamic>? options}) → Future<KernelClientConnection>
Open a connection to a remote MCP server. The connection is identified by id (host-assigned URL, label, or other handle).
override
connectWith({required String id, required ClientTransport transport}) → Future<KernelClientConnection>
Open a connection over a host-supplied extension transport (serial / usb / ble / ws / tcp / custom), built outside the kernel and injected here. The kernel never depends on the transport's platform libraries — the host owns that (e.g. mcp_bridge's FFI transports). This is the injection seam: the seam lives in the kernel (pure, no FFI), the impl in the host.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shutdown() → Future<void>
Tear every connection down.
override
toString() → String
A string representation of this object.
inherited

Operators

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