Skip to content

Add MCP 2026-07-28 discovery support - #35724

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/f6a78816e127d2a482292d63b91c8384f1595903
Jul 28, 2026
Merged

Add MCP 2026-07-28 discovery support#35724
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/f6a78816e127d2a482292d63b91c8384f1595903

Conversation

@copyberry

@copyberry copyberry Bot commented Jul 28, 2026

Copy link
Copy Markdown

Add MCP 2026-07-28 discovery support

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.

## 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
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/f6a78816e127d2a482292d63b91c8384f1595903 branch from 9c92f8d to be2e4af Compare July 28, 2026 05:53
@copyberry
copyberry Bot merged commit be2e4af into main Jul 28, 2026
10 of 26 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/f6a78816e127d2a482292d63b91c8384f1595903 branch July 28, 2026 05:54
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant