barrel_mcp_client_stdio (barrel_mcp v2.0.2)

View Source

stdio transport for barrel_mcp_client.

Spawns the configured executable as an Erlang port, frames stdin as line-delimited JSON-RPC, and forwards each complete line to the owning client gen_statem as {mcp_in, self(), Json}.

A line is "complete" when cowboy delivers {eol, _}; partial reads ({noeol, _}) are buffered until the matching {eol, _} arrives. The default 1 MiB line limit matches the previous in-process implementation.

Summary

Functions

close(Pid)

code_change(OldVsn, State, Extra)

connect(Owner, Opts)

handle_call(Msg, From, State)

handle_cast(Msg, State)

handle_info(Msg, State)

init(_)

send(Pid, Body)

terminate(Reason, State)