Skip to content

feat(mcp)!: upgrade rmcp to 2.x - #171

Merged
aroff merged 1 commit into
mainfrom
chore/rmcp-2
Sep 19, 2026
Merged

aroff merged 1 commit into
mainfrom
chore/rmcp-2

Conversation

@aroff

@aroff aroff commented Sep 19, 2026

Copy link
Copy Markdown
Owner

Summary

Upgrade rmcp (the mcp-server feature) from 1.6 to 2.2.

rmcp 2.0's breaking change that reaches cli-framework is modelcontextprotocol/rust-sdk#927 (model types aligned with MCP 2025-11-25):

  • Content / RawContent (Annotated<RawContent>, accessed via .raw) → flat ContentBlock enum
  • Resource::new(RawResource::new(uri, name), None) → flat Resource::new(uri, name)

Handler traits, Tool (incl. _meta), transports (stdio, Streamable HTTP + Host guard) are source-compatible. The #919 structuredContent change was reverted before release.

Public API impact

cli-framework's own signatures and wire output are unchanged, but rmcp types leak through the public MCP API (CliFrameworkHandler: rmcp::ServerHandler, dispatch_tool_call*, list_resources_result, read_resource_uri). Consumers must move to rmcp = "2" together with this change — noted under Breaking in CHANGELOG.md. gofastskill/fastskill will follow up (supersedes its Dependabot PRs #320/#339).

Test plan

  • bash scripts/run-ci-tests.sh — fmt, clippy -D warnings, audit, release build, feature-matrix tests, mcp-server integration tests, self-install checks all pass

🤖 Generated with Claude Code

Move the mcp-server feature from rmcp 1.6 to 2.2. rmcp 2 aligns its model
types with MCP 2025-11-25: Content/RawContent become the flat ContentBlock
enum and Resource is a flat struct, so tool results and resource listings
are built with ContentBlock::text and Resource::new(uri, name).

BREAKING CHANGE: rmcp types are part of the public MCP API
(CliFrameworkHandler implements rmcp::ServerHandler; dispatch_tool_call*,
list_resources_result and read_resource_uri take/return rmcp model types),
so consumers must move to rmcp 2 together with this release.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@aroff
aroff enabled auto-merge (squash) September 19, 2026 01:45
@aroff
aroff merged commit 03c20fa into main Sep 19, 2026
6 checks passed
@aroff
aroff deleted the chore/rmcp-2 branch September 19, 2026 02:17
aroff added a commit to gofastskill/fastskill that referenced this pull request Sep 19, 2026
cli-framework 03c20fa (aroff/cli-framework#171) moves its mcp-server
feature to rmcp 2. `fastskill mcp serve` wraps cli-framework's
CliFrameworkHandler in its own ServerHandler, so both crates must resolve
to the same rmcp; bump them together. The handler compiles unchanged
against rmcp 2 (it uses no Content/RawResource types).

Supersedes #320 and #339.

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants