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