pub enum McpVersion {
V2024_11_05,
V2025_03_26,
V2025_06_18,
V2025_11_25,
}Expand description
Supported MCP protocol versions
Variants§
V2024_11_05
Original protocol without streamable HTTP (introduced 2024-11-05)
V2025_03_26
Protocol including streamable HTTP (introduced 2025-03-26)
V2025_06_18
Protocol with structured _meta, cursor, progressToken, and elicitation (introduced 2025-06-18)
V2025_11_25
Protocol with tasks, icons, URL elicitation, and sampling tools (introduced 2025-11-25)
Implementations§
Source§impl McpVersion
impl McpVersion
Sourcepub const LATEST: McpVersion = McpVersion::V2025_11_25
pub const LATEST: McpVersion = McpVersion::V2025_11_25
The latest protocol version implemented by this crate
Sourcepub const CURRENT: McpVersion = McpVersion::V2025_11_25
pub const CURRENT: McpVersion = McpVersion::V2025_11_25
The current protocol version implemented by this crate
Sourcepub fn supports_streamable_http(&self) -> bool
pub fn supports_streamable_http(&self) -> bool
Returns whether this version supports streamable HTTP (SSE)
Sourcepub fn supports_meta_fields(&self) -> bool
pub fn supports_meta_fields(&self) -> bool
Returns whether this version supports _meta fields in requests, responses, and notifications
Sourcepub fn supports_progress_and_cursor(&self) -> bool
pub fn supports_progress_and_cursor(&self) -> bool
Returns whether this version supports the use of progressToken and cursor in _meta
Sourcepub fn supports_elicitation(&self) -> bool
pub fn supports_elicitation(&self) -> bool
Returns whether this version supports structured user elicitation via JSON Schema
Sourcepub fn supports_tasks(&self) -> bool
pub fn supports_tasks(&self) -> bool
Returns whether this version supports the task system (experimental)
Sourcepub fn supports_icons(&self) -> bool
pub fn supports_icons(&self) -> bool
Returns whether this version supports icons on tools, resources, prompts, and implementation
Sourcepub fn supports_url_elicitation(&self) -> bool
pub fn supports_url_elicitation(&self) -> bool
Returns whether this version supports URL mode elicitation
Sourcepub fn supports_sampling_tools(&self) -> bool
pub fn supports_sampling_tools(&self) -> bool
Returns whether this version supports tools in sampling requests
Sourcepub fn supported_features(&self) -> Vec<&'static str>
pub fn supported_features(&self) -> Vec<&'static str>
Get a list of feature names supported by this version
Trait Implementations§
Source§impl Clone for McpVersion
impl Clone for McpVersion
Source§fn clone(&self) -> McpVersion
fn clone(&self) -> McpVersion
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for McpVersion
impl Debug for McpVersion
Source§impl Default for McpVersion
impl Default for McpVersion
Source§fn default() -> McpVersion
fn default() -> McpVersion
Source§impl<'de> Deserialize<'de> for McpVersion
impl<'de> Deserialize<'de> for McpVersion
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<McpVersion, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<McpVersion, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl Display for McpVersion
impl Display for McpVersion
Source§impl FromStr for McpVersion
impl FromStr for McpVersion
Source§impl Hash for McpVersion
impl Hash for McpVersion
Source§impl Ord for McpVersion
impl Ord for McpVersion
Source§fn cmp(&self, other: &McpVersion) -> Ordering
fn cmp(&self, other: &McpVersion) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for McpVersion
impl PartialEq for McpVersion
Source§impl PartialOrd for McpVersion
impl PartialOrd for McpVersion
Source§impl Serialize for McpVersion
impl Serialize for McpVersion
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for McpVersion
impl Eq for McpVersion
impl StructuralPartialEq for McpVersion
Auto Trait Implementations§
impl Freeze for McpVersion
impl RefUnwindSafe for McpVersion
impl Send for McpVersion
impl Sync for McpVersion
impl Unpin for McpVersion
impl UnsafeUnpin for McpVersion
impl UnwindSafe for McpVersion
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<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
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more