Skip to content

Commit efdce62

Browse files
committed
feat: support 2025-03-26
1 parent 5b8ac5e commit efdce62

File tree

13 files changed

+286
-78
lines changed

13 files changed

+286
-78
lines changed

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ body:
4242
id: version
4343
attributes:
4444
label: Version
45-
description: Specify which version of rust-mcp-schema you're using (e.g., latest, draft, or a specific version number).
45+
description: Specify which version of rust-mcp-schema you're using.
4646
render: text
4747
validations:
4848
required: false
4949
- type: textarea
5050
id: version
5151
attributes:
5252
label: MCP Schema Version
53-
description: Specify which version of mcp schema specification you're using (e.g., latest, draft, 2024_11_05).
53+
description: Specify which version of mcp schema specification you're using.
5454
render: text
5555
validations:
5656
required: false

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ features = ["latest", "schema_utils"]
3939
default = ["latest", "schema_utils"] # Default features
4040

4141
# activates the latest MCP schema version, this will be updated once a new version of schema is published
42-
latest = ["2024_11_05"]
42+
latest = ["2025_03_26"]
4343

44-
# enables the draft version of the mcp schema
45-
draft = []
44+
# enabled mcp schema version 2025_03_26
45+
2025_03_26 = []
4646
# enabled mcp schema version 2024_11_05
4747
2024_11_05 = []
4848
# Enables `schema_utils`, which provides utility types that simplify communication with MCP messages, improving ease of use while reducing potential mistakes ane errors when constructing messages.

README.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ A type-safe implementation of the official Model Context Protocol (MCP) schema i
1414
The MCP schemas in this repository are [automatically generated](#how-are-schemas-generated) from the official Model Context Protocol, ensuring they are always up-to-date and aligned with the latest official specifications.
1515

1616
---
17+
1718
**Note:** This crate **only** provides an implementation of the MCP schema.
1819

1920
<img align="top" src="assets/rust-mcp-stack-icon.png" width="24" style="border-radius:0.2rem;"> If you are looking for a high-performance, asynchronous toolkit for building MCP servers and clients, checkout [rust-mcp-sdk](https://crates.io/crates/rust-mcp-sdk).
@@ -27,7 +28,6 @@ Focus on your app's logic while [rust-mcp-sdk](https://crates.io/crates/rust-mcp
2728
- [How can this crate be used?](#how-can-this-crate-be-used)
2829

2930
- [Schema Versions](#schema-versions)
30-
- [Currently available versions](#currently-available-versions)
3131
- [How to switch between different schema versions?](#how-to-switch-between-different-schema-versions)
3232
- [How are Schemas generated?](#how-are-schemas-generated)
3333
- [What is `schema_utils`?](#what-is-schema_utils)
@@ -46,7 +46,7 @@ Focus on your app's logic while [rust-mcp-sdk](https://crates.io/crates/rust-mcp
4646

4747
- 🧩 Type-safe implementation of the MCP protocol specification.
4848
- 💎 Auto-generated schemas are always synchronized with the official schema specifications.
49-
- 📜 Includes all schema versions, including draft versions for early adoption.
49+
- 📜 Includes both schema versions : `2024_11_05` and `2025_03_26`.
5050
- 🛠 Complimentary schema utility module (schema_utils) to boost productivity and ensure development integrity.
5151

5252
## How can this crate be used?
@@ -68,25 +68,23 @@ For more information on the MCP architecture, refer to the [official documentati
6868

6969
## Schema Versions
7070

71-
This repository provides all versions of the schema, including draft versions, enabling you to prepare and adapt your applications ahead of upcoming official schema releases.
72-
73-
### Currently available versions
71+
This repository provides all versions of the schema, which can be selected using Cargo features:
7472

7573
- [2024_11_05](src/generated_schema/2024_11_05)
76-
- [Draft](src/generated_schema/draft)
74+
- [2025_03_26](src/generated_schema/2025_03_26)
7775

7876
### How to switch between different schema versions?
7977

8078
Each schema version has a corresponding Cargo feature that can be enabled in your project's Cargo.toml.
81-
By default, the latest version of the schema is active.
79+
By default, the version `2024_11_05` of the schema is active.
8280

83-
Example: enable `draft` version of the shema:
81+
Example: enable `2025_03_26` version of the shema:
8482

8583
<!-- x-release-please-start-version -->
8684

8785
```toml
8886
# Cargo.toml
89-
rust-mcp-schema = { version: 0.2.2 , features=["draft"] }
87+
rust-mcp-schema = { version: 0.2.2 , features=["2025_03_26"] }
9088
```
9189

9290
Example: enable `latest` version of the shema:

scripts/run_clippy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
COMMON_FEATURES=("schema_utils")
55

66
# schema versions features (passed to clippy one at a time)
7-
SCHEMA_VERSION_FEATURES=("2024_11_05" "draft")
7+
SCHEMA_VERSION_FEATURES=("2025_03_26", "2024_11_05")
88

99
# space-separated string
1010
COMMON_FEATURES_STR="${COMMON_FEATURES[*]}"

scripts/run_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
COMMON_FEATURES=("schema_utils")
55

66
# schema versions features (tested one at a time)
7-
SCHEMA_VERSION_FEATURES=("2024_11_05" "draft")
7+
SCHEMA_VERSION_FEATURES=("2025_03_26", "2024_11_05")
88

99
# space-separated string
1010
COMMON_FEATURES_STR="${COMMON_FEATURES[*]}"

src/generated_schema.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
/// Schema Version : Draft
2-
#[cfg(feature = "draft")]
3-
#[path = "generated_schema/draft/mcp_schema.rs"]
4-
mod schema_draft;
5-
#[cfg(feature = "draft")]
6-
pub use schema_draft::*;
7-
8-
#[cfg(all(feature = "schema_utils", feature = "draft"))]
9-
#[path = "generated_schema/draft/schema_utils.rs"]
10-
pub mod schema_utils;
11-
121
/// Schema Version : 2024_11_05
132
#[cfg(feature = "2024_11_05")]
14-
#[cfg(not(feature = "draft"))]
153
#[path = "generated_schema/2024_11_05/mcp_schema.rs"]
164
mod schema_2024_11_05;
17-
185
#[cfg(feature = "2024_11_05")]
19-
#[cfg(not(feature = "draft"))]
206
pub use schema_2024_11_05::*;
217

228
#[cfg(all(feature = "schema_utils", feature = "2024_11_05"))]
23-
#[cfg(not(feature = "draft"))]
249
#[path = "generated_schema/2024_11_05/schema_utils.rs"]
2510
pub mod schema_utils;
11+
12+
/// Schema Version : 2025_03_26
13+
#[cfg(feature = "2025_03_26")]
14+
#[cfg(not(feature = "2024_11_05"))]
15+
#[path = "generated_schema/2025_03_26/mcp_schema.rs"]
16+
mod schema_2025_03_26;
17+
18+
#[cfg(feature = "2025_03_26")]
19+
#[cfg(not(feature = "2024_11_05"))]
20+
pub use schema_2025_03_26::*;
21+
22+
#[cfg(all(feature = "schema_utils", feature = "2025_03_26"))]
23+
#[cfg(not(feature = "2024_11_05"))]
24+
#[path = "generated_schema/2025_03_26/schema_utils.rs"]
25+
pub mod schema_utils;

src/generated_schema/2024_11_05/mcp_schema.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/// ----------------------------------------------------------------------------
2-
/// This file is auto-generated by mcp-schema-gen v0.1.15.
2+
/// This file is auto-generated by mcp-schema-gen v0.1.16.
33
/// WARNING:
44
/// It is not recommended to modify this file directly. You are free to
55
/// modify or extend the implementations as needed, but please do so at your own risk.
66
///
77
/// Generated from : <https://github.com/modelcontextprotocol/specification.git>
8-
/// Hash : eb4abdf2bb91e0d5afd94510741eadd416982350
9-
/// Generated at : 2025-03-23 16:07:00
8+
/// Hash : 72516795d9a7aacdcf9b87624feb05229e10c950
9+
/// Generated at : 2025-04-03 19:11:35
1010
/// ----------------------------------------------------------------------------
1111
///
1212
/// MCP Protocol Version

0 commit comments

Comments
 (0)