chore(deps): migrate rmcp and rmcp-macros to 3.1.4 in lockstep - #6995
Merged
Conversation
added 2 commits
August 25, 2026 16:19
rmcp 1.5.0 -> 3.1.4 crosses two majors of MCP SDK churn. The macro crate must move in exact lockstep with the runtime because its expansion calls rmcp runtime APIs directly; a lock regeneration that moved one without the other broke every #[tool] site in #6502, so this supersedes the two single-crate dependabot PRs (#6968 for rmcp, #6973 for rmcp-macros) with one atomic change. Exact pins are kept at =3.1.4 and the lockstep WARNING on the diaporeia manifest is preserved. API adaptations, verified against the published 3.1.4 crate sources: - rmcp::model::Content was removed; the unified content union is now ContentBlock (ContentBlock::text across diaporeia and aletheia-memory-mcp tool implementations). - RawResource/RawResourceTemplate are gone; Resource/ResourceTemplate are flat structs built via ::new + with_* builders. - ListResourcesResult/ListResourceTemplatesResult gained SEP-2322 resultType and SEP-2549 ttl/cache fields; struct literals replaced with the ::with_all_items constructor. - ServerHandler::read_resource now returns the MRTR enum ReadResourceResponse; the complete result is wrapped via From. - Peer<RoleClient>::call_tool was removed; RunningService::call_tool is the high-level path and also drives SEP-2322 input_required rounds through the local client handler. - StreamableHttpServerConfig::with_stateful_mode was renamed to with_legacy_session_mode (SEP-2567: the 2026-07-28 draft version is always served statelessly). - Tool/ToolAnnotations are #[non_exhaustive]; the external_tools test helper uses Tool::new_with_raw + ToolAnnotations::from_raw. - The streamable HTTP server now validates the Host header by default (DNS-rebinding hardening); transport tests that assert a request reaches the MCP protocol layer send Host: localhost so their 400 still originates from the layer they describe. - generate-diaporeia-mcp-inventory.py accepts the ResourceTemplate::new constructor shape so the committed-inventory drift gate keeps seeing all six resource templates.
rmcp 3.x's streamable HTTP server answers a missing/insufficient Accept header with 406 Not Acceptable (spec-correct content negotiation) where 1.5.0 answered 400. The three transport tests assert that a request clears the auth middleware and reaches the MCP protocol layer; a 406 from the service's Accept check proves exactly that, same as the 400 did. The Host header added in the parent commit is what lets the request reach the Accept check past the new DNS-rebinding validation.
|
This was referenced Aug 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Migrates
rmcpandrmcp-macrosfrom=1.5.0to=3.1.4as one atomic change, superseding #6968 and #6973.The two crates must move in exact lockstep:
rmcp-macrosgenerates code that calls rmcp runtime APIs directly, and a lock regeneration that moved one without the other broke every#[tool]site with a missing-function error naming neither crate (#6502). Bumping either alone reproduces that break, so the two single-crate dependabot PRs cannot land independently. Two majors is a real migration of the MCP SDK surface (MCP spec 2025-11-25 alignment in 2.0; SEP-2322 MRTR, SEP-2567 stateless draft serving, SEP-2549 cache hints, and DNS-rebinding Host validation in 3.0), not a version bump — every adaptation below was verified against the publishedrmcp-3.1.4/rmcp-macros-3.1.4crate sources, not guessed from memory.The
=exact pins are kept (now=3.1.4) in all three manifests (diaporeia,aletheia-memory-mcpdeps + dev-deps,aletheia's optionalclientdep), and the lockstep WARNING oncrates/diaporeia/Cargo.tomlis preserved.Changes
API adaptations (1.5.0 → 3.1.4):
rmcp::model::Contentwas removed; the unified content union isContentBlock. AllContent::text(...)sites (~40 indiaporeia/src/tools/mod.rs, 7 inaletheia-memory-mcp/src/tools.rs) now useContentBlock::text(...).RawResource/RawResourceTemplateare gone;Resource/ResourceTemplateare flat structs built via::new(uri, name)+with_*builders (diaporeia/src/server.rs,resources/nous.rs,resources/config.rsand their tests).ListResourcesResult/ListResourceTemplatesResultgainedresult_type(SEP-2322) andttl_ms/cache_scope(SEP-2549) fields; the struct literals inserver.rsnow use the::with_all_items(...)constructor.ServerHandler::read_resourcereturns the new MRTR enumReadResourceResponse; theReadResourceResultis wrapped via the providedFromimpl.Peer<RoleClient>::call_toolwas removed;RunningService::call_toolis the high-level path and additionally drives SEP-2322input_requiredrounds through the local client handler. Used indiaporeia/src/client.rsand the in-process test harness intools/mod.rs.StreamableHttpServerConfig::with_stateful_mode→with_legacy_session_mode(SEP-2567: the 2026-07-28 draft is always stateless) in the five streamable-HTTP test setups.Tool/ToolAnnotationsare#[non_exhaustive]; theexternal_tools.rstest helper usesTool::new_with_raw+ToolAnnotations::from_raw.Hostheader by default (DNS-rebinding hardening, new in the 1.6–3.x line), and answers a missing/insufficientAcceptheader with 406 Not Acceptable where 1.5.0 answered 400. Transport tests that assert a request reaches the MCP protocol layer now sendHost: localhostand expect the 406, so the rejection still originates from the layer they describe rather than the earlier host check.scripts/generate-diaporeia-mcp-inventory.pyaccepts theResourceTemplate::newconstructor shape (Rawprefix optional), so the committed-inventory drift gate keeps seeing all six resource templates.rmcp/rmcp-macros1.5.0 → 3.1.4, plus new transitivedarling 0.24.1for the macros crate;rmcpdropsjs-sys/wasm-bindgenand moves tobase64 0.23.DEPENDENCIES-AUDIT.mdchrono-attribution line updated tormcp v3.1.4.Deliberately untouched: the
[tool]tool names/descriptions (the committed MCP inventory is unchanged), the stdio transport wiring, and the auth middleware — all sit on APIs that did not change shape.Test plan
Local (this box does not compile per fleet thermal law):
cargo +1.94.0 fmt --all -- --check,_llmL3 extractor,scripts/run-gate-coverage.py(23/23 PASS, including the diaporeia MCP inventory generator self-tests),generate-diaporeia-mcp-inventory.py --check(no drift), resolver-onlycargo update/cargo metadata/cargo fetchfor the lockfile.CI proves the
#[tool]surface:hybrid-gate/full-gate-build:cargo check --workspace --all-targets --features test-corecompiles every#[tool_router]/#[tool_handler]expansion against rmcp 3.1.4 — the exact failure mode of rmcp is exact-pinned but rmcp-macros floats — a lock regeneration moved it to 1.8.0 and broke the build against rmcp 1.5.0 #6502 cannot pass this leg; clippy with-D warnings;cargo nextest run --workspace --features test-coreruns:diaporeiasuites:public_api_scoped_access,public_api_resources,public_api_repomix,public_api_rate_limit,public_api_auth_resolution,public_api_transport(real streamable-HTTP round trips incl. RBAC, rate limits, resource reads), in-processsession_create/session_messageclient-server tests intools/mod.rs, andmcp_inventory_drift(both the--checkdrift gate and the generator self-tests).aletheia-memory-mcptests/integration.rs: in-process duplex client driving every read/write tool, including write-token gating viaToolRouter::remove_route.aletheiaexternal_toolsMCP reversibility tests against the non-exhaustiveTool/ToolAnnotationsconstructors.gate-coverage-scripts: the MCP inventory generator self-tests as a script step.Acceptance criteria
rmcpandrmcp-macrosboth at exactly 3.1.4 inCargo.lock; no other dependency version moved by the resolver (verified: onlydarling 0.24.1added).full-gate-buildgreen).gatecontext is green.Blast zone
crates/diaporeia(MCP server + client),crates/aletheia-memory-mcp(stdio MCP server),crates/aletheia(external_tools.rsbehind themcpfeature),Cargo.lock,scripts/generate-diaporeia-mcp-inventory.py,DEPENDENCIES-AUDIT.md. No other workspace member depends on rmcp (proskenion's separate lockfile has zero rmcp entries).