pub struct McpOptions { /* private fields */ }Expand description
Represents MCP client configuration options
Implementations§
Source§impl McpOptions
impl McpOptions
Sourcepub fn with_stdio<T>(self, command: &'static str, args: T) -> Selfwhere
T: IntoIterator<Item = &'static str>,
pub fn with_stdio<T>(self, command: &'static str, args: T) -> Selfwhere
T: IntoIterator<Item = &'static str>,
Sets stdio as a transport protocol
Sourcepub fn with_http<F: FnOnce(HttpClient) -> HttpClient>(self, config: F) -> Self
pub fn with_http<F: FnOnce(HttpClient) -> HttpClient>(self, config: F) -> Self
Sets Streamable HTTP as a transport protocol
Sourcepub fn with_default_http(self) -> Self
pub fn with_default_http(self) -> Self
Sets Streamable HTTP as a transport protocol with default configuration
Default:
- IP: 127.0.0.1
- PORT: 3000
- ENDPOINT: /mcp
Sourcepub fn with_version(self, ver: &str) -> Self
pub fn with_version(self, ver: &str) -> Self
Specifies MCP client version
Sourcepub fn with_mcp_version(self, ver: &'static str) -> Self
pub fn with_mcp_version(self, ver: &'static str) -> Self
Specifies Model Context Protocol version
Default: last available protocol version
Sourcepub fn with_roots<T>(self, config: T) -> Self
pub fn with_roots<T>(self, config: T) -> Self
Configures Roots capability
Sourcepub fn with_sampling<T>(self, config: T) -> Self
pub fn with_sampling<T>(self, config: T) -> Self
Configures Sampling capability
Sourcepub fn with_elicitation<T>(self, config: T) -> Self
pub fn with_elicitation<T>(self, config: T) -> Self
Configures Elicitation capability
Sourcepub fn with_tasks<T>(self, config: T) -> Self
pub fn with_tasks<T>(self, config: T) -> Self
Configures tasks capability
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Specifies request timeout
Default: 10 seconds
Trait Implementations§
Source§impl Debug for McpOptions
impl Debug for McpOptions
Auto Trait Implementations§
impl Freeze for McpOptions
impl !RefUnwindSafe for McpOptions
impl Send for McpOptions
impl Sync for McpOptions
impl Unpin for McpOptions
impl !UnwindSafe for McpOptions
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more