From 8134513620f89fa8af02030fbcc509852d1bc59c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 1 Apr 2026 10:37:46 +0000 Subject: [PATCH 1/2] chore(deps): bump rmcp from 0.17.0 to 1.3.0 Bumps [rmcp](https://github.com/modelcontextprotocol/rust-sdk) from 0.17.0 to 1.3.0. - [Release notes](https://github.com/modelcontextprotocol/rust-sdk/releases) - [Changelog](https://github.com/modelcontextprotocol/rust-sdk/blob/main/release-plz.toml) - [Commits](https://github.com/modelcontextprotocol/rust-sdk/compare/rmcp-v0.17.0...rmcp-v1.3.0) --- updated-dependencies: - dependency-name: rmcp dependency-version: 1.3.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b505ae0..c1294bf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2490,9 +2490,9 @@ dependencies = [ [[package]] name = "rmcp" -version = "0.17.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0ce46f9101dc911f07e1468084c057839d15b08040d110820c5513312ef56a" +checksum = "2231b2c085b371c01bc90c0e6c1cab8834711b6394533375bdbf870b0166d419" dependencies = [ "async-trait", "base64", @@ -2525,9 +2525,9 @@ dependencies = [ [[package]] name = "rmcp-macros" -version = "0.17.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abad6f5f46e220e3bda2fc90fd1ad64c1c2a2bd716d52c845eb5c9c64cda7542" +checksum = "36ea0e100fadf81be85d7ff70f86cd805c7572601d4ab2946207f36540854b43" dependencies = [ "darling 0.23.0", "proc-macro2", From 2b08906aa962e4a2e6189c4b825ddf12f9ab9a59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E7=8E=AE=20=28Jade=20Lin=29?= Date: Fri, 1 May 2026 20:20:30 +0800 Subject: [PATCH 2/2] fix: adapt mcp code to rmcp 1.3 --- Cargo.toml | 2 +- src/mcp.rs | 35 +++++++++++++---------------------- 2 files changed, 14 insertions(+), 23 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 29b5724..904b520 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -65,7 +65,7 @@ tokio-util.workspace = true async-trait = "0.1.89" futures-core.workspace = true futures-util.workspace = true -rmcp = { version = "0.17", features = [ +rmcp = { version = "1.3", features = [ "client", "reqwest", "transport-streamable-http-client-reqwest", diff --git a/src/mcp.rs b/src/mcp.rs index b7768df..bb7cc90 100644 --- a/src/mcp.rs +++ b/src/mcp.rs @@ -243,17 +243,12 @@ impl McpManager { }); } }; + let request = match arguments { + Some(arguments) => CallToolRequestParams::new(payload.tool).with_arguments(arguments), + None => CallToolRequestParams::new(payload.tool), + }; let result = self - .with_timeout( - server, - timeout_ms, - peer.call_tool(CallToolRequestParams { - meta: None, - name: payload.tool.into(), - arguments, - task: None, - }), - ) + .with_timeout(server, timeout_ms, peer.call_tool(request)) .await?; let value = serialize_to_json_value(result, "tool result")?; Ok(value) @@ -655,11 +650,8 @@ pub(crate) mod tests { #[tool_handler] impl ServerHandler for TestMcpServer { fn get_info(&self) -> ServerInfo { - ServerInfo { - instructions: Some("Test MCP server".to_string()), - capabilities: ServerCapabilities::builder().enable_tools().build(), - ..Default::default() - } + ServerInfo::new(ServerCapabilities::builder().enable_tools().build()) + .with_instructions("Test MCP server") } } @@ -676,13 +668,12 @@ pub(crate) mod tests { StreamableHttpService::new( || Ok(TestMcpServer::new()), session_manager, - StreamableHttpServerConfig { - stateful_mode: true, - sse_keep_alive: None, - sse_retry: None, - json_response: false, - cancellation_token: CancellationToken::new(), - }, + StreamableHttpServerConfig::default() + .with_sse_keep_alive(None) + .with_sse_retry(None) + .with_stateful_mode(true) + .with_json_response(false) + .with_cancellation_token(CancellationToken::new()), ); let listener = TcpListener::bind("127.0.0.1:0") .await