pub enum McpServerConfig {
Stdio {
command: String,
args: Vec<String>,
env: BTreeMap<String, String>,
},
Url {
url: String,
sse: bool,
headers: BTreeMap<String, String>,
oauth: Option<OAuthClient>,
},
}Expand description
How to reach one MCP server.
Variants§
Stdio
A program on this computer, spoken to over stdio.
Url
A server at a URL (Streamable HTTP, or legacy HTTP+SSE).
Implementations§
Source§impl McpServerConfig
impl McpServerConfig
Sourcepub fn is_local(&self) -> bool
pub fn is_local(&self) -> bool
Stdio servers run unsandboxed local code; URL servers only talk to the network.
Sourcepub fn with_settings(&self, values: &BTreeMap<String, String>) -> Self
pub fn with_settings(&self, values: &BTreeMap<String, String>) -> Self
Fill ${KEY} placeholders in args, env values, the URL and headers from the
plugin’s settings. Unknown keys are left as they are.
Trait Implementations§
Source§impl Clone for McpServerConfig
impl Clone for McpServerConfig
Source§impl Debug for McpServerConfig
impl Debug for McpServerConfig
impl Eq for McpServerConfig
Source§impl PartialEq for McpServerConfig
impl PartialEq for McpServerConfig
Source§impl Serialize for McpServerConfig
impl Serialize for McpServerConfig
impl StructuralPartialEq for McpServerConfig
Auto Trait Implementations§
impl Forget for McpServerConfig
impl Freeze for McpServerConfigwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
*const LeafNode<String, String> is !null: Freeze,
PhantomData<(Owned, LeafOrInternal)>: Freeze,
PhantomData<Box<(String, String)>>: Freeze,
impl Move for McpServerConfig
impl RefUnwindSafe for McpServerConfig
impl Send for McpServerConfig
impl Sync for McpServerConfig
impl Unpin for McpServerConfig
impl UnsafeUnpin for McpServerConfigwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
*const LeafNode<String, String> is !null: UnsafeUnpin,
PhantomData<(Owned, LeafOrInternal)>: UnsafeUnpin,
PhantomData<Box<(String, String)>>: UnsafeUnpin,
impl UnwindSafe for McpServerConfig
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.