{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-bind-the-audience-claim-before-consuming-an-mcp-resource-token",
  "title": "Where must an instance Bind the Audience Claim Before Consuming an MCP Resource Token",
  "date_of_record": "2026 December 2",
  "scope": "Applies to HTTP-native MCP servers that authenticate inbound tool-invocation requests using OAuth 2.1 bearer tokens (RFC 6750) minted by an authorization server shared across multiple MCP resource servers. Does not apply to stdio-local MCP transports, mTLS-only deployments, or single-resource-server tenancies where audience confusion is structurally impossible.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-bind-the-audience-claim-before-consuming-an-mcp-resource-token.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bind-the-audience-claim-before-consuming-an-mcp-resource-token.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bind-the-audience-claim-before-consuming-an-mcp-resource-token.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1804,
    "python_slice_tokens": 369,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The confused-deputy failure in HTTP MCP is not a token-validation bug. It is a *resource-binding* bug. A syntactically valid, cryptographically intact, unexpired bearer token can still be wrong for the resource server that presents it, because OAuth access tokens are audience-scoped artifacts and MCP resource servers frequently share an authorization server....",
    "what_was_observed": "A deployment with three MCP resource servers behind one authorization server: `files.mcp.internal`, `db.mcp.internal`, and `deploy.mcp.internal`. Each issues tools. The AS mints tokens with `aud` set to the requested resource. A client agent, mid-task, obtains a token for `files.mcp.internal` to read a config artifact, then — after a tool-call loop where it re-reads its own session state — reuses the same cached `Aut...",
    "condition_of_validity": "The audience-check invariant holds only under these conditions, and each must be verified at the resource server, not assumed: 1. The MCP server has a **canonical resource identifier** (RFC 8707 `resource` value) that is stable, absolute, and not aliased. `https://deploy.mcp.internal` and `https://deploy.mcp.internal/` are different strings and must be norma...",
    "decision_boundary": "The boundary is: **audience validation must occur at the resource server, before scope evaluation, before tool resolution, and before any side-effecting call.** It must not be delegated to the authorization server's introspection endpoint as the sole check, because introspection returns `active: true` for a token that is valid *somewhere*, not valid *here*. ...",
    "operational_effect": "Enforcing the audience check converts a silent privilege-confusion into an explicit, attributable rejection. The observable effect is a spike in `401 invalid_token` with `error_description: audience mismatch` at the moment an agent misroutes a cached token — which is exactly the signal you want, because it localizes the bug to the agent's credential cache ra..."
  },
  "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": "3a661b0504171f931abdd717a05fc6b17b76af1aa093af14c3ddc4a2dc9c3f80",
    "verified_classes": [
      "AudienceBindingError",
      "McpResourceServer"
    ],
    "verified_functions": [
      "handle_mcp_request",
      "_normalize",
      "validate_token",
      "dispatch_tool"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 8,
    "raised_exceptions": [
      "AudienceBindingError"
    ],
    "sample_fail_closed_invariants": [
      "token has no aud claim; refusing unbound token",
      "empty aud claim",
      "wildcard aud is not admissible at a leaf MCP server",
      "aud names the client (azp); confused-deputy token"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
