Repository navigation
deps: migrate crates/mcp to rmcp 2.1 (supersedes #550) - #551
Merged
Merged
Conversation
Dependabot PR #550 bumped rmcp 1.8.0 -> 2.1.0 but left CI red: rmcp 2.x dropped the Annotated<T>/AnnotateAble wrapper (RawResource/RawResourceTemplate are gone; Resource/ResourceTemplate are now flat, directly-constructible structs with the same builder methods), renamed the tool-content union Content -> ContentBlock, and replaced the standalone PromptMessageRole enum with the shared Role type already used elsewhere in the model. Same dependency bump as #550 (Cargo.lock: rmcp 1.8.0 -> 2.1.0, rmcp-macros 1.8.0 -> 2.2.0, identical checksums), plus the three call sites that needed updating for the new API: - crates/mcp/src/resources.rs: RawResource::new(..).no_annotation() -> Resource::new(..); RawResourceTemplate::new(..).no_annotation() -> ResourceTemplate::new(..) - crates/mcp/src/prompts.rs: PromptMessageRole::User -> Role::User - crates/mcp/src/lib.rs: Content::text -> ContentBlock::text No behavior change: the MCP tool/resource/prompt surface (names, schemas, JSON-RPC wire shape) is unaffected — only rmcp's Rust-side constructor API moved. All 82 indexa-mcp tests pass unchanged, including the golden-contract tests (tool_contract_golden_list, doc_tool_count_matches_code, prompt_contract_golden_list, resources_round_trip, prompts_round_trip_and_validate_args) that would catch a wire-format drift. Verified locally with the exact CI commands: cargo fmt --all -- --check, cargo clippy --all-targets --all-features --locked (-D warnings), and cargo test --all --locked, plus the retrieval eval and web-smoke checks from ci.yml (run under an isolated XDG_DATA_HOME/XDG_CONFIG_HOME so they don't touch this host's real Indexa index). Signed-off-by: Ahmed Janabi <ahmed541991@gmail.com> Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Ahmed Janabi <ahmed541991@gmail.com>
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
Dependabot's #550 bumps
rmcp1.8.0 → 2.1.0 incrates/mcpbut leaves CI red — rmcp 2.x changed three parts of its Rust API surface thatcrates/mcpuses directly. This PR carries the identical dependency bump plus the minimal source migration, with no behavior change.Cargo.lock:rmcp1.8.0 → 2.1.0,rmcp-macros1.8.0 → 2.2.0 — identical version/checksum diff to chore(deps): Bump rmcp from 1.8.0 to 2.1.0 #550.crates/mcp/Cargo.toml:rmcp = "1.8.0"→"2.1.0".crates/mcp/src/resources.rs— rmcp 2.x removed theAnnotated<T>/AnnotateAblewrapper pattern;RawResource/RawResourceTemplateno longer exist.Resource/ResourceTemplateare now flat, directly-constructible structs with the same.with_description()/.with_mime_type()builder methods (no more trailing.no_annotation()).crates/mcp/src/prompts.rs— the standalonePromptMessageRoleenum is gone;PromptMessage.rolenow uses the sharedRoletype already used elsewhere in the model (PromptMessageRole::User→Role::User).crates/mcp/src/lib.rs— the tool-content unionContentwas renamedContentBlock(Content::text→ContentBlock::text).No other file in the crate (or the workspace) touches
rmcpdirectly, and nothing else needed to change — confirmed bycargo clippy --all-targets --all-features --lockedbeing clean across the whole workspace.Behavior is unchanged: MCP tool/resource/prompt names, schemas and JSON-RPC wire shape are identical — only rmcp's Rust-side constructor API moved. All 82
indexa-mcptests pass unmodified, including the golden-contract tests that exist specifically to catch a wire-format drift:tool_contract_golden_list,doc_tool_count_matches_code,prompt_contract_golden_list,resources_round_trip,prompts_round_trip_and_validate_args.apps/indexa-desktopdoes not depend onindexa-mcp(normcpanywhere in its dependency graph), so its separate, workspace-excludedCargo.lockneeded no regeneration — consistent withdesktop build (macOS)already passing on #550.Test plan
Ran locally, matching
.github/workflows/ci.ymlexactly:cargo fmt --all -- --checkcargo clippy --all-targets --all-features --locked(workspace,-D warnings) — cleancargo test --all --locked— full workspace green;indexa-mcpalone: 82 passed / 0 failedindexa scan . && indexa deep . --no-embed && indexa eval fixtures/self-golden.json --mode sparse --top-k 10 --min-hit-rate 0.80) — hit rate 1.00 (floor 0.80)node scripts/web-smoke.mjsunder headless Chrome + Xvfb) — 7/7 checks passedcargo build --release --locked -p indexa— release build (see PR comment / CI for result if still finishing locally at post time)Both the eval and web-smoke steps were run under an isolated
HOME/XDG_DATA_HOME/XDG_CONFIG_HOME(mirroringweb-smoke.mjs's own existing isolation) so the hermetic verification never touched this host's real Indexa index.Not run locally (Linux host):
desktop-build (macOS)— unaffected per the dependency-graph check above; left to CI.Supersedes and should close #550 (Dependabot will stop re-proposing the same bump once this merges).
🤖 Generated with Claude Code