{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-reject-mcp-requests-whose-oauth-2-1-token-audience-matches-the-resource-indicator-but-whose-transport-level-session",
  "title": "In what scenarios must an instance reject MCP requests whose OAuth 2.1 token audience matches the resource indicator but whose transport-level session binding has been silently re-established across a reconnecting client",
  "date_of_record": "2026 November 14",
  "scope": "Applies to MCP servers exposing the Streamable HTTP transport (single `/mcp` endpoint, POST + GET SSE upgrade, optional `Mcp-Session-Id` header) that validate OAuth 2.1 access tokens carrying an RFC 8707 `resource` indicator. Does not apply to stdio transports, to stateless \"no-session\" MCP configurations, or to pure bearer-token gateways that terminate before the MCP layer.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-reject-mcp-requests-whose-oauth-2-1-token-audience-matches-the-resource-indicator-but-whose-transport-level-session.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-reject-mcp-requests-whose-oauth-2-1-token-audience-matches-the-resource-indicator-but-whose-transport-level-session.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-reject-mcp-requests-whose-oauth-2-1-token-audience-matches-the-resource-indicator-but-whose-transport-level-session.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1711,
    "python_slice_tokens": 307,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The OAuth 2.1 resource indicator (`resource` parameter, RFC 8707) binds a token to a *resource server identity* — a URI such as `https://mcp.example.com/mcp`. The MCP Streamable HTTP transport binds a *client session* to a server-issued `Mcp-Session-Id` that is created at `initialize` and is expected to be presented on every subsequent request. These are two...",
    "what_was_observed": "In a deployment behind a load balancer with per-node in-memory session tables, a client reconnect after a rolling restart produced the following sequence: 1. Client holds token `T` with `resource=https://mcp.example.com/mcp`, `exp` in 40 minutes, `sub=svc-agent-7`. 2. Restart evicts all `Mcp-Session-Id` entries on the node the client reconnects to. 3. Client POSTs `tools/call` with `Authorization: Bearer T` and `Mcp-...",
    "condition_of_validity": "The strict behavior (reject with 404, force `initialize`) is correct and required when **all** of the following hold: - The transport is stateful (server issues `Mcp-Session-Id`). - The presented `Mcp-Session-Id` is absent from the server's authoritative session store. - The request is not itself an `initialize` request. The permissive \"re-initialize transpa...",
    "decision_boundary": "Before executing any stateful MCP method, the server must evaluate two independent predicates and require **both**: - `audience_ok`: token `resource`/`aud` matches the server's canonical MCP URI (exact string match after normalization; do not accept prefix or path-suffix matches). - `session_ok`: presented `Mcp-Session-Id` resolves in the store **and** the s...",
    "operational_effect": "Consequences of getting this wrong, ranked by blast radius: - **Silent state forking:** per-session tool state (pagination cursors, negotiated capabilities, active SSE subscriptions) fragments across orphaned sessions; failures surface as intermittent, non-reproducible tool errors. - **Cross-principal contamination:** when session identity is keyed on `sub` ..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "93d55f2bc4ea60d3f4b8389d56a0741cc0ae23546901e523473e18647b901ff2",
    "verified_classes": [
      "SessionAudienceMismatchError"
    ],
    "verified_functions": [
      "authorize_stateful_request",
      "__init__"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SessionAudienceMismatchError"
    ],
    "sample_fail_closed_invariants": [
      "None"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
