Add MCP 2026-07-28 discovery support - #35724
Merged
copyberry[bot] merged 1 commit intoJul 28, 2026
Merged
Conversation
## What changed - Add an opt-in `mcp_2026_07_28` protocol mode while preserving the legacy lifecycle by default. - Negotiate the new protocol over streamable HTTP with `server/discover`, including bounded responses, redirect protection, and fallback only when a response establishes that the endpoint is legacy-only. - Require stdio servers to opt in with `CODEX_MCP_PROTOCOL_VERSION=2026-07-28`, and add a bounded local stdio transport for the modern lifecycle. - Consume paginated tool, resource, and resource-template catalogs in modern mode, reject repeated cursors, and retain discovered server identity. - Reconnect reusable MCP clients when their selected protocol mode changes. ## Testing - Cover HTTP JSON and SSE discovery, legacy fallback and rejection cases, redirects, retries, response limits, and pagination. - Cover local and executor stdio discovery, protocol markers, message limits, and legacy compatibility. GitOrigin-RevId: f6a78816e127d2a482292d63b91c8384f1595903
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/f6a78816e127d2a482292d63b91c8384f1595903
branch
from
July 28, 2026 05:53
9c92f8d to
be2e4af
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/f6a78816e127d2a482292d63b91c8384f1595903
branch
July 28, 2026 05:54
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Add MCP 2026-07-28 discovery support
What changed
mcp_2026_07_28protocol mode while preserving the legacylifecycle by default.
server/discover,including bounded responses, redirect protection, and fallback only when a
response establishes that the endpoint is legacy-only.
CODEX_MCP_PROTOCOL_VERSION=2026-07-28, and add a bounded local stdiotransport for the modern lifecycle.
mode, reject repeated cursors, and retain discovered server identity.
Testing
redirects, retries, response limits, and pagination.
and legacy compatibility.