Update to rmcp 3.1.0

rmcp left beta on 2026-07-28 and reached 3.1.0 on 2026-07-31, so the pin
moves off 3.0.0-beta.2.

get_info now sets server_info. ServerInfo::default() reports rmcp own crate
name and version, so the server was identifying itself as rmcp 3.1.0
rather than weather 1.0.0 as the other three quickstarts do.

The hand-written list_tools stays: rmcp-macros 3.1.0 still generates
ttl_ms: None, cache_scope: None, which a strict client rejects.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
olaservo 2026-08-01 11:08:28 -07:00
commit d6cf28629f
3 changed files with 33 additions and 18 deletions

View file

@ -91,6 +91,12 @@ version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
[[package]]
name = "base64"
version = "0.23.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b25655df2c3cdd83c5e5b293b88acd880332b2ddadd7c30ac43144fdc0033da9"
[[package]]
name = "bitflags"
version = "2.9.1"
@ -517,7 +523,7 @@ version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e"
dependencies = [
"base64",
"base64 0.22.1",
"bytes",
"futures-channel",
"futures-core",
@ -1045,7 +1051,7 @@ version = "0.12.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cbc931937e6ca3a06e3b6c0aa7841849b160a90351d6ab467a8b9b9959767531"
dependencies = [
"base64",
"base64 0.22.1",
"bytes",
"encoding_rs",
"futures-core",
@ -1095,12 +1101,12 @@ dependencies = [
[[package]]
name = "rmcp"
version = "3.0.0-beta.2"
version = "3.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3875f7c471c2d709062bc2165d8dc883b021b44255bd00bb4d8025f5108178c8"
checksum = "ad26b216c966e987e80e86daf784a455c039c43d98575ceed57b8faa259e5695"
dependencies = [
"async-trait",
"base64",
"base64 0.23.0",
"chrono",
"futures",
"pastey",
@ -1118,9 +1124,9 @@ dependencies = [
[[package]]
name = "rmcp-macros"
version = "3.0.0-beta.2"
version = "3.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "37a5ce7541aff2f3df9e8c3c48c7241800fa6fa68e2fbcba386c0d7dcdfc953c"
checksum = "41bc748630c2be2a71b614c2f40d27bc0df0060696d224e1692c72345b7e0b79"
dependencies = [
"darling",
"proc-macro2",

View file

@ -4,7 +4,7 @@ version = "0.1.0"
edition = "2024"
[dependencies]
rmcp = { version = "3.0.0-beta.2", features = ["server", "macros", "transport-io"] }
rmcp = { version = "3.1", features = ["server", "macros", "transport-io"] }
tokio = { version = "1.46", features = ["full"] }
reqwest = { version = "0.12", features = ["json"] }
serde = { version = "1.0", features = ["derive"] }

View file

@ -286,6 +286,9 @@ impl Weather {
impl ServerHandler for Weather {
fn get_info(&self) -> ServerInfo {
let mut info = ServerInfo::default();
// Without this the server reports rmcp's own crate name and version
// rather than its own.
info.server_info = Implementation::new("weather", "1.0.0");
info.capabilities = ServerCapabilities::builder().enable_tools().build();
info
}