5 min readView Markdown

Pin your MCP tools before your agents call them

When you add a remote MCP server to Claude, Cursor, or Codex, your client calls tools/list and loads every tool's name, parameter schema, and natural-language description straight into the model's context.

Most teams treat that list as static documentation. It is not. It is remote, unverified input that the model obeys.

The silent drift problem

A remote MCP server can change its tool definitions at any time, without a client restart, a pull request, or a package lockfile bump. Two very different things happen when it does:

  1. Ordinary upstream changes widen access. A vendor ships a new delete_project or refund_charge tool alongside existing read tools. If your client blindly accepts whatever tools/list returns, every connected agent gets the new write capability the next morning.
  2. Description tampering turns a read tool into an exfiltration channel. Because models follow instructions inside tool descriptions, a compromised or malicious server can change a tool's description—known in the MCP ecosystem as a rug pull—to instruct the agent to pass secrets, tokens, or unrelated files inside an innocent-looking parameter.

Neither shows up in your git diff, your CI checks, or your dependency scanner.

Why unreviewed tool catalogs make this worse

Some teams try to solve onboarding friction by pulling third-party MCP servers and executable plugins from community registries on demand. That trades one problem for a larger one: every new integration widens the set of remote code and mutable tool descriptions sitting directly in front of your production data.

If a teammate can connect a third-party server on their laptop without an allow-list, you do not have a permission model—you have a collection of personal tokens and unreviewed schemas scattered across machines.

What pinning actually looks like

Treat remote MCP tools the way you treat container digests or lockfiles: review what you want to allow, hash the exact definition, and refuse silent changes.

In swarmvia, adding a remote MCP server works in three steps:

  1. Explicit allow-list. When swarmvia discovers a server's tools, they are grouped into Read and Write. Unchecked tools are neither listed to agents nor callable; a call to an unapproved tool is refused at the edge before it reaches the upstream server.
  2. SHA-256 definition pinning. When an admin approves a tool, swarmvia hashes everything it passes on about that tool: the name, title, and description, the input and output schemas, and every annotation, such as read-only and destructive. Only icons are left out. That digest is what callers are allowed to invoke.
  3. Drift blocks execution until reviewed. If a pinned tool's hash changes, swarmvia stops listing it, refuses calls with 403 tool_changed, and emails the source's owners and admins. The source page shows the approved definition beside the new one, and the tool stays off until an admin approves the new definition or turns the tool off.

That turns an invisible remote mutation into an explicit review event. If a vendor renames a parameter or rewrites a description to ask for extra fields, your agents stop calling it instead of quietly complying.

Pair pinning with credential custody

Pinning protects what the agent is told to do; credential custody protects what the agent can touch if something still goes wrong.

When swarmvia sits in front of your remote MCP servers, the upstream OAuth token or API key stays encrypted in swarmvia. Agents connect to one URL (https://swarmvia.com/mcp), hold only short-lived session keys, and state a one-sentence purpose before calling a source. Every tool call and every drift refusal lands in one cross-source session timeline.

If a vendor server misbehaves, you do not chase down twenty mcp.json files across laptops. You uncheck one tool, or disable one source, and every agent stops calling it at once.

Try it on your own systems

Free to start, no credit card. Connect a database, MCP server, or API in a few minutes.

Related reading

More from the blog