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;
11pub mod event_store;
12mod mcp_stream;
13mod message_dispatcher;
14mod schema;
15#[cfg(any(feature = "sse", feature = "streamable-http"))]
16mod sse;
17#[cfg(feature = "stdio")]
18mod stdio;
19mod transport;
20mod utils;
21
22#[cfg(feature = "sse")]
23pub use client_sse::*;
24#[cfg(feature = "streamable-http")]
25pub use client_streamable_http::*;
26pub use constants::*;
27pub use message_dispatcher::*;
28#[cfg(any(feature = "sse", feature = "streamable-http"))]
29pub use sse::*;
30#[cfg(feature = "stdio")]
31pub use stdio::*;
32pub use transport::*;
33
34// Type alias for session identifier, represented as a String
35pub type SessionId = String;
36// Type alias for stream identifier (that will be used at the transport scope), represented as a String
37pub type StreamId = String;
38// Type alias for event (MCP message) identifier, represented as a String
39pub type EventId = String;