pub struct McpServerConfig {
pub address: SocketAddr,
pub workers: usize,
pub shutdown_timeout_ms: u64,
pub endpoint: String,
pub name: String,
pub version: String,
pub message_timeout_ms: u64,
pub stateful: bool,
pub session_idle_timeout_ms: u64,
pub event_replay_capacity: usize,
pub allowed_origins: Vec<String>,
}Expand description
Configuration for a Streamable HTTP endpoint.
Fields§
§address: SocketAddr§workers: usize§shutdown_timeout_ms: u64§endpoint: String§name: String§version: String§message_timeout_ms: u64§stateful: boolEnables MCP sessions and the GET/DELETE transport methods.
session_idle_timeout_ms: u64Idle sessions are rejected and lazily removed after this interval.
event_replay_capacity: usizeNumber of SSE events retained per session for Last-Event-ID replay.
allowed_origins: Vec<String>Permitted browser origins. An empty list rejects requests carrying an
Origin header while allowing non-browser clients.
Implementations§
Source§impl McpServerConfig
impl McpServerConfig
pub fn validate(&self) -> Result<(), McpConfigError>
Trait Implementations§
Source§impl Clone for McpServerConfig
impl Clone for McpServerConfig
Source§fn clone(&self) -> McpServerConfig
fn clone(&self) -> McpServerConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 McpServerConfig
impl Debug for McpServerConfig
Source§impl Default for McpServerConfig
impl Default for McpServerConfig
Source§impl<'de> Deserialize<'de> for McpServerConfigwhere
McpServerConfig: Default,
impl<'de> Deserialize<'de> for McpServerConfigwhere
McpServerConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for McpServerConfig
impl RefUnwindSafe for McpServerConfig
impl Send for McpServerConfig
impl Sync for McpServerConfig
impl Unpin for McpServerConfig
impl UnsafeUnpin for McpServerConfig
impl UnwindSafe for McpServerConfig
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