Class WebClientStreamableHttpTransport

java.lang.Object
io.modelcontextprotocol.client.transport.WebClientStreamableHttpTransport
All Implemented Interfaces:
McpClientTransport, McpTransport

public class WebClientStreamableHttpTransport extends Object implements McpClientTransport
An implementation of the Streamable HTTP protocol as defined by the 2025-03-26 version of the MCP specification.

The transport is capable of resumability and reconnects. It reacts to transport-level session invalidation and will propagate appropriate exceptions to the higher level abstraction layer when needed in order to allow proper state management. The implementation handles servers that are stateful and provide session meta information, but can also communicate with stateless servers that do not provide a session identifier and do not support SSE streams.

This implementation does not handle backwards compatibility with the "HTTP with SSE" transport. In order to communicate over the phased-out 2024-11-05 protocol, use HttpClientSseClientTransport or WebFluxSseClientTransport.

Author:
Dariusz Jędrzejczyk
See Also: