pub struct StreamableHttpTransportConfig {
pub url: String,
pub client: Option<Http>,
}Expand description
Configuration for an MCP server that communicates over Streamable HTTP.
Use this transport for modern remote MCP servers that expose a single HTTP endpoint supporting JSON-RPC over POST, with optional SSE responses for streaming server messages.
Auth headers and other per-request customisation live on the Http client
passed in via with_client.
Fields§
§url: StringThe MCP endpoint URL to connect to.
client: Option<Http>HTTP client used for all requests on this transport. When None, the
factory builds a default reqwest-backed client with agentkit’s user agent.
Implementations§
Source§impl StreamableHttpTransportConfig
impl StreamableHttpTransportConfig
Sourcepub fn new(url: impl Into<String>) -> Self
pub fn new(url: impl Into<String>) -> Self
Creates a new Streamable HTTP transport configuration for the given MCP endpoint.
Sourcepub fn with_client(self, client: Http) -> Self
pub fn with_client(self, client: Http) -> Self
Supplies a pre-configured HTTP client. See
SseTransportConfig::with_client for the typical use cases.
Trait Implementations§
Source§impl Clone for StreamableHttpTransportConfig
impl Clone for StreamableHttpTransportConfig
Source§fn clone(&self) -> StreamableHttpTransportConfig
fn clone(&self) -> StreamableHttpTransportConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for StreamableHttpTransportConfig
impl !RefUnwindSafe for StreamableHttpTransportConfig
impl Send for StreamableHttpTransportConfig
impl Sync for StreamableHttpTransportConfig
impl Unpin for StreamableHttpTransportConfig
impl UnsafeUnpin for StreamableHttpTransportConfig
impl !UnwindSafe for StreamableHttpTransportConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more