Skip to main content

Module client

Module client 

Source
Expand description

A no-iroh mcpmesh-local/1 client: connect the UDS, read the server’s Hello first frame, assert the api name, then issue typed request/response frames. Distinct from the CLI crate (cli/)’s ControlClient (which uses mcpmesh_net::framing) — this one links no iroh, so kb and the host shell can use it. kb calls this to self-register its [services.kb] socket backend with the running mcpmesh daemon.

Structs§

ControlClient
A connected mcpmesh-local/1 client: the framed UDS stream + the server’s Hello.
StreamSubscription
A live Request::Subscribe stream yielding typed StreamFrames (snapshot, then events/lagged notices) until the daemon side closes. Holds the connection’s write half for its lifetime — a subscriber only reads, but dropping the writer would half-close the socket. Drop the subscription to disconnect (there is no request channel back).

Enums§

ClientError
The error surface of the client — thin, so callers can anyhow-wrap it.

Functions§

connect_control
Connect + complete the hello handshake, asserting the api name is mcpmesh-local/1.
connect_control_default
connect_control at the platform default endpoint (crate::paths::default_endpoint): the quickstart front door — a consumer dials the running daemon without reimplementing the platform endpoint rule. Resolution failure surfaces as ClientError::Io (NotFound), same as a daemon that is not running.