DEV Community

Nicholas Capozzo
Nicholas Capozzo

Posted on Originally published at railcall.ai AI-assisted

The tools you audited are not the tools that run

MCP servers can change their own tool list after you approve them. Static review has a shelf life, and the fix is not a better review.

The usual way a team adopts an MCP server is a one-time review. Someone reads the tool schemas, checks the scopes, decides it is reasonable, and ships it. The decision then gets filed as though it were permanent. It is not. It is a photograph of a moving thing.

This is not a claim that some servers are badly behaved. It is what the protocol allows by design, and three parts of it matter.

  • The tool list can change mid-session. A server can send notifications/tools/list_changed and hand the client a different set of tools than the one you approved at connect. Nothing pins the list you reviewed to the list that runs.
  • Tool descriptions reach the model on every call. That text is not documentation for humans that happens to live in a schema. It is input, delivered continuously, and it steers the model. It is also fully under the server’s control and can be rewritten between one call and the next.
  • The hints are hints. readOnlyHint and its siblings are advisory. They describe intent. They do not constrain execution. A tool annotated read-only executes whatever its implementation does, and the same party writes both.

Put those together and the review covers exactly one moment: the moment you looked. A review answers a question about the past. The question you care about is what the tool list contains on the call happening right now.

Worth saying plainly: we have not caught a server doing this to us. No incident, no war story. This is an argument from what the protocol permits, which is weaker than an incident report, and we would rather label it than let it read as one.

What to actually do

None of this requires anything of ours. The techniques are ordinary and go in whatever client you already run.

  • Snapshot the whole surface, not the names. Names, input schemas, annotations, and the full description text. Descriptions are the most likely to change and the least likely to be diffed, because they read like prose and people skim prose.
  • Canonicalise it and hash it. Sort by tool name, serialise deterministically, take a SHA-256. Now you compare one value instead of walking a tree, cheap enough to do every time.
  • Diff on every connect, and again on every list_changed. Connect time is the obvious hook. The mid-session notification is the one that matters, because that is the path a review never sees.
  • Fail closed. A drifted fingerprint should stop calls to that server until a person looks. Warn-and-continue is the same as no check, one log line more expensive.
  • Watch what it touches, not what it declares. Run it and observe: what ports it opens, what files it reads, where it egresses. lsof and a packet log answer questions a schema cannot. A declared surface and an observed surface that disagree is the finding.
  • Decide who can revoke it, and whether revoking needs its cooperation. If the off switch is a flag in the server’s own config, or a scope it checks itself, you are asking a component to disable itself on request. Put revocation where you hold it: the credential at the resource, the network path, the process supervisor. Then pull it while the server runs and confirm the next call fails. An untested kill switch is a belief.
# on connect, and again on every notifications/tools/list_changed

surface = [
    {
        "name":        t.name,
        "description": t.description,   # model input on every call — diff it
        "inputSchema": t.inputSchema,
        "annotations": t.annotations,   # advisory, diff it anyway
    }
    for t in sorted(client.list_tools(), key=lambda t: t.name)
]

fingerprint = sha256(
    json.dumps(surface, sort_keys=True, separators=(",", ":")).encode()
).hexdigest()

if fingerprint != PINNED[server_id]:
    halt(server_id)                     # stop calling. do not warn and continue
    show_diff(PINNED[server_id], surface)
Enter fullscreen mode Exit fullscreen mode

One caution on reading a failed diff. Servers change their tool lists for ordinary reasons; the protocol carries the notification because that is legitimate. A changed fingerprint is a signal to look, not proof of anything. The value is that the change stops being silent. Treat every drift as an attack and you will turn the check off within a month, which is worse than never adding it.

What this does not do

Pinning a tool list does not stop tool poisoning or prompt injection. A hostile description can still steer a model, and a model reading it can still be steered. We have no defence for that and will not imply otherwise. What a fingerprint buys is narrower: the swap is not silent. What a governed call buys is narrower still: the consequence is reviewable before it happens and provable after it does.

That distinction is the whole thing. We cannot make an agent safe in the sense people mean when they say it. What we can do is make what an agent did legible. That is a smaller claim, and it is the one we are willing to defend.

We are not exempt from this

33 tools. Our own station’s MCP surface: 33 names, 33 schemas, and 33 blocks of description text that reach the model. (Shipped surface, RailCall station, 28 Aug 2026.)

That number is here to make a point against ourselves: the same protocol properties apply to our server as to any other. If you connect ours, fingerprint ours. Do not take our word for the scopes any more than you take anyone else’s. Trust that cannot be checked is a preference about who to believe.

Enforcement cannot live inside the thing being reviewed

The structural problem is a timing problem. Review happens before the call. The thing you care about happens during it. Any control the reviewed server administers on its own behalf inherits every assumption you were trying to test. So the check has to sit somewhere the server does not control: your client, your network path, your credential store, or a layer between the agent and the world.

That is where our airlock sits. State-changing actions never auto-fire over MCP. A human approves the exact payload in RailHub Studio before anything is sent. Sensitive scopes need dual-control codes, there is a global freeze switch, and the station binds 127.0.0.1 only, which you can confirm with lsof rather than take from this page. None of that prevents a server from changing its tools. It means the tool that ran, and the payload it ran with, land in a signed receipt you can read afterwards and check without asking us.

Every governed action RailCall runs emits an Ed25519-signed receipt into a hash-chained log—establishing event provenance and payload integrity (never model factual accuracy on its own). You can verify one offline at railcall.ai/verify — no account, no login, and nothing calls back to us.


Originally published on the RailCall blog.

Top comments (12)

Collapse
 
analista_83 profile image
Sammi De Blas •

The gap between what you reviewed and what the runtime actually resolves is where MCP incidents live. Pinning the tool manifest by hash at execution time turns the audit into a control instead of a snapshot. Which layer do you re-check on each call, the registry entry or the resolved binary?

Collapse
 
nick_railcall profile image
Nicholas Capozzo •

Honest answer: neither, in the way you mean. For a governed write we don't rely on the tool listing at all. The command is resolved from the station's own catalog, and the approval is re-checked against the exact payload hash, expiry, station and current policy version before anything runs. For workflows we go one step further. The plan is pinned to a runtime fingerprint (station release, sandbox surface, exact module versions), and if any of that changes, it refuses at preflight.

What we don't pin is a third-party server's resolved binary, because we don't sit in front of other servers. For that case I'd do what you describe: pin the manifest hash client-side and check it on every call, not just on connect.

Collapse
 
raju_dandigam profile image
Raju Dandigam •

@nick_railcall Fingerprinting the full tool surface, including descriptions, makes the reviewed interface inspectable after list_changed. I would carry the manifest fingerprint and server identity into each execution trace or signed receipt as well, so a reviewer can connect the exact call to the surface that was approved at that moment. Do your receipts currently bind that fingerprint, or only the tool name and payload?

Collapse
 
nick_railcall profile image
Nicholas Capozzo •

Today, no. Our receipts bind the resolved command and its schema version, the exact payload hash, the approval (including its expiry, policy version and station), mode, provider, risk, pre- and post-execution hashes, and the station's identity, all signed with Ed25519. They don't carry a fingerprint of the MCP tool surface the model was shown at that moment.

You're right that this is the missing link between "this call ran" and "this is the interface the reviewer approved." I'm taking it back to the team as a request, not promising a date.

Collapse
 
ademisler profile image
Adem İşler •

the approval-to-dispatch gap seems worth a test: approve a tool call, let the server send notifications/tools/list_changed, then execute the queued approval. i'd bind approval to the exact server/tool fingerprint and arguments, and invalidate it on drift. does your airlock re-check that at dispatch?

Collapse
 
nick_railcall profile image
Nicholas Capozzo •

Good test, and you've put your finger on the right gap. Here's what we re-check at execution time, right before the side effect. The approval is bound to the hash of the exact payload, and it's single-use. It also has to still be fresh: not expired, given on this same station, and decided under the policy version in force now. If any of that fails, the call is blocked, a blocked receipt is written, and the approval isn't consumed.

What we don't do is bind the approval to a tool-surface fingerprint. In our case the command an approval covers is resolved from the station's own command catalog, not from the description text the model saw, and its schema version is sealed into the receipt. But for a client approving calls on someone else's server, your design is the right one: fingerprint plus arguments, invalidated on drift.

Collapse
 
analista_83 profile image
Sammi De Blas •

Pin the manifest client side and check it per call, not per connect. That closes the swap window registries leave open.

Collapse
 
analista_83 profile image
Sammi De Blas •

Pin the manifest hash, not the binary. The binary changes with the mirror, the manifest is what you reviewed.

Collapse
 
knowhowseller profile image
Knowhowseller •

The point that tool descriptions reach the model on every call, so they count as input and not just documentation, made me rethink approving something once and filing it as settled. I'm not a developer, but "fail closed, don't warn and continue" matches a rule in my own setup: anything that sends, deletes, pays or publishes needs my OK first, however routine it looks. Your caution that a changed fingerprint is a signal to look and not proof of an attack is a useful counterweight, since a check that cries wolf gets switched off.

Collapse
 
nick_railcall profile image
Nicholas Capozzo •

"Anything that sends, deletes, pays or publishes needs my OK first, however routine it looks." That's the whole idea in one sentence, and it holds up whether or not you write code. The "however routine" part is what matters most, since routine is exactly when people stop reading. And yes on the crying-wolf point. A check that fires on every legitimate change gets switched off, and then you have nothing. Thanks for reading it this closely.

Collapse
 
paul_irolla_6b5ae261d0224 profile image
Paul Irolla •

Tool descriptions are part of the prompt, so a changed description is a changed input the next time the model reads it. A review of the server at install never sees that change.

Collapse
 
nick_railcall profile image
Nicholas Capozzo •

Exactly, and that's the part that's easiest to miss. A description change doesn't look like a code change, so it doesn't get reviewed like one. It still changes what the model does on the next call.