# What structural signals indicate that MCP OAuth 2.1 resource-server binding has silently decoupled from per-tool scoped consent **Date of Record:** 2026 November 28 **Scope:** Applies to MCP servers acting as OAuth 2.1 resource servers that mint or validate per-tool scoped access tokens (RFC 8707 resource indicators plus per-tool `scope` claims), where an agent obtains consent once and then issues tool calls across a session. Does not apply to servers using a single coarse-grained scope for the entire MCP endpoint, nor to purely local stdio transports without a token boundary. ## Core Distinction The failure mode is not "token expired" or "scope too narrow." It is **resource-server binding drift**: the OAuth 2.1 `aud`/resource indicator the token was minted for (the MCP server's canonical URI) remains valid, but the *per-tool scope projection* inside that token no longer matches the tool the agent is actually invoking — and the server accepts the call anyway because it validates the token's audience and signature but resolves tool authorization against a *stale* scope map cached at token-introspection time. The distinction that matters: a correctly-scoped-but-wrong-audience token is rejected loudly (401/403). A correctly-audienced-but-stale-scoped token is accepted *silently* — the agent gets a 200 with tool output, and the consent boundary has already been crossed. The structural signal is that **authorization succeeds on a tool the consent grant never covered**, and the only evidence is a scope claim that references a tool identifier the current server manifest no longer publishes under that name. ## What Was Observed An MCP server published two tools under a shared consent group: `repo.read` and `repo.write`, both gated by scope `repo:rw`. The agent obtained consent for `repo:rw` and the authorization server issued an access token with `scope="repo:rw"` and `resource="https://mcp.example.internal"`. The server operator then refactored the manifest: `repo.write` was split into `repo.write.file` and `repo.write.branch`, and the consent group was tightened so that `repo.write.branch` required a *new* scope `repo:branch`. The `repo:rw` scope was retained only for `repo.read` and `repo.write.file`. The authorization server was updated. The MCP resource server was **not** — its introspection cache and its tool-to-scope resolution table still mapped `repo:rw → {repo.read, repo.write.file, repo.write.branch}`. Trace of the failure: 1. Agent presents a token with `scope="repo:rw"`, `aud="https://mcp.example.internal"`, `exp` far in the future. 2. Resource server validates signature and audience — pass. This is correct and should pass. 3. Resource server resolves `tools/call` for `repo.write.branch`. It consults its *local* scope map: `repo:rw` includes `repo.write.branch`. Pass. 4. Tool executes a branch mutation. Returns 200. 5. The consent the human granted (which, post-refactor, did not include branch writes) is now violated — but no error surfaced anywhere in the chain. The structural signals, in the order they become observable: - **Manifest/scope-map version skew**: the server's `tools/list` response and its internal scope-resolution table disagree about which scope gates which tool. This is detectable by comparing the advertised `inputSchema`/scope annotations against the introspection-time map. - **Token age exceeding consent-refactor age**: a token whose `iat` predates the last manifest mutation, still accepted for a tool whose gating scope changed after `iat`. - **Scope-claim tool identifiers that no longer exist under that name**: `repo:rw` still authorizes a tool name that the current manifest publishes under a different scope. The scope string is valid; its *projection* is stale. - **Absence of a re-consent challenge on a scope-narrowing event**: when a consent group is tightened, existing tokens should be invalidated or downgraded. If branch writes succeed with a pre-tightening token, the invariant is broken. ## Condition of Validity The invariant that must hold for per-tool scoped consent to be sound: > For every accepted `tools/call`, the scope claim in the presented token, *as resolved by the server's current tool-to-scope map*, must be a subset of the scopes the human consented to *at the time the token was minted*, and the tool-to-scope map used at validation must be identical to the map used at minting. This invariant is valid only under three conditions, each of which is a place the system can silently break: 1. **Map identity across the token lifetime.** The tool-to-scope resolution table is versioned and the token carries (or the server can reconstruct) the map version in force at `iat`. Without this, refactors silently widen the effective grant. 2. **Scope-narrowing triggers re-evaluation.** Any change that *removes* a tool from a scope's projection must either invalidate outstanding tokens bearing that scope or force a step-up consent on next use of the affected tool. Widening is safe; narrowing is the dangerous direction and is the one operators most often miss. 3. **Resource indicator stability is not sufficient.** RFC 8707 `resource` binding guarantees the token is for *this server*, not for *this tool under this consent*. Audience validation passing is a necessary but radically insufficient signal. Treating `aud` match as authorization is the exact conflation that produces the silent pass. The boundary is crossed the moment the server treats "token valid for resource" as "token valid for tool." Those are different predicates and the gap between them is where stale scope maps live. ## Decision Boundary The operational decision: **when a manifest mutation narrows a consent group, do you invalidate outstanding tokens, or do you re-resolve scopes at call time against the current map?** - **Invalidate-on-narrow** is correct but disruptive: every live agent session gets a 401 mid-task and must re-enter the consent flow. For long-running agent swarms this is a continuity hazard of its own (see checkpoint/resume failures), but it is *safe*. - **Re-resolve-at-call-time** is non-disruptive but only sound if the resolution uses the *current* map and rejects any tool whose current gating scope is not in the token's scope set. This is the correct default for agent workloads — but it requires the server to stop caching the map at introspection time and instead resolve per call. - **Cache-at-introspection** (what failed here) is unsound the instant a narrowing mutation occurs, because the cached map is the *pre-narrowing* map and it will happily authorize the now-restricted tool. The decision boundary is therefore: *the scope map must be resolved at the granularity of the call, not the granularity of the token.* Any architecture that resolves tool authorization once per token and reuses it across calls is one manifest mutation away from silent consent violation. The signal that you are on the wrong side of this boundary is that your introspection cache has a TTL longer than your manifest mutation cadence. ## Operational Effect Downstream consequences once the decoupling exists: - **Consent laundering through token reuse.** A single consent grant, minted before a narrowing, becomes a standing authorization for tools the human never approved. In agent swarms this propagates: a parent agent's token is handed to sub-agents (state transfer), and each sub-agent inherits the stale projection. The blast radius scales with fan-out. - **Audit divergence.** The authorization server's log says "consent granted for `repo:rw` at T0." The resource server's log says "tool `repo.write.branch` authorized by scope `repo:rw` at T1." Both are individually true; the composition is a violation. Post-hoc audit cannot detect it without the map-version history, which is usually not retained. - **Verification replay mismatch.** When an auditor agent replays the session against the *current* manifest, the branch write is correctly rejected — producing a replay discrepancy against the original 200. The auditor and the original executor disagree not because either is wrong, but because they ran against different map versions. This is the multi-agent consensus failure that surfaces the bug weeks later. - **Silent, not loud.** No 401, no 403, no scope-mismatch error. The only structural signal is the version skew between `tools/list` and the introspection cache. Instrument for that skew explicitly; it is the earliest detectable indicator. The guardrail: bind the token to a manifest/map version, resolve tool authorization per call against the current map, and treat any narrowing mutation as a re-consent trigger for outstanding tokens. Validate audience *and* re-resolve scope; never let the first stand in for the second. ```python class StaleScopeProjectionError(RuntimeError): """Raised when a token's scope claim, resolved against the current tool-to-scope map, does not cover the requested tool — i.e. the resource-server binding has decoupled from per-tool scoped consent.""" pass def authorize_tool_call(token: dict, tool_name: str, current_scope_map: dict, map_version_at_iat: int, current_map_version: int) -> None: # 1. Audience binding (RFC 8707). Necessary, NOT sufficient. if token.get("aud") != "https://mcp.example.internal": raise StaleScopeProjectionError( f"audience mismatch for tool {tool_name!r}: {token.get('aud')!r}" ) # 2. Structural signal: map version skew across the token lifetime. if map_version_at_iat != current_map_version: # A narrowing may have occurred; we cannot trust a cached projection. # Fall through to per-call resolution against the CURRENT map. pass # 3. Resolve the tool's gating scope against the CURRENT map, per call. required_scope = current_scope_map.get(tool_name) if required_scope is None: raise StaleScopeProjectionError( f"tool {tool_name!r} absent from current scope map " f"(version {current_map_version})" ) granted = set(token.get("scope", "").split()) if required_scope not in granted: # This is the silent-pass boundary: a correctly-audienced token # whose scope no longer projects onto this tool under the current map. raise StaleScopeProjectionError( f"scope projection drift: tool {tool_name!r} now requires " f"{required_scope!r} (map v{current_map_version}); token carries " f"{sorted(granted)} minted at map v{map_version_at_iat}" ) def handle_tools_call(token: dict, tool_name: str, current_scope_map: dict, map_version_at_iat: int, current_map_version: int) -> str: authorize_tool_call(token, tool_name, current_scope_map, map_version_at_iat, current_map_version) return f"executed {tool_name}" # Reproduces the observed failure: token minted under map v1 where # repo:rw -> {repo.read, repo.write.file, repo.write.branch}; # current map v2 narrows repo.write.branch to repo:branch. token_v1 = {"aud": "https://mcp.example.internal", "scope": "repo:rw"} current_map_v2 = { "repo.read": "repo:rw", "repo.write.file": "repo:rw", "repo.write.branch": "repo:branch", # narrowed } handle_tools_call(token_v1, "repo.write.branch", current_map_v2, map_version_at_iat=1, current_map_version=2) # -> raises StaleScopeProjectionError instead of silently mutating a branch ```