pub enum RawMcpServerConfig {
Stdio {
command: String,
args: Vec<String>,
env: HashMap<String, String>,
},
Http {
url: String,
headers: HashMap<String, String>,
},
Sse {
url: String,
headers: HashMap<String, String>,
},
InMemory {
args: Vec<String>,
input: Option<Value>,
},
}Expand description
Server connection definition
Variants§
Stdio
Http
Sse
InMemory
In-memory transport (Aether extension) - requires a registered factory The factory is looked up using the server name from the mcp.json key.
When input contains a "servers" key, this is treated as a tool-proxy
configuration: nested server configs are parsed and validated, producing
a McpServerConfig::ToolProxy at runtime.
Implementations§
Source§impl RawMcpServerConfig
impl RawMcpServerConfig
Sourcepub async fn into_config(
self,
name: String,
factories: &HashMap<String, ServerFactory>,
) -> Result<McpServerConfig, ParseError>
pub async fn into_config( self, name: String, factories: &HashMap<String, ServerFactory>, ) -> Result<McpServerConfig, ParseError>
Convert to runtime configuration with the provided factory registry
Trait Implementations§
Source§impl Clone for RawMcpServerConfig
impl Clone for RawMcpServerConfig
Source§fn clone(&self) -> RawMcpServerConfig
fn clone(&self) -> RawMcpServerConfig
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 RawMcpServerConfig
impl Debug for RawMcpServerConfig
Source§impl<'de> Deserialize<'de> for RawMcpServerConfig
impl<'de> Deserialize<'de> for RawMcpServerConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RawMcpServerConfig
impl RefUnwindSafe for RawMcpServerConfig
impl Send for RawMcpServerConfig
impl Sync for RawMcpServerConfig
impl Unpin for RawMcpServerConfig
impl UnsafeUnpin for RawMcpServerConfig
impl UnwindSafe for RawMcpServerConfig
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