#[non_exhaustive]pub enum McpTransport {
Stdio {
command: String,
args: Vec<String>,
env: BTreeMap<String, String>,
},
Http {
url: String,
headers: BTreeMap<String, String>,
},
Sse {
url: String,
headers: BTreeMap<String, String>,
},
}Expand description
How an MCP server is reached.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Stdio
Local subprocess launched via stdio (most common). The harness spawns
command with args, inheriting env overrides on top of the harness
environment.
Fields
Http
HTTP endpoint (Cursor and Claude support; many harnesses do not).
Fields
Sse
Server-sent-events endpoint.
Trait Implementations§
Source§impl Clone for McpTransport
impl Clone for McpTransport
Source§fn clone(&self) -> McpTransport
fn clone(&self) -> McpTransport
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for McpTransport
impl RefUnwindSafe for McpTransport
impl Send for McpTransport
impl Sync for McpTransport
impl Unpin for McpTransport
impl UnsafeUnpin for McpTransport
impl UnwindSafe for McpTransport
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