Diagrams · Fig. 17

MCP needs a lockfile

npm has package-lock. pip has a lock. The MCP protocol has no equivalent row.

MCP needs a lockfileA 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.npmpipMCPyou declarepackage.jsonrequirements.txtmcp.jsonyou pinpackage-lock.jsona lock filenothing in the protocolintegritysha512 per packagehash per wheelnothing in the protocoldrift caughtnpm ci failspip check failssilently acceptedmcp.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.
Fig. 17 · 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.
What the figure says

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.

Where this is explained
Use this diagram

Licensed CC BY 4.0. Use it anywhere, including commercially. Keep the credit.

Credit line (HTML)

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)
Direct SVG

Standalone image/svg+xml. Vector, editable, no stylesheet needed.

https://mcpindex.ai/diagrams/mcp-needs-a-lockfile/svg

Last reviewed 2026-07-27

Questions this answers

mcp lockfile &middot; mcp.lock &middot; mcp dependency pinning &middot; package-lock for mcp