Skip to content

Update MCP protocol validation and defaults - #17

Merged
soodoku merged 1 commit into
mainfrom
codex/update-supported_versions-for-2025-11-25
Nov 29, 2025
Merged

Update MCP protocol validation and defaults#17
soodoku merged 1 commit into
mainfrom
codex/update-supported_versions-for-2025-11-25

Conversation

@soodoku

@soodoku soodoku commented Nov 29, 2025

Copy link
Copy Markdown
Collaborator

Summary

  • prefer the 2025-11-25 MCP protocol version while retaining compatibility with 2025-06-18 in HTTP transport validation and examples
  • align server protocol defaults to the latest MCP version when the SDK is unavailable
  • update protocol compliance documentation and expectations to match the new default version

Testing

  • python -m compileall rmcp/transport/http.py rmcp/core/server.py tests/integration/protocol/test_mcp_protocol_compliance.py

Codex Task

@soodoku
soodoku merged commit b3d81bc into main Nov 29, 2025
7 checks passed
@soodoku
soodoku deleted the codex/update-supported_versions-for-2025-11-25 branch November 29, 2025 20:04

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread rmcp/core/server.py
Comment on lines 34 to +36
except Exception: # pragma: no cover - optional dependency
_MCP_TYPES_AVAILABLE = False
_PROTOCOL_VERSION = "2025-06-18"
_PROTOCOL_VERSION = "2025-11-25"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Respect negotiated MCP version for 2025-06-18 clients

When the MCP SDK is missing, _PROTOCOL_VERSION now defaults to 2025-11-25, yet the HTTP transport still accepts 2025-06-18 (see _validate_protocol_version). An older client that sends initialize with protocolVersion/header 2025-06-18 will now get an initialize response advertising 2025-11-25 because _handle_initialize always returns _PROTOCOL_VERSION, so strict clients will reject the handshake as a version mismatch despite being explicitly allowed. The server should either echo the client’s requested version when supported or fail negotiation instead of unilaterally upgrading.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

  • Added a shared SUPPORTED_PROTOCOL_VERSIONS constant to capture the preferred and compatible MCP protocol versions for negotiation. rmcp/core/server.pyL35-L50
  • Introduced protocol negotiation in initialize handling so responses echo a supported client version instead of always upgrading to the latest default. rmcp/core/server.pyL461-L532

Testing

  • python -m compileall rmcp/transport/http.py rmcp/core/server.py tests/integration/protocol/test_mcp_protocol_compliance.py

View task →

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant