pub enum McpServerSource {
    Http {
        url: String,
        timeout_secs: Option<u64>,
        headers: Option<HashMap<String, String>>,
    },
    Process {
        command: String,
        args: Vec<String>,
        work_dir: Option<String>,
        env: Option<HashMap<String, String>>,
    },
    WebSocket {
        url: String,
        timeout_secs: Option<u64>,
        headers: Option<HashMap<String, String>>,
    },
}Expand description
Supported MCP server transport sources
Defines the different ways to connect to MCP servers, each optimized for specific use cases and deployment scenarios.
Variants§
Http
HTTP-based MCP server using JSON-RPC over HTTP
Best for: Public APIs, RESTful services, servers behind load balancers Features: SSE support, standard HTTP semantics, easy debugging
Fields
Process
Local process-based MCP server using stdin/stdout communication
Best for: Local tools, development servers, sandboxed environments Features: Process isolation, no network overhead, easy deployment
Fields
WebSocket
WebSocket-based MCP server for real-time bidirectional communication
Best for: Interactive applications, real-time data, low-latency requirements Features: Persistent connections, server-initiated notifications, minimal overhead
Trait Implementations§
Source§impl Clone for McpServerSource
 
impl Clone for McpServerSource
Source§fn clone(&self) -> McpServerSource
 
fn clone(&self) -> McpServerSource
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for McpServerSource
 
impl Debug for McpServerSource
Source§impl<'de> Deserialize<'de> for McpServerSource
 
impl<'de> Deserialize<'de> for McpServerSource
Source§fn deserialize<__D>(
    __deserializer: __D,
) -> Result<McpServerSource, <__D as Deserializer<'de>>::Error>where
    __D: Deserializer<'de>,
 
fn deserialize<__D>(
    __deserializer: __D,
) -> Result<McpServerSource, <__D as Deserializer<'de>>::Error>where
    __D: Deserializer<'de>,
Source§impl Serialize for McpServerSource
 
impl Serialize for McpServerSource
Source§fn serialize<__S>(
    &self,
    __serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
    __S: Serializer,
 
fn serialize<__S>(
    &self,
    __serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
    __S: Serializer,
Auto Trait Implementations§
impl Freeze for McpServerSource
impl RefUnwindSafe for McpServerSource
impl Send for McpServerSource
impl Sync for McpServerSource
impl Unpin for McpServerSource
impl UnwindSafe for McpServerSource
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
Source§impl<T> CloneToUninit for Twhere
    T: Clone,
 
impl<T> CloneToUninit for Twhere
    T: Clone,
§impl<T> Downcast for Twhere
    T: AsAny + ?Sized,
 
impl<T> Downcast for Twhere
    T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
    T: AsAny,
 
fn downcast_ref<T>(&self) -> Option<&T>where
    T: AsAny,
Any.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
    T: AsAny,
 
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
    T: AsAny,
Any.§impl<T> Instrument for T
 
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
 
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
 
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
 
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
 
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
 
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<F, T> IntoSample<T> for Fwhere
    T: FromSample<F>,
 
impl<F, T> IntoSample<T> for Fwhere
    T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> Pointable for T
 
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
    T: ?Sized,
 
impl<T> PolicyExt for Twhere
    T: ?Sized,
§impl<SS, SP> SupersetOf<SS> for SPwhere
    SS: SubsetOf<SP>,
 
impl<SS, SP> SupersetOf<SS> for SPwhere
    SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
 
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
 
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
 
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
 
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.