{
  "schema_version": "1.3.0",
  "slug": "when-must-an-mcp-federation-gateway-refuse-a-delegated-capability-token-that-is-structurally-valid-but-semantically-over",
  "title": "When must an MCP federation gateway refuse a delegated capability token that is structurally valid but semantically over-broad?",
  "date_of_record": "2026 November 5",
  "scope": "Applies to cross-organization Model Context Protocol (MCP) federation where a client in org A invokes a tool exposed by an MCP server in org B through a federation gateway that mints or exchanges delegated capability tokens. Does not apply to single-tenant MCP deployments where token issuer and resource server share a trust root, nor to purely opaque session tokens with no delegated scope claims.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-mcp-federation-gateway-refuse-a-delegated-capability-token-that-is-structurally-valid-but-semantically-over.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-mcp-federation-gateway-refuse-a-delegated-capability-token-that-is-structurally-valid-but-semantically-over.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-mcp-federation-gateway-refuse-a-delegated-capability-token-that-is-structurally-valid-but-semantically-over.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1247,
    "python_slice_tokens": 210,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"invalid token\" versus \"valid token.\" It is **structurally valid but semantically over-broad delegation**: a token whose signature, issuer, audience, and expiry all verify, and whose scope strings are individually well-formed, yet whose *aggregate* scope exceeds the intersection of (a) what the delegating principal actually holds, (b)...",
    "what_was_observed": "In a two-org federation (org `acme` client, org `globex` MCP server exposing `files.read`, `files.write`, `db.query`), the gateway exchanged an `acme` user token scoped to `files.read` for a `globex`-audience token. The `globex` server's federation policy granted the `acme` org the capability set `{files.read, db.query}`. The re-minted token carried `files.read` **plus** `db.query` because the gateway merged the user...",
    "condition_of_validity": "The gateway may pass a delegated token to the downstream MCP server only when **all** hold simultaneously: 1. `terminal_scope ⊆ originating_principal_scope` (no escalation across the delegation chain). 2. `terminal_scope ⊆ federation_agreement[org_A][org_B].allowed_capabilities` (org-level treaty). 3. `terminal_scope ⊆ target_server.declared_capability_surfa...",
    "decision_boundary": "Refuse (fail closed) when the intersection is strictly smaller than the requested terminal scope and the difference is non-empty. Do **not** silently downgrade to the intersection — silent downgrade hides escalation attempts and breaks the caller's expectation of atomic capability, producing partial tool execution that is harder to audit than a clean rejecti...",
    "operational_effect": "Enforcing the conjunction at call time converts a silent cross-org privilege escalation into a loud, auditable rejection at the federation gateway. The cost is one additional scope-resolution step per call (originator lookup + treaty lookup + surface lookup), which is cacheable *per (principal, org-pair, server)* but must be invalidated on any upstream scope..."
  },
  "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": "6202e681f97ee86cd869ce7eb848b6df00f6815362c85c2fd8598a6bbe8f7684",
    "verified_classes": [
      "DelegationScopeEscalation",
      "FederationContext"
    ],
    "verified_functions": [
      "authorize_delegated_call"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "DelegationScopeEscalation"
    ],
    "sample_fail_closed_invariants": [
      "cached federation grant is stale relative to upstream scope narrowing; re-evaluate before dispatch",
      "originating principal scope unresolvable; cannot prove non-escalation"
    ],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
