Skip to content

refactor: derive latest MCP protocol version from supported list.#840

Open
dishtam wants to merge 1 commit intomodelcontextprotocol:mainfrom
dishtam:bug/protocol_versioning
Open

refactor: derive latest MCP protocol version from supported list.#840
dishtam wants to merge 1 commit intomodelcontextprotocol:mainfrom
dishtam:bug/protocol_versioning

Conversation

@dishtam
Copy link

@dishtam dishtam commented Feb 28, 2026

Fix protocol version resolution to return the latest supported version instead of defaulting to the first declared constant.

Motivation and Context

The default implementation returned the earliest protocol version, leading to incorrect version negotiation. This ensures the latest supported version is selected dynamically.

How Has This Been Tested?

Build locally

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Latest version is derived from the centralized supported versions list to avoid hardcoded defaults.
Screenshot 2026-02-28 124821

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.

1 participant