Skip to content

Commit 6ebce5a

Browse files
committed
fix: incorrect versions
1 parent d56d378 commit 6ebce5a

File tree

7 files changed

+12
-10
lines changed

7 files changed

+12
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ async fn main() -> SdkResult<()> {
212212
name: "simple-rust-mcp-client".into(),
213213
version: "0.1.0".into(),
214214
},
215-
protocol_version: JSONRPC_VERSION.into(),
215+
protocol_version: LATEST_PROTOCOL_VERSION.into(),
216216
};
217217

218218
// Step3 : Create a transport, with options to launch @modelcontextprotocol/server-everything MCP Server

crates/rust-mcp-sdk/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ async fn main() -> SdkResult<()> {
212212
name: "simple-rust-mcp-client".into(),
213213
version: "0.1.0".into(),
214214
},
215-
protocol_version: JSONRPC_VERSION.into(),
215+
protocol_version: LATEST_PROTOCOL_VERSION.into(),
216216
};
217217

218218
// Step3 : Create a transport, with options to launch @modelcontextprotocol/server-everything MCP Server

crates/rust-mcp-sdk/src/utils.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ pub fn format_assertion_message(entity: &str, capability: &str, method_name: &st
7171
/// if client == "2025_03_26" && server == "2024_11_05"
7272
/// ));
7373
/// ```
74+
#[allow(unused)]
7475
pub fn ensure_server_protocole_compatibility(
7576
client_protocol_version: &str,
7677
server_protocol_version: &str,
@@ -127,6 +128,7 @@ pub fn ensure_server_protocole_compatibility(
127128
/// if client == "2025_03_26" && server == "2024_11_05"
128129
/// ));
129130
/// ```
131+
#[allow(unused)]
130132
pub fn enforce_compatible_protocol_version(
131133
client_protocol_version: &str,
132134
server_protocol_version: &str,

examples/simple-mcp-client-core-sse/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use handler::MyClientHandler;
55

66
use inquiry_utils::InquiryUtils;
77
use rust_mcp_schema::{
8-
ClientCapabilities, Implementation, InitializeRequestParams, JSONRPC_VERSION,
8+
ClientCapabilities, Implementation, InitializeRequestParams, LATEST_PROTOCOL_VERSION,
99
};
1010
use rust_mcp_sdk::error::SdkResult;
1111
use rust_mcp_sdk::mcp_client::client_runtime_core;
@@ -33,7 +33,7 @@ async fn main() -> SdkResult<()> {
3333
name: "simple-rust-mcp-client-core-sse".into(),
3434
version: "0.1.0".into(),
3535
},
36-
protocol_version: JSONRPC_VERSION.into(),
36+
protocol_version: LATEST_PROTOCOL_VERSION.into(),
3737
};
3838

3939
// Step2 : Create a transport, with options to launch/connect to a MCP Server

examples/simple-mcp-client-core/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use handler::MyClientHandler;
55

66
use inquiry_utils::InquiryUtils;
77
use rust_mcp_schema::{
8-
ClientCapabilities, Implementation, InitializeRequestParams, JSONRPC_VERSION,
8+
ClientCapabilities, Implementation, InitializeRequestParams, LATEST_PROTOCOL_VERSION,
99
};
1010
use rust_mcp_sdk::{error::SdkResult, mcp_client::client_runtime_core};
1111
use rust_mcp_sdk::{McpClient, StdioTransport, TransportOptions};
@@ -22,7 +22,7 @@ async fn main() -> SdkResult<()> {
2222
name: "simple-rust-mcp-client-core".into(),
2323
version: "0.1.0".into(),
2424
},
25-
protocol_version: JSONRPC_VERSION.into(),
25+
protocol_version: LATEST_PROTOCOL_VERSION.into(),
2626
};
2727

2828
// Step2 : Create a transport, with options to launch/connect to a MCP Server

examples/simple-mcp-client-sse/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use handler::MyClientHandler;
55

66
use inquiry_utils::InquiryUtils;
77
use rust_mcp_schema::{
8-
ClientCapabilities, Implementation, InitializeRequestParams, JSONRPC_VERSION,
8+
ClientCapabilities, Implementation, InitializeRequestParams, LATEST_PROTOCOL_VERSION,
99
};
1010
use rust_mcp_sdk::error::SdkResult;
1111
use rust_mcp_sdk::mcp_client::client_runtime;
@@ -33,7 +33,7 @@ async fn main() -> SdkResult<()> {
3333
name: "simple-rust-mcp-client-sse".into(),
3434
version: "0.1.0".into(),
3535
},
36-
protocol_version: JSONRPC_VERSION.into(),
36+
protocol_version: LATEST_PROTOCOL_VERSION.into(),
3737
};
3838

3939
// Step2 : Create a transport, with options to launch/connect to a MCP Server

examples/simple-mcp-client/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use handler::MyClientHandler;
55

66
use inquiry_utils::InquiryUtils;
77
use rust_mcp_schema::{
8-
ClientCapabilities, Implementation, InitializeRequestParams, JSONRPC_VERSION,
8+
ClientCapabilities, Implementation, InitializeRequestParams, LATEST_PROTOCOL_VERSION,
99
};
1010
use rust_mcp_sdk::error::SdkResult;
1111
use rust_mcp_sdk::mcp_client::client_runtime;
@@ -23,7 +23,7 @@ async fn main() -> SdkResult<()> {
2323
name: "simple-rust-mcp-client".into(),
2424
version: "0.1.0".into(),
2525
},
26-
protocol_version: JSONRPC_VERSION.into(),
26+
protocol_version: LATEST_PROTOCOL_VERSION.into(),
2727
};
2828

2929
// Step2 : Create a transport, with options to launch/connect to a MCP Server

0 commit comments

Comments
 (0)