From 42d7e0894a36d20c03af57445b0e5d9a2ed35cfc Mon Sep 17 00:00:00 2001 From: Minoru Osuka Date: Sun, 27 Sep 2026 09:26:54 +0900 Subject: [PATCH] fix(mcp): migrate from rmcp's deprecated ServerInfo to ServerConfig rmcp 3.4.0 added `ServerConfig` and deprecated the `ServerInfo` alias, whose name collided with the protocol's `serverInfo` field. Dependabot's #1226 moves rmcp from 3.2.0 to 3.4.1, and `cargo clippy -- -D warnings` then rejects `LaurusMcpServer::get_info`. Both aliases name `InitializeResult`, so the rename does not change behavior. `ServerConfig` does not exist before 3.4.0, so raise the workspace requirement to 3.4.1 and update the lock file to match. Closes #1228 --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- laurus-mcp/src/server.rs | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 24a714bc1..4a03a7ef9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4783,9 +4783,9 @@ dependencies = [ [[package]] name = "rmcp" -version = "3.2.0" +version = "3.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42b6914fac0be956fe704a38239c3f44a9f841d1b06a5713d2f638065593f5b5" +checksum = "5b6317cd8c13e3ec9033cf2aa5aa92cd743f0f4f8a93cddc42ea0ae6ce3b8898" dependencies = [ "base64 0.23.1", "chrono", @@ -4806,9 +4806,9 @@ dependencies = [ [[package]] name = "rmcp-macros" -version = "3.2.0" +version = "3.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf1c49bd4d52014b94db0877410db273c2008f01628b0252a2e9460ad9b7fda" +checksum = "d2ee366004e5f87c103be91c6c09337811517ae8d2f919ece9da7c21444b85c5" dependencies = [ "darling 0.24.0", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 73e320206..ada0c65a8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,7 +36,7 @@ laurus = { version = "0.13.2", path = "laurus", default-features = false } laurus-mcp = { version = "0.13.2", path = "laurus-mcp" } laurus-server = { version = "0.13.2", path = "laurus-server" } prost = "0.14.4" -rmcp = { version = "3.1.2", features = ["server", "transport-io"] } +rmcp = { version = "3.4.1", features = ["server", "transport-io"] } rustyline = "18.0.1" serde = { version = "1.0.229", features = ["derive"] } serde_json = "1.0.151" diff --git a/laurus-mcp/src/server.rs b/laurus-mcp/src/server.rs index b2c8f42d0..682e80b30 100644 --- a/laurus-mcp/src/server.rs +++ b/laurus-mcp/src/server.rs @@ -1048,8 +1048,8 @@ impl LaurusMcpServer { #[tool_handler] impl ServerHandler for LaurusMcpServer { - fn get_info(&self) -> ServerInfo { - ServerInfo::new(ServerCapabilities::builder().enable_tools().build()) + fn get_info(&self) -> ServerConfig { + ServerConfig::new(ServerCapabilities::builder().enable_tools().build()) .with_server_info(Implementation::from_build_env()) .with_instructions( "Laurus search engine MCP server (gRPC client). \