One GenServer per configured MCP server (SPEC §2). Owns the transport
(stdio port or streamable-HTTP state), correlates JSON-RPC request ids with
per-call timeouts (config timeout, default 30000 ms), performs the
initialize handshake, paginates tools/list, executes tools/call, and
bridges inbound elicitation/create onto the host wait_for (§2 + §10):
form → kind:"input", URL → kind:"authorization"; no wait_for ⇒ decline.
The stdio child's lifetime is owned by this process (ADR-0007): it outlives
connect and is killed in terminate/2 on close/supervisor shutdown.
Summary
Functions
Call a tool by its ORIGINAL (unprefixed) name.
Returns a specification to start this module under a supervisor.
Connect + initialize. Bounded by the server timeout; returns :ok | {:error, reason}.
List all tool definitions, following nextCursor pagination.
The stdio child's OS pid (for lifetime assertions); :error for remote servers.
Functions
Call a tool by its ORIGINAL (unprefixed) name.
Returns a specification to start this module under a supervisor.
See Supervisor.
Connect + initialize. Bounded by the server timeout; returns :ok | {:error, reason}.
List all tool definitions, following nextCursor pagination.
The stdio child's OS pid (for lifetime assertions); :error for remote servers.