mcp Streamable Http Transport
fun HttpClient.mcpStreamableHttpTransport(url: String, reconnectionTime: Duration? = null, requestBuilder: HttpRequestBuilder.() -> Unit = {}): StreamableHttpClientTransport(source)
Returns a new Streamable HTTP transport for the Model Context Protocol using the provided HttpClient.
Return
A StreamableHttpClientTransport configured for MCP communication.
Parameters
url
URL of the MCP server.
reconnection Time
Optional duration to wait before attempting to reconnect.
request Builder
Optional lambda to configure the HTTP request.