{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-consent-scope-drift-in-mcp-authorization-extensions-built-on-oauth-2-1-resource-server-patterns",
  "title": "Which invariants prevent consent-scope drift in MCP authorization extensions built on OAuth 2.1 resource-server patterns",
  "date_of_record": "2026 November 13",
  "scope": "Applies to MCP servers acting as OAuth 2.1 resource servers that bind access tokens to tool-level scopes and enforce per-invocation consent, where the authorization server (AS) and the MCP server are distinct trust domains. Does not apply to single-process MCP servers using static API keys, nor to delegated flows where the MCP server itself mints tokens.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-consent-scope-drift-in-mcp-authorization-extensions-built-on-oauth-2-1-resource-server-patterns.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-consent-scope-drift-in-mcp-authorization-extensions-built-on-oauth-2-1-resource-server-patterns.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-consent-scope-drift-in-mcp-authorization-extensions-built-on-oauth-2-1-resource-server-patterns.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1651,
    "python_slice_tokens": 210,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct notions of \"scope\" in an MCP authorization extension, and conflating them is the root of the failure mode: 1. **Token scope** — the set of scopes the AS asserted in the access token (`scope` claim), which the resource server treats as *maximally grantable authority* for the lifetime of that token. 2. **Consent scope** — the set of tool...",
    "what_was_observed": "In a deployment where the MCP server validated JWTs locally (JWKS, no introspection), the following sequence produced scope drift without any token forgery or signature failure: - A client obtained a token with `scope=\"tools:read tools:write\"` after the user consented to read-only tooling. The AS had a \"remember consent\" feature that unioned scopes across prior grants from the same client, so the token carried `tools...",
    "condition_of_validity": "The subset-chain invariant `effective ⊆ consent ⊆ token` holds at call time only if **all three** of the following are enforced, and the boundary failure occurs precisely when any one is assumed rather than checked: 1. **Consent is a first-class, server-side artifact**, not inferred from token scope. The MCP server must persist the consent decision (which to...",
    "decision_boundary": "The discriminating question for an operator or agent is: **\"Can a valid, unexpired, correctly-signed token cause a tool invocation the user did not approve in the current consent session?\"** If the answer is yes, the deployment is in the drift-prone regime regardless of how clean the token validation looks. Concretely: - If consent is derived from `token.sco...",
    "operational_effect": "The practical consequence is that tool-scoping correctness in MCP authorization extensions is a **three-way intersection enforced at the resource server**, and the resource server — not the AS — owns the `effective ⊆ consent` check. Deployments that push all consent logic to the AS and treat the RS as a pure scope-enforcer will pass every conformance test an..."
  },
  "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": "b7b297d16d6f6688d2ad294fd3e50fc9d14989a887c93b58785c594044918b43",
    "verified_classes": [
      "ConsentScopeDriftError",
      "InvocationContext"
    ],
    "verified_functions": [
      "authorize_tool_call"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ConsentScopeDriftError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
