pub enum McpServerType {
Sse(String),
Stdio(String),
StreamableHttp(String),
}
Expand description
Defines the type of MCP server the agent can connect to.
This allows the agent to communicate with external tools over different transports:
Sse
for Server-Sent EventsStdio
for a child process over standard I/OStreamableHttp
for HTTP transport with streaming
Variants§
Sse(String)
Connect via Server-Sent Events at the provided URL.
Stdio(String)
Spawn and connect to a process over stdin/stdout pipes.
StreamableHttp(String)
Connect via a streaming HTTP endpoint.
Implementations§
Source§impl McpServerType
impl McpServerType
Sourcepub fn sse<S: Into<String>>(url: S) -> Self
pub fn sse<S: Into<String>>(url: S) -> Self
Creates an SSE-based MCP server type with the given URL.
Sourcepub fn stdio<S: Into<String>>(cmd: S) -> Self
pub fn stdio<S: Into<String>>(cmd: S) -> Self
Creates an stdio-based MCP server type with the given command.
Sourcepub fn streamable_http<S: Into<String>>(url: S) -> Self
pub fn streamable_http<S: Into<String>>(url: S) -> Self
Creates a streamable HTTP-based MCP server type with the given URL.
Trait Implementations§
Source§impl Clone for McpServerType
impl Clone for McpServerType
Source§fn clone(&self) -> McpServerType
fn clone(&self) -> McpServerType
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 McpServerType
impl Debug for McpServerType
Source§impl PartialEq for McpServerType
impl PartialEq for McpServerType
impl Eq for McpServerType
impl StructuralPartialEq for McpServerType
Auto Trait Implementations§
impl Freeze for McpServerType
impl RefUnwindSafe for McpServerType
impl Send for McpServerType
impl Sync for McpServerType
impl Unpin for McpServerType
impl UnwindSafe for McpServerType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.