[FEATURE] Adopt rmcp 3.3.0 for MCP initialize negotiation - #93
Merged
Merged
Conversation
rmcp 3.3.0 (2026-09-10) extracts protocol-version negotiation into ServerHandler::negotiate_initialize and the default initialize now calls it. Pin the MCP server on that line and cover the new path.
puretensor
force-pushed
the
grok/review/rmcp-3-3-0
branch
from
September 11, 2026 20:51
c819c7d to
776e671
Compare
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.
Seat: grok-4.6 / xhigh (adversarial review wave 5, 2026-09-11)
Category: [FEATURE]
Problem / Opportunity: pTask's MCP server (
/mcpandpt mcp) is every HAL session's task surface. It pins rmcp 3.2.0 (2026-08-31). rmcp 3.3.0 shipped 2026-09-10 and extracted protocol-version negotiation out of the defaultinitializebody intoServerHandler::negotiate_initialize(modelcontextprotocol/rust-sdk#1247). The defaultinitializenow calls that method. Staying on 3.2.0 means pTask's handshake does not take the path the SDK now documents as the negotiation rule.Evidence:
crates.io (fetched 2026-09-11):
Changelog (https://github.com/modelcontextprotocol/rust-sdk/blob/rmcp-v3.3.0/crates/rmcp/CHANGELOG.md):
SDK source on the 3.3.0 tag (https://raw.githubusercontent.com/modelcontextprotocol/rust-sdk/rmcp-v3.3.0/crates/rmcp/src/handler/server.rs): the default
initializeis nowset_peer_infoplusself.negotiate_initialize(&request). Quote from the method docs: "This is the whole body of the defaultinitializeminus itsset_peer_infoside effect, so a server that overridesinitializeto add its own can call this instead of restating the negotiation rule."RED — same test injected on an
origin/mainworktree still pinned to rmcp 3.2.0:Change: Pin
rmcp = "3.3.0"(workspace dep; lockfile also movesrmcp-macros3.2.0 → 3.3.0). Workspace SemVer 3.28.1 → 3.29.0 (MINOR; Lane 1). Addnegotiate_initialize_advertises_tools_on_a_supported_protocolso the new API is called onPtaskMcpand the tools capability plus negotiated protocol version are asserted. Lockfile churn is 22 lines (rmcp + macros + workspace crate stamps). No hmac/sha2/reqwest major bumps — those stay optional behind rmcp features we do not enable.Verification:
Risk & rollback: pTask does not override
initialize; it picks up the 3.3.0 default (initialize → negotiate_initialize). The new test locks the tools advertisement and that the negotiated version is insupported_protocol_versions(). Revert is a clean single-commit revert. Reviewer restacks SemVer frommain(3.28.1).