pub enum Transport {
Stdio,
Tcp,
Http,
}Expand description
Wire transport the server listens on. The JSON-RPC/MCP semantics are identical across all three — only the framing differs.
Variants§
Stdio
Newline-delimited JSON-RPC over stdin/stdout (default; for Claude Desktop / Claude Code and other process-spawning clients).
Tcp
Newline-delimited JSON-RPC over a TCP socket (one message per line), accepting many concurrent connections.
Http
MCP Streamable HTTP: POST JSON-RPC to /mcp (responses as JSON or, when
the client Accepts it, an SSE stream), plus GET /mcp for a standalone
server→client SSE stream.
Trait Implementations§
impl Copy for Transport
impl Eq for Transport
impl StructuralPartialEq for Transport
Auto Trait Implementations§
impl Freeze for Transport
impl RefUnwindSafe for Transport
impl Send for Transport
impl Sync for Transport
impl Unpin for Transport
impl UnsafeUnpin for Transport
impl UnwindSafe for Transport
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