Skip to main content

rust_mcp_transport/
lib.rs

1// Copyright (c) 2025 mcp-rust-stack
2// Licensed under the MIT License. See LICENSE file for details.
3// Modifications to this file must be documented with a description of the changes made.
4
5#[cfg(feature = "sse")]
6mod client_sse;
7#[cfg(feature = "streamable-http")]
8mod client_streamable_http;
9mod constants;
10pub mod error;
11mod mcp_stream;
12mod message_dispatcher;
13mod schema;
14#[cfg(any(feature = "sse", feature = "streamable-http"))]
15mod sse;
16#[cfg(feature = "stdio")]
17mod stdio;
18mod transport;
19mod utils;
20
21#[cfg(feature = "sse")]
22pub use client_sse::*;
23#[cfg(feature = "streamable-http")]
24pub use client_streamable_http::*;
25pub use constants::*;
26pub use message_dispatcher::*;
27#[cfg(any(feature = "sse", feature = "streamable-http"))]
28pub use sse::*;
29#[cfg(feature = "stdio")]
30pub use stdio::*;
31pub use transport::*;
32
33#[cfg(any(feature = "sse", feature = "streamable-http"))]
34pub use utils::SseEvent;
35
36// Type alias for session identifier, represented as a String
37pub type SessionId = String;
38// Type alias for stream identifier (that will be used at the transport scope), represented as a String
39pub type StreamId = String;
40
41// Type alias for event (MCP message) identifier, represented as a String
42pub type EventId = String;