{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-scope-delegation-collapse-when-an-mcp-server-reuses-a-single-upstream-token-across-per-tool-least-privilege-boundaries",
  "title": "How does an instance detect scope-delegation collapse when an MCP server reuses a single upstream token across per-tool least-privilege boundaries",
  "date_of_record": "2026 November 27",
  "scope": "Applies to MCP servers that front a delegated OAuth identity (RFC 8693 token exchange or refresh-token downscoping) and expose multiple tools mapped to distinct scopes. Does not apply to servers using per-tool static credentials with no upstream delegation, nor to pure capability-negotiation failures that occur before authorization.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-scope-delegation-collapse-when-an-mcp-server-reuses-a-single-upstream-token-across-per-tool-least-privilege-boundaries.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-scope-delegation-collapse-when-an-mcp-server-reuses-a-single-upstream-token-across-per-tool-least-privilege-boundaries.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-scope-delegation-collapse-when-an-mcp-server-reuses-a-single-upstream-token-across-per-tool-least-privilege-boundaries.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1416,
    "python_slice_tokens": 252,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent got the wrong scope.\" It is that the MCP server, having minted or cached one delegated access token per *session* rather than per *tool invocation*, silently serves a high-privilege token to a low-privilege tool call. From the client's perspective every tool call carries a correctly-scoped `authorization` grant in the MCP `initi...",
    "what_was_observed": "A filesystem+secrets MCP server exposed two tools: `read_file` (scope `fs:read`) and `rotate_credential` (scope `secrets:write`). The client performed a token exchange at `initialize` requesting both scopes because the workflow needed both tools. The server exchanged the client's assertion for an upstream token with `scope=\"fs:read secrets:write\"` and cached it keyed by `session_id`. The agent's planner then issued a...",
    "condition_of_validity": "This analysis holds only when all of the following are true: 1. The MCP server performs delegation (token exchange or refresh) rather than proxying the client's own token verbatim. If the client's token is forwarded unchanged, the over-privilege is the client's, not a server collapse. 2. The client asserts per-call scopes in the envelope (i.e., it practices ...",
    "decision_boundary": "The server must decide, on every `tools/call`, whether to reuse the cached session token or mint a fresh downscoped token. The boundary is: - **Reuse is safe** iff `cached_token.scope == asserted_scopes` (set equality, not subset). Equality means the cached token was already minted for exactly this call's authority. - **Re-mint is required** iff `asserted_sc...",
    "operational_effect": "With the equality-or-remint rule enforced, the upstream audit log shows, for each operation, a bearer token whose `scope` exactly matches the MCP envelope's asserted scopes. The over-privilege window closes: a `read_file` call can no longer carry `secrets:write` upstream even though the session negotiated it. The cost is one token exchange per downscoped cal..."
  },
  "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": "f0ffa34867c76cb36761ac7058f61c5ed5789225fe472adc9cc548e28030db60",
    "verified_classes": [
      "ScopeDelegationCollapse",
      "DelegatedToken",
      "ScopeDelegatingMCPGateway"
    ],
    "verified_functions": [
      "__init__",
      "_mint",
      "authorize_tool_call"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ScopeDelegationCollapse"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
