{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-accept-a-valid-oauth-token-for-the-wrong-resource-the-mcp-audience-binding-failure-at-tool-invocation-time",
  "title": "Why does an instance accept a valid OAuth token for the wrong resource: the MCP audience-binding failure at tool-invocation time",
  "date_of_record": "2026 November 27",
  "scope": "Applies to MCP tool servers that authenticate callers via OAuth 2.1 bearer tokens issued by a shared authorization server, where per-tool scope checks are enforced but token audience (`aud`) is validated only at the transport/handshake layer and not re-validated per tool invocation. Does not apply to servers using mutually-bound DPoP tokens with per-tool thumbprints, nor to single-tenant deployments where all tokens share one resource identity.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-accept-a-valid-oauth-token-for-the-wrong-resource-the-mcp-audience-binding-failure-at-tool-invocation-time.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-accept-a-valid-oauth-token-for-the-wrong-resource-the-mcp-audience-binding-failure-at-tool-invocation-time.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-accept-a-valid-oauth-token-for-the-wrong-resource-the-mcp-audience-binding-failure-at-tool-invocation-time.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1807,
    "python_slice_tokens": 251,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two different questions an MCP server can ask about a bearer token, and conflating them is the entire failure: 1. **\"Is this token valid?\"** — signature, expiry, issuer trust. This is answered once, at the `initialize`/session-establishment boundary, and is a property of the *connection*. 2. **\"Is this token authorized for *this specific tool, on t...",
    "what_was_observed": "Setup: two MCP servers, `mcp://fs-server` (filesystem tools) and `mcp://mail-server` (mail tools), both trusting the same authorization server. The AS issues tokens with `aud` set to the requested resource and scopes `mcp:tools.read`, `mcp:tools.write`. The `mail-server` validates the token at `initialize`, checks `mcp:tools.write` before `send_message`, and does nothing else. Trace of the failure: 1. Agent session o...",
    "condition_of_validity": "The audience check is only a real defense under all of the following: - **The AS binds `aud` to a single resource identifier** that the MCP server can compare against its own canonical URI (not a hostname, not a wildcard). If the AS issues `aud: mcp://*` or omits `aud`, the check is vacuous. - **The server re-validates `aud` on every `tools/call`**, not only...",
    "decision_boundary": "The boundary is: **does the server treat the token as a credential for the connection, or as a warrant for the specific (tool, resource) pair?** - If the token is a *connection credential*: validate once, cache the decision, execute any tool whose scope is present. This is the failing model. It is correct only when the server is the sole resource the AS ever...",
    "operational_effect": "Enforcing per-call audience binding converts a silent cross-resource authorization bypass into a hard, attributable rejection. The client that pooled tokens now gets `403 invalid_token: audience mismatch` at the `mail-server` boundary and must acquire a token for `mail-server` — which routes the request back through the AS, where the user's consent for mail ..."
  },
  "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": "a7fc6024a1186f7795adc228b079c94dba13665656930042b830d55ea8cb9519",
    "verified_classes": [
      "AudienceBindingError",
      "Token",
      "ToolPolicy",
      "MCPAuthorizationGate"
    ],
    "verified_functions": [
      "handle_tools_call",
      "__init__",
      "authorize"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "AudienceBindingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
