pub struct SseTransportConfig {
pub url: String,
pub headers: Vec<(String, String)>,
}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.
§Example
use agentkit_mcp::SseTransportConfig;
let config = SseTransportConfig::new("https://mcp.example.com/sse")
.with_header("Authorization", "Bearer tok_abc123");Fields§
§url: StringThe SSE endpoint URL to connect to.
headers: Vec<(String, String)>Additional HTTP headers sent with every request (e.g. authentication tokens).
Implementations§
Trait Implementations§
Source§impl Clone for SseTransportConfig
impl Clone for SseTransportConfig
Source§fn clone(&self) -> SseTransportConfig
fn clone(&self) -> SseTransportConfig
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 moreSource§impl Debug for SseTransportConfig
impl Debug for SseTransportConfig
Source§impl PartialEq for SseTransportConfig
impl PartialEq for SseTransportConfig
impl Eq for SseTransportConfig
impl StructuralPartialEq for SseTransportConfig
Auto Trait Implementations§
impl Freeze for SseTransportConfig
impl RefUnwindSafe for SseTransportConfig
impl Send for SseTransportConfig
impl Sync for SseTransportConfig
impl Unpin for SseTransportConfig
impl UnsafeUnpin for SseTransportConfig
impl UnwindSafe for SseTransportConfig
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