MCP needs a lockfile
npm has package-lock. pip has a lock. The MCP protocol has no equivalent row.
Read Fig. 17 as text
npm pip MCP
you declare package.json requirements.txt mcp.json
you pin package-lock.json a lock file (none in the protocol)
integrity sha512 per package hash per wheel (none in the protocol)
drift caught npm ci fails pip check fails silently accepted
mcp.lock is the missing row. the gate's trust-on-first-use pin is that row,
written per tool by observation instead of by hand.A comparison of dependency pinning across ecosystems. With npm you declare in package.json and pin in package-lock.json with a sha512 per package, and npm ci fails on drift. With pip you declare in requirements.txt and pin in a lock file with a hash per wheel, and pip check fails on drift. With MCP you declare in mcp.json, but the protocol defines no lock file, no integrity hash, and no drift check, so a changed tool contract is silently accepted. The gate trust-on-first-use pin is that missing row, written per tool by observation instead of by hand.
Licensed CC BY 4.0. Use it anywhere, including commercially. Keep the credit.
Paste under the figure. That is the whole licence obligation.
<a href="https://mcpindex.ai/diagrams/mcp-needs-a-lockfile">MCP needs a lockfile - mcpindex.ai</a> (CC BY 4.0)Standalone image/svg+xml. Vector, editable, no stylesheet needed.
https://mcpindex.ai/diagrams/mcp-needs-a-lockfile/svgLast reviewed 2026-07-27
mcp lockfile · mcp.lock · mcp dependency pinning · package-lock for mcp