pub struct HttpOptions {
pub host: String,
pub port: u16,
pub auth: AuthMode,
pub extra_allowed_hosts: Vec<String>,
}Expand description
Transport-level options for the MCP HTTP server.
Distinct from McpConfig, which is per-session server behaviour cloned
into every connection. These are resolved once at startup: where to bind,
the bearer-token auth mode, and any operator-added Host/Origin allowlist
entries beyond loopback.
Fields§
§host: String§port: u16§auth: AuthMode§extra_allowed_hosts: Vec<String>Extra hosts to accept beyond the loopback default. Each entry also adds
a matching http://<host> origin. Empty preserves loopback-only.
Trait Implementations§
Source§impl Clone for HttpOptions
impl Clone for HttpOptions
Source§fn clone(&self) -> HttpOptions
fn clone(&self) -> HttpOptions
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 moreAuto Trait Implementations§
impl Freeze for HttpOptions
impl RefUnwindSafe for HttpOptions
impl Send for HttpOptions
impl Sync for HttpOptions
impl Unpin for HttpOptions
impl UnsafeUnpin for HttpOptions
impl UnwindSafe for HttpOptions
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