{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-per-tool-least-privilege-scopes-from-silently-widening-across-mcp-sessions",
  "title": "Which invariants prevent per-tool least-privilege scopes from silently widening across MCP sessions",
  "date_of_record": "2026 November 28",
  "scope": "Applies to MCP (Model Context Protocol) hosts that enforce per-tool scope grants at runtime and emit audit trails for each `tools/call`. Does not cover static manifest review, transport-level TLS, or OAuth token issuance—only the runtime decision point where a granted scope is matched against a tool invocation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-per-tool-least-privilege-scopes-from-silently-widening-across-mcp-sessions.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-per-tool-least-privilege-scopes-from-silently-widening-across-mcp-sessions.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-per-tool-least-privilege-scopes-from-silently-widening-across-mcp-sessions.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1787,
    "python_slice_tokens": 253,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two structurally different ways an MCP server can appear to honor least-privilege scoping: 1. **Scope-as-token**: the grant is a bearer capability checked at the boundary of each call. The scope is a property of the *invocation*, re-evaluated every time. 2. **Scope-as-session-attribute**: the grant is attached to the `initialize` handshake and inhe...",
    "what_was_observed": "A host proxy multiplexed three sub-agents (a planner, a retriever, and a summarizer) onto one upstream MCP session to amortize the `initialize` round-trip. The server advertised `tools/list` with per-tool `requiredScopes` metadata, and the host enforced a policy table mapping each sub-agent to an allowed scope set. Sequence of events: - The planner sub-agent issued `tools/call` for `fs.read` with scope `fs:read:/work...",
    "condition_of_validity": "The invariant that prevents this is **scope non-accumulation per invocation**: > For every `tools/call`, the authorization decision MUST be a pure function of (the caller's asserted scope, the tool's declared `requiredScopes`, the resource argument in the call) and MUST NOT depend on any scope granted on a prior call over the same session or transport. This ...",
    "decision_boundary": "The boundary between safe and unsafe enforcement is whether the server's authorization path touches any state that outlives a single `tools/call`. Concretely: The last row is the subtle one. A keyed cache is safe only if the key includes the principal and the invalidation is complete. In practice, \"provably complete invalidation\" is the part that fails under...",
    "operational_effect": "Under the invariant, the observed failure becomes impossible by construction: the summarizer's call on `/data/corpus/secret.txt` is evaluated against `{fs:read:/work/summary/**}` alone, fails the pattern match, and returns an authorization error before the tool executes. The audit record for the denied call now shows the evaluated scope set, so the denial is..."
  },
  "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": "fcd72e807426fab1b9d7e28c7c2f0c777a4355cef9c0d67fdfb13441c864ad6b",
    "verified_classes": [
      "ScopeAccumulationError"
    ],
    "verified_functions": [
      "authorize_call",
      "emit_audit"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ScopeAccumulationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
