pub struct HttpConnectOptions { /* private fields */ }Expand description
Connection options for crate::McpToolset::connect_http.
Holds only non-secret configuration: the auth header name, the name of the environment variable supplying the secret value, and an optional custom CA bundle path. The secret value itself is resolved at connect time and is never retained here.
Implementations§
Source§impl HttpConnectOptions
impl HttpConnectOptions
Sourcepub fn with_auth_env_var(self, env_var: impl Into<String>) -> Self
pub fn with_auth_env_var(self, env_var: impl Into<String>) -> Self
Supply the auth secret from the named environment variable,
injected under Self::with_auth_header_name (default
Authorization). Resolution happens at connect time and fails
closed if the variable is unset or empty.
The value is sent verbatim — include any scheme prefix (e.g.
Bearer ) in the environment variable itself. Unlike some MCP
clients, no Bearer prefix is added for you.
Sourcepub fn with_auth_header_name(self, name: impl Into<String>) -> Self
pub fn with_auth_header_name(self, name: impl Into<String>) -> Self
Override the header name the resolved secret is sent under.
Sourcepub fn with_ca_bundle(self, path: impl Into<PathBuf>) -> Self
pub fn with_ca_bundle(self, path: impl Into<PathBuf>) -> Self
Add a custom CA bundle (PEM) to the client’s root store, for servers presenting a certificate from a private CA.
Sourcepub fn with_pii_bearing_tools(
self,
names: impl IntoIterator<Item = String>,
) -> Self
pub fn with_pii_bearing_tools( self, names: impl IntoIterator<Item = String>, ) -> Self
Declare which server-advertised tools handle PII so dispatch
redacts their audit records. Pass the ORIGINAL (un-namespaced)
tool names the remote server advertises — e.g. verify_claim,
NOT the mcp:<server_id>.verify_claim form the wrapped tool
reports from klieo_core::Tool::name. A flagged tool’s wrapped
form returns true from redacts_audit, so dispatch records a
redacted projection of its args/result instead of the raw values.
Trait Implementations§
Source§impl Clone for HttpConnectOptions
impl Clone for HttpConnectOptions
Source§fn clone(&self) -> HttpConnectOptions
fn clone(&self) -> HttpConnectOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more