fix: improve MCP version mismatch detection and error messages#360
Closed
zemaj wants to merge 1 commit into
Closed
fix: improve MCP version mismatch detection and error messages#360zemaj wants to merge 1 commit into
zemaj wants to merge 1 commit into
Conversation
Addresses #292 by enhancing error reporting and validation in the MCP handshake process: - Add MCP_SCHEMA_VERSION to handshake error messages to help users identify version compatibility issues - Implement explicit protocol version comparison after successful handshake conversion to detect version mismatches - Add clear, actionable error message when server and client versions don't match - Include test to verify MCP_SCHEMA_VERSION constant is accessible This helps prevent confusion when MCP servers and clients are running incompatible protocol versions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
804b5ad to
b7927a2
Compare
Author
|
Closing in favor of PR #361, which supersedes these changes and includes the schema-format test from this branch. |
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
This PR addresses issue #292 by improving MCP version mismatch detection and error messages in the
rmcp-clienthandshake process.Changes
MCP_SCHEMA_VERSION) to help users quickly identify version compatibility issuesMCP_SCHEMA_VERSIONis accessible and properly formattedTechnical Details
Modified
code-rs/rmcp-client/src/rmcp_client.rs:MCP_SCHEMA_VERSIONfrommcp_typesinitialize_resultfor proper type inferenceTesting
./build-fast.shpassesMCP_SCHEMA_VERSIONformat validationRisk Assessment
Low risk: Changes are minimal and defensive:
Related Issue
Fixes #292
🤖 Generated with Claude Code