StreamableHttpTransport

@Serializable
data class StreamableHttpTransport(val headers: Map<String, String>? = null, val sseReadTimeout: Duration? = null, val terminateOnClose: Boolean? = null, val timeout: Duration? = null, val url: String? = null)

A transport that can stream HTTP requests and responses. Next ID: 6. This data type is not supported in Vertex AI.

Constructors

Link copied to clipboard
constructor(headers: Map<String, String>? = null, sseReadTimeout: Duration? = null, terminateOnClose: Boolean? = null, timeout: Duration? = null, url: String? = null)

Properties

Link copied to clipboard
val headers: Map<String, String>? = null

Optional: Fields for authentication headers, timeouts, etc., if needed.

Link copied to clipboard
@Serializable(with = DurationStringSerializer::class)
val sseReadTimeout: Duration? = null

Timeout for SSE read operations.

Link copied to clipboard

Whether to close the client session when the transport closes.

Link copied to clipboard
@Serializable(with = DurationStringSerializer::class)
val timeout: Duration? = null

HTTP timeout for regular operations.

Link copied to clipboard
val url: String? = null

The full URL for the MCPServer endpoint. Example: "https://api.example.com/mcp".