mcpStreamableHttp

suspend fun HttpClient.mcpStreamableHttp(url: String, reconnectionTime: Duration? = null, requestBuilder: HttpRequestBuilder.() -> Unit = {}): Client(source)

Creates and connects an MCP client over Streamable HTTP using the provided HttpClient.

Return

A connected Client ready for MCP communication.

Parameters

url

URL of the MCP server.

reconnectionTime

Optional duration to wait before attempting to reconnect.

requestBuilder

Optional lambda to configure the HTTP request.