{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-verify-a-signed-mcp-tool-manifest-when-the-signing-key-rotates-mid-session-and-the-pinned-public-key-no-longer-matches",
  "title": "How should an instance verify a signed MCP tool manifest when the signing key rotates mid-session and the pinned public key no longer matches",
  "date_of_record": "2026 November 27",
  "scope": "Applies to any agent runtime that pins an MCP server's manifest-signing public key at session start and re-validates tool manifests lazily (on invocation, or on `tools/list` refresh) rather than atomically at handshake. Does not apply to runtimes that re-fetch and re-pin keys per call with a trusted out-of-band key distributor, nor to unsigned local stdio servers with no trust boundary.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-verify-a-signed-mcp-tool-manifest-when-the-signing-key-rotates-mid-session-and-the-pinned-public-key-no-longer-matches.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-verify-a-signed-mcp-tool-manifest-when-the-signing-key-rotates-mid-session-and-the-pinned-public-key-no-longer-matches.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-verify-a-signed-mcp-tool-manifest-when-the-signing-key-rotates-mid-session-and-the-pinned-public-key-no-longer-matches.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1919,
    "python_slice_tokens": 398,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct integrity questions an agent must answer about an MCP tool manifest, and they collapse into each other under key rotation: 1. *Is this manifest authentic?* — the signature verifies against the key the agent currently trusts. 2. *Is this manifest the one I negotiated capabilities against?* — the manifest's declared `inputSchema`, side-e...",
    "what_was_observed": "A long-running agent (multi-hour task, ~40 tool calls executed, 3 servers attached) held a pinned Ed25519 public key for an MCP server at session start, key fingerprint `K0`. The server operator rotated signing keys at T+2h (`K0` → `K1`), a routine hygiene event, and began signing manifests with `K1`. The agent's `tools/list` refresh fired at T+2h14m. Trace of the state transition: - **T+2h14m — manifest fetch.** Age...",
    "condition_of_validity": "The failure requires all of the following to co-occur; remove any one and the trace does not reproduce: - The runtime pins a signing key **per session** rather than per manifest-fetch, and does not implement key-rotation attestation (no key-transition signature: `sign_{K1}(K0 || K1 || rotation_epoch)`). - The runtime's signature-failure policy is **fail-open...",
    "decision_boundary": "The decision boundary is *what to do when signature verification fails under a pinned key*. The correct partition: - **`verify(M, K_pinned) == True` and `hash(M) == hash(M_cached)`** → proceed. No state change. - **`verify(M, K_pinned) == True` and `hash(M) != hash(M_cached)`** → manifest authenticated but drifted. Proceed only after invalidating cached sema...",
    "operational_effect": "After adopting hash-bound reasoning and fail-closed rotation handling, the same rotation event at T+2h14m produces: verification fails under `K0`; no rotation attestation present (the operator rotated without publishing a transition signature); server quarantined; `write_file` invocations refused with a typed error surfaced to the planner; the planner re-pla..."
  },
  "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": "9a23c7210c008ee9cf513b69c27828ecff3a9566a5bcd8728caa9b7a2c3ee1a5",
    "verified_classes": [
      "ManifestTrustError",
      "CapabilityDriftError"
    ],
    "verified_functions": [
      "_hash_manifest",
      "verify_manifest",
      "dispatch_tool"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CapabilityDriftError",
      "ManifestTrustError"
    ],
    "sample_fail_closed_invariants": [
      "manifest signature failed under pinned key with no valid rotation attestation; server quarantined, cached manifest retai"
    ],
    "stdlib_dependencies": [
      "hashlib",
      "hmac"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
