Skip to content

Commit 4c4daf0

Browse files
authored
feat: multi protocol version - phase 1 (#49)
1 parent fad8136 commit 4c4daf0

File tree

12 files changed

+40
-9
lines changed

12 files changed

+40
-9
lines changed

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ members = [
1818
# Workspace member crates
1919
rust-mcp-transport = { version = "0.3.3", path = "crates/rust-mcp-transport", default-features = false }
2020
rust-mcp-sdk = { path = "crates/rust-mcp-sdk", default-features = false }
21-
rust-mcp-macros = { version = "0.4.0", path = "crates/rust-mcp-macros" }
21+
rust-mcp-macros = { version = "0.4.0", path = "crates/rust-mcp-macros", default-features = false }
2222

2323
# External crates
24-
rust-mcp-schema = { version = "0.5" }
24+
rust-mcp-schema = { version = "0.5", default-features = false }
2525
futures = { version = "0.3" }
2626
tokio = { version = "1.4", features = ["full"] }
2727
serde = { version = "1.0", features = ["derive", "serde_derive"] }

crates/rust-mcp-macros/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ quote = "1.0"
2121
proc-macro2 = "1.0"
2222

2323
[dev-dependencies]
24-
rust-mcp-schema = { workspace = true }
24+
rust-mcp-schema = { workspace = true, default-features = false }
2525

2626
[lints]
2727
workspace = true
@@ -38,7 +38,7 @@ default = ["2025_03_26"] # Default features
3838
latest = ["2025_03_26"]
3939

4040
# enabled mcp schema version 2025_03_26
41-
2025_03_26 = ["rust-mcp-schema/2025_03_26"]
41+
2025_03_26 = ["rust-mcp-schema/2025_03_26","rust-mcp-schema/schema_utils"]
4242
# enabled mcp schema version 2024_11_05
43-
2024_11_05 = ["rust-mcp-schema/2024_11_05"]
43+
2024_11_05 = ["rust-mcp-schema/2024_11_05","rust-mcp-schema/schema_utils"]
4444
sdk = []

crates/rust-mcp-sdk/Cargo.toml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ license = "MIT"
1111
edition = "2021"
1212

1313
[dependencies]
14-
rust-mcp-schema = { workspace = true }
14+
rust-mcp-schema = { workspace = true, default-features=false }
1515
rust-mcp-transport = { workspace = true, default-features = false, optional = true }
16-
rust-mcp-macros = { workspace = true, optional = true, features = ["sdk"] }
16+
rust-mcp-macros = { workspace = true, optional = true, default-features=false, feature=["sdk"] }
1717

1818
tokio.workspace = true
1919
serde = { workspace = true }
@@ -46,6 +46,7 @@ default = [
4646
"macros",
4747
"hyper-server",
4848
"ssl",
49+
"2025_03_26"
4950
] # All features enabled by default
5051
server = ["rust-mcp-transport/stdio"] # Server feature
5152
client = ["rust-mcp-transport/stdio", "rust-mcp-transport/sse"] # Client feature
@@ -59,5 +60,17 @@ hyper-server = [
5960
ssl = ["axum-server/tls-rustls"]
6061
macros = ["rust-mcp-macros/sdk"]
6162

63+
# enabled mcp protocol version 2025_03_26
64+
2025_03_26 = ["rust-mcp-schema/2025_03_26",
65+
"rust-mcp-macros/2025_03_26",
66+
"rust-mcp-transport/2025_03_26",
67+
"rust-mcp-schema/schema_utils"]
68+
69+
# enabled mcp protocol version 2024_11_05
70+
2024_11_05 = ["rust-mcp-schema/2024_11_05",
71+
"rust-mcp-macros/2024_11_05",
72+
"rust-mcp-transport/2024_11_05",
73+
"rust-mcp-schema/schema_utils"]
74+
6275
[lints]
6376
workspace = true

crates/rust-mcp-transport/Cargo.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ license = "MIT"
1111
edition = "2021"
1212

1313
[dependencies]
14-
rust-mcp-schema = { workspace = true }
14+
15+
rust-mcp-schema = { workspace = true, default-features=false}
1516

1617
async-trait = { workspace = true }
1718
futures = { workspace = true }
@@ -34,7 +35,12 @@ workspace = true
3435

3536
### FEATURES #################################################################
3637
[features]
37-
default = ["stdio", "sse"] # Default features
38+
default = ["stdio", "sse","2025_03_26"] # Default features
3839

3940
stdio = []
4041
sse = ["reqwest"]
42+
# enabled mcp protocol version 2025_03_26
43+
2025_03_26 = ["rust-mcp-schema/2025_03_26","rust-mcp-schema/schema_utils"]
44+
45+
# enabled mcp protocol version 2024_11_05
46+
2024_11_05 = ["rust-mcp-schema/2024_11_05","rust-mcp-schema/schema_utils"]

examples/hello-world-mcp-server-core/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ license = "MIT"
1010
rust-mcp-sdk = { workspace = true, default-features = false, features = [
1111
"server",
1212
"macros",
13+
"2025_03_26"
1314
] }
1415

1516
tokio = { workspace = true }

examples/hello-world-mcp-server/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ rust-mcp-sdk = { workspace = true, default-features = false, features = [
1212
"macros",
1313
"hyper-server",
1414
"ssl",
15+
"2025_03_26"
1516
] }
1617

1718
tokio = { workspace = true }

examples/hello-world-server-core-sse/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ rust-mcp-sdk = { workspace = true, default-features = false, features = [
1111
"server",
1212
"macros",
1313
"hyper-server",
14+
"2025_03_26"
1415
] }
1516

1617
tokio = { workspace = true }

examples/hello-world-server-sse/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ rust-mcp-sdk = { workspace = true, default-features = false, features = [
1111
"server",
1212
"macros",
1313
"hyper-server",
14+
"2025_03_26"
1415
] }
1516

1617
tokio = { workspace = true }

examples/simple-mcp-client-core-sse/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ license = "MIT"
1010
rust-mcp-sdk = { workspace = true, default-features = false, features = [
1111
"client",
1212
"macros",
13+
"2025_03_26"
14+
1315
] }
1416

1517
tokio = { workspace = true }

examples/simple-mcp-client-core/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ license = "MIT"
1010
rust-mcp-sdk = { workspace = true, default-features = false, features = [
1111
"client",
1212
"macros",
13+
"2025_03_26"
14+
1315
] }
1416

1517
tokio = { workspace = true }

examples/simple-mcp-client-sse/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ license = "MIT"
1010
rust-mcp-sdk = { workspace = true, default-features = false, features = [
1111
"client",
1212
"macros",
13+
"2025_03_26"
14+
1315
] }
1416

1517
tokio = { workspace = true }

examples/simple-mcp-client/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ license = "MIT"
1010
rust-mcp-sdk = { workspace = true, default-features = false, features = [
1111
"client",
1212
"macros",
13+
"2025_03_26"
14+
1315
] }
1416

1517
tokio = { workspace = true }

0 commit comments

Comments
 (0)