httpClient

HttpClient used for the MCP connection. Must have the Ktor SSE plugin installed (the Streamable HTTP transport relies on it).

If null (default), a private HttpClient is created internally and closed automatically when the underlying MCP transport closes. If a custom client is provided, the caller retains full responsibility for its lifecycle (we do not close it).

Example:

val httpClient = HttpClient { install(SSE) }