diff --git a/Cargo.lock b/Cargo.lock index 55fb178..bd0b2c3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -380,6 +380,12 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" + [[package]] name = "bit-set" version = "0.5.3" @@ -1084,6 +1090,16 @@ dependencies = [ "darling_macro 0.23.0", ] +[[package]] +name = "darling" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed17f5901b6630b993ca003def43f2f8ef4014fc13b047b57aad617ff32bc2ec" +dependencies = [ + "darling_core 0.24.1", + "darling_macro 0.24.1", +] + [[package]] name = "darling_core" version = "0.11.0" @@ -1125,6 +1141,19 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "darling_core" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6837e2cf7485aaae18f86181d2f0e9a7ed297a025e220aeabf63fdebd3a2ddff" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim 0.11.1", + "syn 3.0.3", +] + [[package]] name = "darling_macro" version = "0.11.0" @@ -1158,6 +1187,17 @@ dependencies = [ "syn 2.0.119", ] +[[package]] +name = "darling_macro" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ac7135c3ef02b2f7833bbeb1be5ba7f966dcde8a87c6b87f65a778d71a02785" +dependencies = [ + "darling_core 0.24.1", + "quote", + "syn 3.0.3", +] + [[package]] name = "dary_heap" version = "0.3.9" @@ -1621,7 +1661,7 @@ dependencies = [ "thiserror 2.0.19", "tokio", "tokio-stream", - "tower-http", + "tower-http 0.7.0", "tracing", "tracing-subscriber", "uuid 1.24.0", @@ -1641,7 +1681,7 @@ dependencies = [ "serde_json", "thiserror 2.0.19", "tokio", - "tower-http", + "tower-http 0.7.0", "tracing", "tracing-subscriber", "uuid 1.24.0", @@ -4280,7 +4320,7 @@ dependencies = [ "tokio-rustls", "tokio-util", "tower", - "tower-http", + "tower-http 0.6.11", "tower-service", "url", "wasm-bindgen", @@ -4325,7 +4365,7 @@ dependencies = [ "tokio-rustls", "tokio-util", "tower", - "tower-http", + "tower-http 0.6.11", "tower-service", "url", "wasm-bindgen", @@ -4356,12 +4396,12 @@ dependencies = [ [[package]] name = "rmcp" -version = "1.8.0" +version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1f571c72940a19d9532fe52dbea8bc9912bf1d766c2970bb824056b86f3f59" +checksum = "c8dddc5b1924b9a59fba420166160ca2c4663a4e01803e52eda33070f56d63c8" dependencies = [ "async-trait", - "base64 0.22.1", + "base64 0.23.1", "bytes", "chrono", "futures", @@ -4387,15 +4427,15 @@ dependencies = [ [[package]] name = "rmcp-macros" -version = "1.8.0" +version = "3.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aad0035b69380782d78ea95b508327e6deaa2235909053e596eea8f27b5e1d5" +checksum = "a85d45508e9b4ba024fe996c2638799635d75b6dd0ba8f32ccf08f8026f0c780" dependencies = [ - "darling 0.23.0", + "darling 0.24.1", "proc-macro2", "quote", "serde_json", - "syn 2.0.119", + "syn 3.0.3", ] [[package]] @@ -6094,10 +6134,26 @@ dependencies = [ "tower", "tower-layer", "tower-service", - "tracing", "url", ] +[[package]] +name = "tower-http" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b11f75e912b0c2be01b63d8cf8057b8c3f97cf34abb3d431a3a4c8675498e233" +dependencies = [ + "bitflags 2.13.1", + "bytes", + "http", + "http-body", + "percent-encoding", + "pin-project-lite", + "tower-layer", + "tower-service", + "tracing", +] + [[package]] name = "tower-layer" version = "0.3.3" diff --git a/Cargo.toml b/Cargo.toml index 3c5bcbc..88406d5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ sqlx = { version = "0.9", features = ["runtime-tokio", "postgres", "uuid", "chro thiserror = "2" tokio = { version = "1", features = ["full"] } tokio-stream = "0.1" -tower-http = { version = "0.6", features = ["cors", "trace"] } +tower-http = { version = "0.7", features = ["cors", "trace"] } tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["env-filter"] } uuid = { version = "1", features = ["v4", "serde"] } diff --git a/crates/mcp/Cargo.toml b/crates/mcp/Cargo.toml index f70fd08..97a5fd1 100644 --- a/crates/mcp/Cargo.toml +++ b/crates/mcp/Cargo.toml @@ -24,9 +24,9 @@ uuid.workspace = true # rmcp uses axum 0.8 internally; we match it in this crate so nest_service # composes correctly. (crates/server stays on axum 0.7.) axum = { version = "0.8", features = ["macros"] } -tower-http = { version = "0.6", features = ["cors", "trace"] } +tower-http = { version = "0.7", features = ["cors", "trace"] } schemars = "1.0" -rmcp = { version = "1.7", features = [ +rmcp = { version = "3.1", features = [ "server", "macros", "transport-streamable-http-server", diff --git a/crates/mcp/src/main.rs b/crates/mcp/src/main.rs index 38809a1..51eabfe 100644 --- a/crates/mcp/src/main.rs +++ b/crates/mcp/src/main.rs @@ -13,7 +13,8 @@ use reqwest::Client; use rmcp::{ handler::server::{router::tool::ToolRouter, wrapper::Parameters}, model::{ - CallToolResult, Content, Implementation, ProtocolVersion, ServerCapabilities, ServerInfo, + CallToolResult, ContentBlock, Implementation, ProtocolVersion, ServerCapabilities, + ServerInfo, }, schemars, service::RequestContext, @@ -452,7 +453,7 @@ fn result_ok(value: Value) -> Result { // Serialize as text content for clients that only consume `content`. // Most up-to-date MCP clients ALSO read `structured_content` when present. let text = serde_json::to_string(&value).unwrap_or_else(|_| "{}".into()); - let mut result = CallToolResult::success(vec![Content::text(text)]); + let mut result = CallToolResult::success(vec![ContentBlock::text(text)]); result.structured_content = Some(value); Ok(result) }