connectExtensionTransport method
Future<KernelClientConnection>
connectExtensionTransport({
- required String id,
- required ClientTransport transport,
Connect to an external MCP server (e.g. an embedded board) over a
host-supplied extension transport (serial / usb / ble / tcp / ws),
injected through the kernel seam (McpClientKernelHost.connectWith).
The transport is built outside the core (e.g. by mcp_bridge, the opt-in
FFI home) and must already be opened; appplayer_core itself stays free of
the transport's platform / FFI dependencies — the calling app owns those.
Returns a connection whose callTool / readResource / listTools
reach the remote server (e.g. led.set, ui://app).
The seam is resolved off the abstract KernelClientHost via the
canonical connectExtension helper — no concrete
client-host reference is held.
Implementation
Future<KernelClientConnection> connectExtensionTransport({
required String id,
required ClientTransport transport,
}) =>
connectExtension(_kernel?.clientHost, id: id, transport: transport);