# In what scenarios must an instance reject a federated MCP tool whose attestation chain has been re-anchored mid-session **Date of Record:** 2026 November 27 **Scope:** Applies to LLM agent instances that hold a live MCP client session spanning multiple organizations, where tool exposure is gated by a trust-boundary attestation (signed warrant) presented at `tools/list` and re-verified at `tools/call`. Does not apply to single-org MCP deployments where the client and server share a trust root, nor to stateless one-shot tool invocations that re-establish the session per call. ## Core Distinction The failure is not "the tool is untrusted." It is "the tool was trusted at discovery time under warrant W₁, and the server has silently re-anchored its attestation to a different trust root W₂ between `tools/list` and `tools/call`, while keeping the same tool name, schema hash, and session ID." A naive client that verifies the warrant only at call time, or only at list time, sees a valid signature both times and never notices that the *identity of the verifier* changed underneath it. The boundary is between **warrant validity** (the signature checks out against *some* root) and **warrant continuity** (the signature checks out against *the root the session was opened against*). Cross-org federation makes these diverge because the client legitimately trusts multiple roots, and a compromised or misconfigured federation broker can swap which root a given tool endpoint claims. ## What Was Observed A client agent opened an MCP session against a federated broker serving tools from three orgs (A, B, C). At `initialize`, the broker returned a capability manifest and, per tool, an attestation: `{tool, schema_hash, warrant: sign(W_A, {tool, schema_hash, endpoint, ttl})}`. The client pinned `W_A`'s public key as the trust anchor for the session and cached the `(tool → schema_hash, warrant)` tuples. At step 14 of a 30-step plan, the agent called `payments.transfer`. The server responded with a fresh warrant: `sign(W_B, {tool: payments.transfer, schema_hash, endpoint, ttl})`. The endpoint string was identical. The schema hash was identical. The tool name was identical. Only the signing root differed — and `W_B` was also in the client's trust store (org B is a legitimate federation partner). The client's verification function, which checked "is this warrant signed by *any* trusted root," returned `True`. The call executed. Post-incident replay showed the tool had been re-homed from org A's payments service to org B's, which had a subtly different ledger semantics: same schema, same endpoint DNS name (via a shared anycast), different settlement latency. The agent's downstream reconciliation assumed A's semantics and double-counted a refund. The re-anchoring was not malicious; it was a failover during A's regional outage. The client had no invariant that would have rejected it. The trace is the tell: `warrant.root_changed` fired at step 14 with `schema_hash` and `endpoint` unchanged, and no client-side check consumed that signal. ## Condition of Validity The invariant that was missing: **a session's tool exposure is bound to the trust root captured at `initialize`, and any warrant presented on `tools/call` whose root differs from the pinned root must be rejected unless the session is explicitly re-negotiated.** Formally, for session `s` with pinned root `R_s`, a call to tool `t` is admissible only if `verify(warrant, R_s) ∧ schema_hash(warrant) == cached_schema(t) ∧ endpoint(warrant) == cached_endpoint(t)`. This is valid only when: 1. The client can pin a root at session open — i.e., `initialize` returns a root identity, not just a signature. 2. Re-anchoring is a *session-level* event requiring a new `initialize` (or an explicit `reanchor` capability the client opts into), not a per-call event. 3. The federation broker cannot unilaterally rewrite the pinned root without the client observing a capability-manifest change. It does *not* hold if the deployment intentionally allows per-call root rotation (e.g., load-balanced heterogeneous backends with identical semantics). In that case the client must instead carry a *semantic* invariant — a ledger-version tag in the warrant — and the failure shifts from identity to semantics. ## Decision Boundary The decision the client must make at each `tools/call` response: - **Root matches pinned root, schema and endpoint match:** execute. - **Root matches pinned root, schema or endpoint changed:** reject — this is a schema-poisoning attempt or a broken deploy. (Already a common guardrail.) - **Root differs from pinned root, schema and endpoint match:** **reject and require re-negotiation.** This is the non-obvious case. The signature is valid; the tool behaves "the same"; the temptation is to accept. Do not. Re-anchoring with identical surface is precisely the condition under which semantic drift is invisible. - **Root differs, schema or endpoint also differ:** reject; compound change. The boundary is sharp because the *only* observable difference between "safe failover" and "trust-boundary escape" is whether the client re-ran `initialize` and re-derived its plan against the new root's declared semantics. A mid-plan re-anchor means the plan's assumptions (captured at step 0 under W_A) are now executing against W_B, and the agent's finite context cannot re-derive them without a checkpoint. ## Operational Effect Enforcing root-pinning converts a silent semantic drift into an explicit, recoverable halt. The agent emits a `TrustAnchorDriftError`, checkpoints its plan state, and either (a) re-negotiates the session against W_B and re-plans from the last checkpoint, or (b) routes the tool call to a fallback endpoint still anchored to W_A. The cost is a visible stall at the re-anchor boundary; the benefit is that no tool call ever executes under a trust root the plan was not derived against. Without the guardrail, the failure is not a crash but a *continuity violation*: the plan completes, the trace looks clean, and the discrepancy surfaces only in downstream reconciliation — often after the agent's context has been evicted and the causal link to step 14 is unrecoverable. This is the characteristic signature of federated-attestation failures: they are detected by auditors, not by the agent. ## Code ```python from dataclasses import dataclass from typing import Callable, Dict, Optional class TrustAnchorDriftError(RuntimeError): """Raised when a tool warrant is re-anchored to a root other than the one pinned at session initialize, without explicit re-negotiation.""" @dataclass(frozen=True) class Warrant: tool: str schema_hash: str endpoint: str root_id: str # identity of the signing trust root signature: bytes @dataclass(frozen=True) class PinnedTool: schema_hash: str endpoint: str class FederatedSession: def __init__(self, pinned_root: str, verify: Callable[[Warrant, str], bool]): self.pinned_root = pinned_root self._verify = verify self._tools: Dict[str, PinnedTool] = {} def register_from_list(self, warrant: Warrant) -> None: if warrant.root_id != self.pinned_root: raise TrustAnchorDriftError( f"tools/list warrant for {warrant.tool!r} signed by " f"{warrant.root_id!r}, session pinned to {self.pinned_root!r}" ) if not self._verify(warrant, self.pinned_root): raise TrustAnchorDriftError( f"tools/list warrant for {warrant.tool!r} failed signature check " f"against pinned root {self.pinned_root!r}" ) self._tools[warrant.tool] = PinnedTool(warrant.schema_hash, warrant.endpoint) def admit_call(self, warrant: Warrant) -> None: cached = self._tools.get(warrant.tool) if cached is None: raise TrustAnchorDriftError( f"tools/call for unregistered tool {warrant.tool!r}" ) # Continuity invariant: root must equal the session pin, even if the # signature would validate against some other trusted root. if warrant.root_id != self.pinned_root: raise TrustAnchorDriftError( f"tool {warrant.tool!r} re-anchored from {self.pinned_root!r} " f"to {warrant.root_id!r} mid-session; require re-initialize" ) if not self._verify(warrant, self.pinned_root): raise TrustAnchorDriftError( f"tools/call warrant for {warrant.tool!r} failed signature check" ) if warrant.schema_hash != cached.schema_hash: raise TrustAnchorDriftError( f"schema drift on {warrant.tool!r}: " f"{cached.schema_hash!r} -> {warrant.schema_hash!r}" ) if warrant.endpoint != cached.endpoint: raise TrustAnchorDriftError( f"endpoint drift on {warrant.tool!r}: " f"{cached.endpoint!r} -> {warrant.endpoint!r}" ) # Admissible: root, schema, and endpoint all continuous with discovery. ```