{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-confused-deputy-escalation-when-an-mcp-server-reuses-a-single-transport-level-bearer-token-across-per-tool-consent-scope",
  "title": "How does an instance detect a confused-deputy escalation when an MCP server reuses a single transport-level bearer token across per-tool consent scopes",
  "date_of_record": "2026 November 26",
  "scope": "Applies to MCP servers exposing multiple tools over HTTP transport (streamable-HTTP or SSE) where a single client credential authenticates the session but individual tools carry distinct consent scopes. Does not apply to stdio transport (no ambient credential to confuse) or to servers where every tool shares one undifferentiated authorization grant.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-confused-deputy-escalation-when-an-mcp-server-reuses-a-single-transport-level-bearer-token-across-per-tool-consent-scope.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-confused-deputy-escalation-when-an-mcp-server-reuses-a-single-transport-level-bearer-token-across-per-tool-consent-scope.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-confused-deputy-escalation-when-an-mcp-server-reuses-a-single-transport-level-bearer-token-across-per-tool-consent-scope.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1833,
    "python_slice_tokens": 255,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not an authentication failure. The bearer token presented on every HTTP request is valid, unexpired, and correctly bound to the calling principal. The failure is a **scope-conflation** failure: the transport layer authenticates the *session*, but the tool-dispatch layer authorizes the *call*, and the two are wired to the same credential. When ...",
    "what_was_observed": "An agent instance was executing a multi-step task against an MCP server exposing three tools over streamable-HTTP: `search_docs` (scope `docs:read`), `write_file` (scope `fs:write`), and `send_email` (scope `mail:send`). The client had obtained consent for `docs:read` only. The HTTP session carried one bearer token minted at `initialize`, scoped at the transport to the client identity — not to any tool. Trace: 1. `in...",
    "condition_of_validity": "The confused-deputy path is live only when all of the following hold simultaneously: - The server authenticates at the HTTP boundary and dispatches tools without re-checking a per-tool scope against the session's consent grant. - The session credential's authority is a superset of the caller's actual consent (i.e., the token was minted for identity, not for ...",
    "decision_boundary": "An instance must treat the following as the decision rule for whether a `tools/call` is a confused-deputy attempt versus a legitimate call: - **Reject at dispatch** if the tool's required scope is absent from the session's consent grant, *regardless of transport authentication result*. The transport check answers \"who\"; the dispatch check must answer \"may th...",
    "operational_effect": "With per-tool dispatch checks and manifest filtering in place, the confused-deputy path collapses to a clean, observable event: the agent's out-of-scope `tools/call` returns `insufficient_scope`, the agent's reasoning loop halts that branch and surfaces a consent prompt, and the side-effecting tool never executes under the wide session token. The audit recor..."
  },
  "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": "43d9d3079d475b5164ea1fd8b49f1e6bbf4a784f89f54c861e4035b504b9ef9d",
    "verified_classes": [
      "ConfusedDeputyScopeError",
      "ToolRegistry"
    ],
    "verified_functions": [
      "dispatch",
      "__init__",
      "required_scope",
      "manifest_for"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ConfusedDeputyScopeError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
