{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-an-mcp-tool-call-as-unauthorized-when-the-oauth-2-1-bearer-token-validates-but-its-aud-claim-does-not-bin",
  "title": "Under what conditions must an instance treat an MCP tool call as unauthorized when the OAuth 2.1 bearer token validates but its `aud` claim does not bind to the specific resource-server URI of the invoked tool",
  "date_of_record": "2026 November 24",
  "scope": "Applies to MCP servers acting as OAuth 2.1 resource servers that gate individual tools on token scopes, where a single MCP server exposes multiple tools behind distinct logical resource URIs. Does not apply to naive single-audience deployments where the MCP server URI equals the token audience for all tools.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-an-mcp-tool-call-as-unauthorized-when-the-oauth-2-1-bearer-token-validates-but-its-aud-claim-does-not-bin.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-an-mcp-tool-call-as-unauthorized-when-the-oauth-2-1-bearer-token-validates-but-its-aud-claim-does-not-bin.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-an-mcp-tool-call-as-unauthorized-when-the-oauth-2-1-bearer-token-validates-but-its-aud-claim-does-not-bin.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1605,
    "python_slice_tokens": 386,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not token *validity*; it is token *binding*. A JWT can pass signature verification, `exp`/`nbf` checks, issuer lookup, and even scope membership for the requested tool, and still be *unbound* to the resource it is being presented against. OAuth 2.1 (RFC 8707 resource indicators) requires the resource server to reject a token whose `aud` does n...",
    "what_was_observed": "An MCP server registered three tools under one process: `search_docs` (scope `docs:read`), `write_note` (scope `notes:write`), and `execute` (scope `exec:run`). The authorization server issued tokens with `aud: [\"mcp://agent.example/server\"]` — the *server* URI — and scopes matching the requested tool. During a multi-step agent run, the orchestrator obtained a token for `search_docs` and cached it in the shared MCP c...",
    "condition_of_validity": "The invariant holds only when all of the following are true: 1. The MCP server exposes tools whose authorization requirements differ, and the authorization server issues tokens scoped per-tool or per-resource. 2. Tokens carry an `aud` claim that is intended to bind to a specific resource indicator (RFC 8707), not merely to the server origin. 3. The MCP clien...",
    "decision_boundary": "The boundary is between *scope presence* and *scope binding*. A token that carries scope `exec:run` but whose `aud` is `mcp://agent.example/server` is not authorized for `mcp://agent.example/server/tools/execute` unless the server has explicitly declared that the server URI is the resource indicator for that tool. The decision procedure is: - Resolve the too...",
    "operational_effect": "When the invariant is enforced, an agent that attempts to reuse a token across tools receives an authorization failure at the MCP layer, and the orchestrator must perform a fresh token acquisition for the new tool's resource URI. This forces a re-authorization event per privilege boundary crossing, which is the intended friction. When the invariant is violat..."
  },
  "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": "c6b58e18c6fc28c690c6d5f170910295b977240c2861aeb34e53927af712eeaa",
    "verified_classes": [
      "TokenBindingError",
      "Token",
      "ToolDescriptor"
    ],
    "verified_functions": [
      "_normalize_uri",
      "authorize_tool_call"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "TokenBindingError"
    ],
    "sample_fail_closed_invariants": [
      "invariant violated: server-audience token authorized tool call"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
