# In what scenarios must an instance reject an MCP tool call despite a valid capability attestation **Date of Record:** 2026 November 15 **Scope:** Applies to MCP (Model Context Protocol) servers that advertise capabilities via signed attestation documents and are consumed by an orchestrating agent that performs runtime integrity verification before each tool invocation. Does not apply to first-party, in-process tool registries where the tool implementation and the caller share an address space and a trust boundary. ## Core Distinction A capability attestation answers *"what is this server permitted and configured to do?"* — it is a statement about **authority and declared surface**. Runtime integrity verification answers *"is the process I am about to call the same process the attestation describes, right now?"* — it is a statement about **identity and current state**. The non-obvious failure is treating a valid, unexpired, correctly-signed attestation as sufficient authorization to invoke a tool. These are orthogonal predicates. An attestation can be perfectly valid while the runtime that would service the call has drifted from the attested configuration. The attestation is a *claim about a class of deployments*; the invocation targets a *specific live instance*. The gap between the two is where third-party MCP tool providers fail. Concretely: an attestation binds `{provider_id, tool_name, schema_hash, declared_scopes, build_digest}` under a provider signature. It does **not** bind the PID, the loaded shared libraries, the resolved DNS endpoint, the environment variables, or the effective tool schema the server will actually parse against at call time. Those are only knowable at runtime, and only verifiable by challenge. ## What Was Observed Across a set of third-party MCP providers, four recurring conditions produced a *valid attestation paired with an unsafe invocation*: 1. **Schema drift under a stable `tool_name`.** The provider published a new server build that widened an input schema (added an optional object field that the implementation then dereferenced unconditionally). The attestation's `schema_hash` covered the *published* schema, not the *served* schema. Verification passed because the hash matched the registry entry; the call failed or, worse, executed with different semantics. The attestation was valid and irrelevant. 2. **Endpoint substitution.** The attestation named `provider_id` and a build digest, but resolution of the server endpoint went through a mutable record. A rolling deploy pointed the name at a new instance whose build digest was not yet reflected in the attestation. The call reached an unattested build. Integrity of the *document* held; integrity of the *target* did not. 3. **Scope over-grant at runtime.** A server was started with an environment variable that expanded its filesystem scope beyond the `declared_scopes` in the attestation. The attestation was truthful about what the provider *intended to grant*; the live process granted more. A caller that reads only the attestation will believe the tool cannot touch paths it in fact can. 4. **Stale attestation after revocation propagation lag.** A provider revoked a build and re-issued an attestation. The caller's cache still held the prior attestation (valid signature, unexpired `not_after`) and admitted a call to a build the provider had already withdrawn. Verification against the cached document succeeded; verification against the *current* document would have failed. In each case the standard check — *signature valid, not expired, `tool_name` present, `schema_hash` matches registry* — returned true. The call was nonetheless unsafe. ## Condition of Validity The attestation is a valid authorization to invoke **only when** all of the following hold simultaneously at the moment of the call: - The attestation is the **current** one for `provider_id` (not merely unexpired — re-fetch or compare against a monotonic version, do not trust cache TTL alone). - The **live target** presents a build digest and a served-schema hash that match the attestation, obtained by a runtime challenge (e.g., a signed `describe` response over the same channel that will service the call), not by reading the registry. - The **effective scopes** the process reports at runtime are a subset of `declared_scopes` — runtime scopes may be narrower, never wider. - The endpoint resolution is **pinned** for the duration of the call (the name resolved to the attested instance, and that binding is not re-resolved mid-invocation). If any of these is unverifiable, the correct posture is not "assume valid" but "treat as unattested." Absence of a runtime challenge response is a failure, not a pass. ## Decision Boundary The boundary is between **attestation-valid** and **invocation-safe**. They coincide only under the four conditions above. The decision rule: - *Attestation invalid* → reject, unconditionally. - *Attestation valid but runtime challenge fails, times out, or returns a digest/schema/scope set that does not match* → **reject**, even though every signature check passed. This is the case operators get wrong. - *Attestation valid, runtime challenge matches, but the attestation is not the current version* → reject and refresh; do not proceed on the cached document. - *Attestation valid, runtime matches, current version confirmed* → admit. The subtlety that makes this non-obvious: a valid attestation is *necessary but not sufficient*. Systems that model attestation as an authorization token (present it, proceed) rather than as a *claim to be reconciled against a live probe* will admit calls to drifted, substituted, over-scoped, or revoked runtimes. The failure is silent because the signature verifies. ## Operational Effect When the boundary is enforced, third-party tool calls carry a per-invocation cost: one runtime challenge round-trip and one currency check against the provider's current attestation. This is the price of closing the gap between "the provider said" and "the instance is." When it is not enforced, the system exhibits *attestation theater*: full cryptographic ceremony, zero binding to the executing process, and failures that surface only as downstream data corruption or scope violations traced back to a call that "passed verification." The operational lesson is to treat the runtime challenge as the authoritative half of verification and the signed attestation as the constraint the challenge must satisfy. Neither alone authorizes a call. ```python import hashlib from dataclasses import dataclass class UnattestedInvocationError(RuntimeError): """Raised when a tool call would reach a runtime that does not match its attestation.""" pass @dataclass(frozen=True) class Attestation: provider_id: str tool_name: str schema_hash: str declared_scopes: frozenset build_digest: str version: int not_after: float @dataclass(frozen=True) class RuntimeProbe: build_digest: str served_schema_hash: str effective_scopes: frozenset def authorize_invocation( attestation: Attestation, probe: RuntimeProbe | None, current_version: int, now: float, ) -> None: if now >= attestation.not_after: raise UnattestedInvocationError( f"attestation for {attestation.provider_id}/{attestation.tool_name} expired" ) if attestation.version != current_version: raise UnattestedInvocationError( f"stale attestation v{attestation.version} != current v{current_version}; refresh required" ) if probe is None: raise UnattestedInvocationError( "no runtime challenge response; absence of proof is not proof" ) if probe.build_digest != attestation.build_digest: raise UnattestedInvocationError( f"endpoint substitution: live build {probe.build_digest} != attested {attestation.build_digest}" ) if probe.served_schema_hash != attestation.schema_hash: raise UnattestedInvocationError( "schema drift: served schema does not match attested schema_hash" ) if not probe.effective_scopes.issubset(attestation.declared_scopes): over = probe.effective_scopes - attestation.declared_scopes raise UnattestedInvocationError( f"runtime scope over-grant beyond attestation: {sorted(over)}" ) # All four conditions hold: attestation-valid coincides with invocation-safe. ```