adk_mcp_client (erlang_adk v0.10.0)
View SourceBounded MCP client for legacy stdio/Streamable HTTP and the explicit stateless 2026-07-28 Streamable HTTP era.
Each connection is an independent OTP worker. When erlang_adk is running, workers are temporary children of adk_mcp_client_sup; callers are never linked to remote MCP process failures.
Summary
Functions
Start a bounded FIFO pool of independently managed MCP clients.
Issue a negotiated method while keeping protocol metadata internal.
Build an adk_tool_executor-compatible call. Invocation context is not forwarded to the remote server, preventing scoped state or credential references from becoming MCP arguments accidentally.
Return MCP tools in the provider-facing adk_tool schema shape. This callback follows adk_toolset's list contract; discovery failure raises a bounded error which adk_toolset converts to toolset_unavailable rather than silently creating an agent with no remote tools.
Types
-type options() :: map().
Functions
-spec close(pid()) -> ok.
-spec close_pool(pid()) -> ok.
Start a bounded FIFO pool of independently managed MCP clients.
Issue a negotiated method while keeping protocol metadata internal.
Build an adk_tool_executor-compatible call. Invocation context is not forwarded to the remote server, preventing scoped state or credential references from becoming MCP arguments accidentally.
Return MCP tools in the provider-facing adk_tool schema shape. This callback follows adk_toolset's list contract; discovery failure raises a bounded error which adk_toolset converts to toolset_unavailable rather than silently creating an agent with no remote tools.
-spec start_link(term()) -> gen_server:start_ret().
-spec with_client(pid(), read_only | mutation, fun((pid()) -> term()), pos_integer()) -> term().