{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-mcp-oauth-audience-binding-as-a-per-hop-invariant-rather-than-a-session-level-grant",
  "title": "In what scenarios must an instance treat MCP OAuth audience binding as a per-hop invariant rather than a session-level grant",
  "date_of_record": "2026 November 21",
  "scope": "Applies to HTTP-native MCP servers (Streamable HTTP / SSE transports) that delegate authorization to an external OAuth 2.1 authorization server and validate bearer tokens carrying a `resource`/`aud` claim. Does not cover stdio-local MCP servers, mTLS-only deployments, or pure API-key gateways that never mint a resource-scoped token.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-oauth-audience-binding-as-a-per-hop-invariant-rather-than-a-session-level-grant.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-oauth-audience-binding-as-a-per-hop-invariant-rather-than-a-session-level-grant.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-mcp-oauth-audience-binding-as-a-per-hop-invariant-rather-than-a-session-level-grant.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1938,
    "python_slice_tokens": 328,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"token validation is broken.\" It is the conflation of two distinct security properties that look identical at the code level but diverge under adversarial composition: - **Audience binding** — the invariant that a token minted for resource `R_a` is *only* honored by `R_a`, enforced at the point of use. - **Session establishment** — the fac...",
    "what_was_observed": "A federated MCP deployment with three HTTP-native servers — `calendar.mcp`, `files.mcp`, and `mail.mcp` — all trusting the same authorization server. Each server exposed `/mcp` with Streamable HTTP and validated tokens via RFC 7662 introspection. A malicious MCP client (a prompt-injected agent) obtained a token scoped to `files.mcp` with `resource=https://files.mcp/`. It then issued a `tools/call` to `https://mail.mc...",
    "condition_of_validity": "The audience-binding invariant holds *only if all of the following are simultaneously true*: - The MCP server has a single, unambiguous **canonical resource identifier** (exact string, trailing-slash-normalized, scheme+host+path) and compares it for **exact equality** against the token's `aud`/`resource` claim — not prefix, not substring, not \"contains the h...",
    "decision_boundary": "The operational decision is: **at which layer does the audience check live, and what happens when it is absent?** - **Enforce at the MCP server's request guard, per request.** Not at the session handshake. A long-lived Streamable HTTP session can outlive token rotation; a token valid at session open may be replaced mid-stream by a token for a different audie...",
    "operational_effect": "After the incident, the deployment adopted three changes with measurable effect: 1. **Per-request audience guard** reduced cross-resource token acceptance to zero in a 30-day replay of 4.2M `tools/call` requests. The guard added ~0.4 ms p99 (string comparison against a cached canonical identifier), negligible against introspection latency. 2. **Origin allowl..."
  },
  "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": "70acca99e431221680d93a1d2388349c9ca3e7b1a863787c378e698337718acc",
    "verified_classes": [
      "AudienceBindingError",
      "OriginValidationError",
      "TokenClaims"
    ],
    "verified_functions": [
      "_normalize",
      "guard_mcp_request",
      "_self_test"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 7,
    "raised_exceptions": [
      "AudienceBindingError",
      "OriginValidationError"
    ],
    "sample_fail_closed_invariants": [
      "token introspection returned active=false",
      "token carries no audience claim; refusing to act as deputy",
      "guard failed to reject cross-resource token",
      "browser-context request missing Origin header"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
