Protocol transport/auth evolution
MCP authorization PKCE state remote authorization flow session remains unauthorized
Authentication loops back successfully, yet the MCP session remains unauthorized.
Agent Quick Fix
Repair against the current MCP contract, then keep the change narrow and source-backed.
Product: MCP
Current-contract area: PKCE/state handling mismatch in remote authorization flow
Likely root cause: Authentication loops back successfully, yet the MCP session remains unauthorized.
Repair direction: Verifier checks current transport framing, session lifecycle, auth flow, and backwards compatibility where specified.
Symptom
Authentication loops back successfully, yet the MCP session remains unauthorized.
Why This Happens
Local client/server code can each be valid for an earlier protocol revision; only the negotiated current spec defines transport, session, and authorization behavior.
Common Wrong Fixes
- Changing local code without checking the current external contract.
- Retrying the same install, build, or API call with no version/source change.
- Applying a broad unsafe bypass when a narrow compatibility fix is available.
Codex Search Keywords
These are the search terms observed in a neutral Codex validation run for this failure shape.
MCP authorization PKCE state remote authorization flow session remains unauthorized
site:modelcontextprotocol.io/specification authorization PKCE state MCP
Model Context Protocol specification authorization OAuth 2.1 PKCE state
https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization
https://modelcontextprotocol.io/specification/2025-06-18/basic/authorization
Source Trail
- MCP 2025-03-26 key changes: https://modelcontextprotocol.io/specification/2025-03-26/changelog
- Official reference opened by Codex: https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization
- Official reference opened by Codex: https://modelcontextprotocol.io/specification/2025-06-18/basic/authorization