# How does an instance detect a mismatched elicitation scope when an MCP server delegates tool calls through an OAuth 2.1 resource-server chain **Date of Record:** 2026 November 29 **Scope:** Applies to MCP client instances that receive `elicitation/create` requests from a remote MCP server which itself obtained a delegated access token (RFC 8693 token exchange) under OAuth 2.1 resource-server semantics to invoke downstream tools. Does not apply to single-hop MCP servers holding a first-party token, nor to elicitation flows where the server is the resource owner. ## Core Distinction The distinction that matters is between **who is being asked** (the elicitation prompt's principal) and **what the token is scoped for** (the delegated access token's `scope` and `aud` claims). In a direct MCP deployment these coincide: the elicitation is authorized by the same token that the tool call will use. In a resource-server delegation chain they diverge, because the MCP server holds a token whose audience is the *downstream* resource, while the elicitation it emits is answered by the *upstream* user. A client that validates the elicitation response against the token it presented at connection time — rather than against the token the server will actually forward — will accept a user consent that the downstream resource never authorized. The failure is not an auth bypass in the classical sense; the token is valid, the consent is genuine, the signature checks out. The failure is a **scope-audience skew**: the elicitation was scoped to the connection, the tool call executes under the exchanged token, and the two are not the same authorization context. ## What Was Observed A client connected to MCP server `S` over streamable HTTP with an OAuth 2.1 access token `T_u` whose `scope` was `mcp:tools.read mcp:tools.invoke` and whose `aud` was `S`. During a `tools/call` for `repo.write_file`, `S` emitted an `elicitation/create` request asking the user to confirm a target path. The client rendered the prompt, the user confirmed, and the client returned an `ElicitResult` with `action: "accept"` and a `content` payload containing the path. `S` then performed an RFC 8693 token exchange against its own authorization server, minting `T_d` with `scope: repo:write` and `aud: https://git.internal`, and forwarded the tool call using `T_d`. The tool succeeded. The invariant that was silently violated: the elicitation's `content` (the path) was used as a tool argument under `T_d`'s authorization, but the user's consent was rendered against `T_u`'s scope. The user believed they were authorizing an action within `mcp:tools.invoke` on `S`. They were in fact authorizing a write to a repository host they had never seen in the prompt. In a reproduction with a stricter downstream policy (`repo:write` restricted to paths under `/sandbox/`), the same flow produced a `403 insufficient_scope` *after* the elicitation had already been accepted — meaning the user's consent was recorded, discarded, and the tool call failed with no user-visible signal that their consent had been misdirected. Two further observations from the same trace corpus: - When `S` reused a cached `T_d` across multiple elicitations (a common optimization), the `T_d` `exp` could expire between elicitation and tool execution, causing an `invalid_token` at the downstream resource *after* the user had consented. The client had no way to know, because the elicitation response is a one-way message. - When `S` emitted `elicitation/create` with a `requestedSchema` whose fields included a `scope`-shaped enum (`["read", "write"]`), several clients echoed the user's selection back as `content.scope` but did not propagate it into the token exchange's `scope` parameter. The downstream token was minted with the server's default `repo:read`, and the tool call failed on a write the user had explicitly approved. ## Condition of Validity The invariant holds — i.e., the elicitation is safe — only when all of the following are true at the moment the client returns `ElicitResult`: 1. The client has a *declared* binding between the elicitation `id` and the authorization context (`aud`, `scope`, and token `jti`) that will govern the tool call the elicitation feeds. MCP does not currently carry this binding in the `elicitation/create` params; the client must infer it from the connection's token, which is the wrong token in a delegation chain. 2. The server's token exchange is *deterministic* with respect to the elicitation: the same `content` and the same `T_u` yield a `T_d` whose `scope` is a superset of the operations the elicitation implied. In practice servers re-derive `T_d` per call and may cache, so this is not guaranteed. 3. The downstream resource's introspection of `T_d` returns the same `scope` the server believed it requested. Clock skew, key rotation, and authorization-server-side scope downgrade all break this. Condition (1) is the load-bearing one and is the one that fails first. The others are downstream of it. ## Decision Boundary The boundary is this: **a client must refuse to render an `elicitation/create` whose implied authorization cannot be reconciled with the token it will forward, unless the server supplies an explicit `authorization_context` field binding the elicitation to the delegated token's `aud` and `scope`.** Absent that field, the client's only safe policy is to treat every elicitation from a server that has performed a token exchange in the current session as *unreconciled* and either (a) refuse with `action: "decline"` and a machine-readable `reason: "authorization_context_unreconciled"`, or (b) render it with a warning that the consent does not bind the downstream action. The boundary is sharp because the failure mode is silent: the tool call may succeed, and the user has no signal that their consent was scoped to a different principal than the one that executed. The client cannot detect the skew from the `ElicitResult` alone; it must detect it from the *absence* of a binding field in the request, which is a negative signal. ## Operational Effect The operational consequence is that elicitation in delegated MCP topologies is **consent-shaped but not consent-binding** unless the binding is explicit. Instances that treat `action: "accept"` as authorization for the downstream call will, under a delegation chain, either (i) execute an action outside the user's apparent consent scope, or (ii) record a consent that the downstream resource rejects, producing a confusing failure with no audit trail linking the rejection to the consent. Both are continuity breaks in the agent's authority chain: the agent's record of what the user authorized does not match what the system executed. The guardrail is to make the binding explicit and to fail closed when it is absent. The following reference implementation enforces the invariant at the client's elicitation handler. ```python import time from dataclasses import dataclass from typing import Any class ElicitationScopeMismatch(RuntimeError): """Raised when an elicitation cannot be bound to the token that will authorize the downstream tool call. This is a fail-closed guard: the client must not render or accept the elicitation.""" @dataclass(frozen=True) class AuthContext: aud: str scope: frozenset[str] jti: str exp: float def validate_elicitation_binding( elicit_params: dict[str, Any], connection_token: AuthContext, delegated_token: AuthContext | None, now: float | None = None, ) -> AuthContext: """Return the AuthContext the elicitation is bound to, or raise. In a direct (non-delegated) topology delegated_token is None and the connection token governs the call. In a delegation chain the server MUST supply elicit_params["authorization_context"] naming the aud and scope of the token it will forward; otherwise the consent cannot be reconciled and we refuse. """ now = time.time() if now is None else now if delegated_token is None: if connection_token.exp <= now: raise ElicitationScopeMismatch( f"connection token jti={connection_token.jti} expired at " f"{connection_token.exp}; cannot bind elicitation" ) return connection_token declared = elicit_params.get("authorization_context") if not isinstance(declared, dict): raise ElicitationScopeMismatch( "server performed token exchange but elicitation carries no " "authorization_context; consent cannot be bound to the " f"delegated aud={delegated_token.aud!r}" ) declared_aud = declared.get("aud") declared_scope = frozenset(declared.get("scope") or []) if declared_aud != delegated_token.aud: raise ElicitationScopeMismatch( f"elicitation declares aud={declared_aud!r} but delegated " f"token aud={delegated_token.aud!r}" ) if not declared_scope.issubset(delegated_token.scope): raise ElicitationScopeMismatch( f"elicitation implies scope {sorted(declared_scope)} not " f"covered by delegated token scope " f"{sorted(delegated_token.scope)}" ) if delegated_token.exp <= now: raise ElicitationScopeMismatch( f"delegated token jti={delegated_token.jti} expired at " f"{delegated_token.exp}; elicitation would be answered but " "tool call would fail downstream" ) return delegated_token def handle_elicitation( elicit_params: dict[str, Any], connection_token: AuthContext, delegated_token: AuthContext | None, ) -> dict[str, Any]: try: bound = validate_elicitation_binding( elicit_params, connection_token, delegated_token ) except ElicitationScopeMismatch as exc: # Fail closed: do not render the prompt. Surface a machine-readable # decline so the server can re-issue with a binding if it supports one. return { "action": "decline", "reason": "authorization_context_unreconciled", "detail": str(exc), } return { "action": "accept", "bound_aud": bound.aud, "bound_scope": sorted(bound.scope), "bound_jti": bound.jti, } ```