Technical Guide

MCP Tool Manifest Hash and Integrity Verification

An MCP tool manifest hash is a cryptographic digest computed over a tool's name, description, and input schema, used to detect whether a manifest has changed between the time a client approves a tool and the time that tool is invoked. The Model Context Protocol specification does not define this mechanism natively, so it is implemented as an organization-level control using a hash algorithm such as SHA-256 applied to a canonicalized manifest representation.

Architectural Components Required for Consistent Enforcement

Hash comparison is only useful if it is wired into the right points of the tool lifecycle. The components below describe where verification needs to live and what it depends on to remain trustworthy.

  1. 1

    Where hash verification belongs in the MCP lifecycle

    Verification must occur between manifest retrieval and tool invocation, not only once at initial approval.

  2. 2

    Independent hash registry

    Baseline hashes must be stored outside the MCP server itself, since a compromised server should not be able to alter its own trust record.

  3. 3

    Client-layer verification

    Hash comparison logic should intercept manifests before they reach the host application or agent reasoning loop, not after.

  4. 4

    Centralized or synchronized registry

    Distributed deployments with multiple hosts connecting to shared servers need a consistent source of baseline hashes to avoid conflicting trust decisions.

  5. 5

    Transport-aware controls

    Remote HTTP/SSE connections introduce network-layer tampering risk distinct from local stdio connections and require transport security in addition to hashing.

  6. 6

    Comparison logging

    Recording match, mismatch, and first-seen events supports audit review of when and how a manifest changed.

What a Manifest Hash Verifies and What It Does Not

In MCP, a server exposes its tools through a discovery call that returns a schema-based manifest containing a tool's name, description, and JSON Schema input definition. A manifest hash is a digest computed over that data, typically using SHA-256, applied to a canonicalized form of the manifest so that field ordering or whitespace differences do not produce false mismatches.

The hash itself answers one question: does this manifest match a previously recorded state. It does not answer whether the manifest originated from a trusted server; that is a separate concern handled by transport security and server authentication. Treating hash verification as identity verification is a common implementation error, since the two mechanisms protect against different failure modes and both are required for a complete trust decision.

Attack Scenarios Addressed, and What Remains Open

Security researchers have documented two closely related patterns relevant to manifest integrity. In tool poisoning, a server presents a manifest whose description contains hidden instructions intended to manipulate agent behavior. In an MCP rug pull, a server alters a tool's description or schema after a user or client has already approved it, so the agent later acts on content that was never reviewed.

Manifest hash verification directly addresses the rug pull pattern by detecting that the approved manifest has changed, forcing re-approval rather than silent execution against altered instructions. It does not, by itself, detect tool poisoning present at initial registration, since a hash will faithfully validate a malicious manifest if that manifest was the one originally approved. Hashing is a drift-detection control, not a content-safety control, and enterprises should not treat it as a substitute for reviewing manifest content at approval time.

Implementation Decisions Enterprises Must Make

Before relying on a manifest hashing implementation, teams should be able to answer the following questions with specifics rather than assumptions:

  • Is the baseline hash computed and stored independently of the MCP server providing the tool?
  • At what point in the invocation path is the hash re-verified, and what is the defined response to a mismatch?
  • Is the hash algorithm and canonicalization method documented and version-controlled?
  • Is there a defined workflow to distinguish legitimate manifest updates from unauthorized changes?
  • Are integrity controls applied consistently across both local stdio and remote HTTP/SSE server connections?

Manifest Integrity at a Glance

A simplified view of where each control point sits in the lifecycle of a verified tool.

StageDescription
BaselineHash computed and stored at tool registration.
TransportLocal stdio or remote HTTP/SSE exposure.
Re-verificationHash recomputed before invocation.
EnforcementMismatch triggers block, alert, or quarantine.

Manifest hashing is one control in a broader runtime trust model

Trussed AI provides runtime governance for AI agents, including MCP tool approval workflows, agent permissions, and audit logging that support manifest integrity enforcement as part of a documented security control rather than an assumed protocol guarantee.

Explore MCP Security