streamableHttp
suspend fun streamableHttp(block: McpToolRegistryProvider.StreamableHttpConfig.() -> Unit): ToolRegistry(source)
Creates a ToolRegistry from a Streamable HTTP MCP server.
This is the recommended way to connect to remote MCP servers. Streamable HTTP supports bidirectional communication, session management, and reconnection.
If StreamableHttpConfig.httpClient is not set, a default HttpClient with the SSE plugin is created internally and closed automatically when the MCP transport closes. To reuse a single client across multiple MCP connections, set it explicitly — in that case the caller is responsible for closing it.
Return
A ToolRegistry containing all tools from the MCP server.
Parameters
block
Configuration block for the Streamable HTTP connection.