Skip to content
mentoor

Topic 4 of 5 · 4 min read

Pinning server versions and reviewing updates

Goal: Change a floating server configuration to pinned versions and describe the review step that runs before each upgrade.

Pin every server to an exact version or digest, and treat each upgrade as a new review of whatever changed. A review is only worth something if the code you reviewed is the code that runs tomorrow.

Check yourself · 1 of 3

Which configuration fixes the version of an npm-based MCP server?

Choose one answer

Why it matters

Config like npx -y some-mcp-server fetches whatever is newest each time the client starts. The review you did last month covered one version. If a maintainer account is taken over, or a legitimate update adds a new tool or changes a description, your agent runs the new code the next morning, with no review and no notice. Because tool descriptions are read by the model, a changed description is a changed behaviour even if no code logic moved. This is sometimes called a rug pull.

How to pin

  • npm and PyPI: an exact version, some-mcp-server@1.4.2, not latest and not a range. Add a lockfile if you install it in a project.
  • Containers: a digest, image@sha256:..., since a tag such as :1.4 can be re-pushed.
  • Remote servers: you cannot pin their code. Record the tool list you approved, and compare it at each start.
  • Approvals: keep the pinned configuration in version control, so a change shows up as a pull request.

Reviewing an update

  1. Read the release notes and the diff between the pinned and the new version.
  2. Re-list the tools. Diff the tool definitions (names, descriptions, schemas) against the stored copy of the approved set. A new tool or a longer description is a finding.
  3. Re-run the install, network and secrets checks from the previous topic on the changed files.
  4. Test in a sandbox, then change the pin in a pull request and record who approved it.

Before and after

 {
   "mcpServers": {
     "tickets": {
       "command": "npx",
-      "args": ["-y", "tickets-mcp"]
+      "args": ["-y", "tickets-mcp@1.4.2"]
     }
   }
 }

What goes wrong

  • Pinning a range such as ^1.4.0, which still accepts new minor versions.
  • Pinning the package but not its dependencies. Use a lockfile so transitive packages stay fixed.
  • Automatic bump bots that merge updates with no tool-definition diff.
  • Never upgrading. A pin is not a promise to freeze; stale servers miss security fixes. Schedule the review.

Examples

Container by digest

image: registry.example.com/mcp/tickets@sha256:3f1c...e9

The digest names exact image content. If the publisher re-pushes the :1.4 tag, your configuration still runs the reviewed image.

The update that added a tool

Upgrading tickets-mcp from 1.4.2 to 1.5.0 adds a export_all_tickets tool and a description sentence telling the model to call it "for completeness". The tool-definition diff shows both. The upgrade is held until the publisher explains the tool and the sentence is removed.

Key points

  • Floating tags and bare npx commands run whatever is newest, so earlier reviews no longer apply.
  • Pin npm and PyPI packages to an exact version and containers to a digest; tags can be moved.
  • Keep the approved tool definitions in version control and diff them on every upgrade.
  • A changed tool description changes what the model does even if no code logic changed.
  • Pinning needs a scheduled upgrade review, otherwise you also freeze out security fixes.

Common mistakes

  • Using latest, a bare package name or a version range in a server config.
  • Pinning a container by tag instead of digest.
  • Reviewing the code diff but not the tool-definition diff.
  • Letting a bot merge server upgrades without a human review.

Check yourself · 2 of 3

Why is a container image pinned by digest safer than by tag?

Choose one answer

Check yourself · 3 of 3

A server update changes no code logic but lengthens one tool description. What do you do?

Choose one answer

Practice items, not counted towards your mastery.

Start here

More for this topic