pub struct SseTransportConfig {
pub url: String,
pub client: Option<Http>,
}Expand description
Configuration for an MCP server that communicates over Server-Sent Events (SSE).
Use this transport for remote MCP servers exposed over HTTP. The client opens an
SSE stream to the given URL, receives an endpoint event pointing to the POST
endpoint, and then exchanges JSON-RPC messages over that endpoint.
Auth headers and other per-request customisation live on the Http client
— either via reqwest::ClientBuilder::default_headers or a custom
agentkit_http::HttpClient implementation — passed in through
with_client.
Fields§
§url: StringThe SSE 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 SseTransportConfig
impl SseTransportConfig
Sourcepub fn new(url: impl Into<String>) -> Self
pub fn new(url: impl Into<String>) -> Self
Creates a new SSE transport configuration for the given URL.
Sourcepub fn with_client(self, client: Http) -> Self
pub fn with_client(self, client: Http) -> Self
Supplies a pre-configured HTTP client. Use this to attach auth headers
(via reqwest::ClientBuilder::default_headers), install retry/tracing
middleware, or plug in a non-reqwest backend.
Trait Implementations§
Source§impl Clone for SseTransportConfig
impl Clone for SseTransportConfig
Source§fn clone(&self) -> SseTransportConfig
fn clone(&self) -> SseTransportConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more