streamableHttp
fun streamableHttp(url: String, httpClient: HttpClient, mcpToolParser: McpToolDescriptorParser = DefaultMcpToolDescriptorParser, name: String = DEFAULT_MCP_CLIENT_NAME, version: String = DEFAULT_MCP_CLIENT_VERSION)(source)
Registers tools from an MCP server via Streamable HTTP transport.
This is the recommended way to connect to remote MCP servers. Streamable HTTP supports bidirectional communication, session management, and reconnection.
Parameters
url
The URL of the MCP server (e.g., "http://localhost:3000/mcp").
httpClient
The HttpClient to use for the MCP connection. Must have the Ktor SSE plugin installed. Lifecycle is managed by the caller — the same client can be reused across multiple MCP connections.
mcpToolParser
A parser for converting the MCP SDK tool definitions into a standardized format.
name
The name of the MCP client.
version
The version of the MCP client.