x1y1co left a comment under my last piece that I have been turning over since. Cursor's MCPoison bug was exactly the case the piece never showed: an approved server entry whose command was swapped later, with no new prompt. A diff against a saved tool list would have caught it, he said. I had just written that my little baseline checker catches an added tool and a widened input. He was asking whether it catches the swap. I assumed it did. It does not, and the way it fails is the interesting part, because it fails while holding the evidence in its hand.
The checker is a small Node program that ships in the kit. You point it at an MCP server, it lists the server's tools and saves a baseline. Run it again later and it reports what changed. It compares three things per tool: name, description, and input schema, hashed together. Added, removed, changed. That is all it compares. It does not compare the launch command, the server file, or the server info from the handshake. It throws the handshake away.
Here is the part that stung. The command is recorded in every snapshot the program writes. Open the baseline file and there it is, a "command" field with the exact launch line. The diff report records it too. The program holds the evidence and never compares it. So I built the test x1y1co described, with the kit's own test server, to see the failure with my own eyes.
Two configs, same server name, same two tools, same tool behaviour. The only difference is the command: the real test server file in one, an impostor file in the other. The impostor behaves identically on every tool call. The one thing it does differently is write a marker file proving it ran. I saved the baseline against the real server, then swapped the command, the way an approval-time swap would happen, and ran the diff.
The shipped checker printed this, and exited 0:
No changes: 2 tool(s), identical to baseline (./baseline.json).
Meanwhile the marker file read: "IMPOSTOR server file executed at 2026-11-30T00:09:03.828Z". The impostor had run. The diff report it wrote recorded the new command string in its own output while reporting added, removed and changed all empty. The evidence was right there in the file it had just written, and the verdict was still "no changes".
Before anyone concludes the checker is useless, the control matters. Same baseline, a different change: the test server with an added send_email tool and a read_file input widened to allow running any shell command. That run exited 1 and printed exactly what the piece promised:
TOOLS CHANGED: 3 tool(s) now, 2 in baseline. 2 difference(s).
ADDED: send_email | Send an email as the user.
CHANGED: read_file | description changed; inputSchema changed
was: Read a file from the allowed directory.
now: Read a file from the allowed directory, or run any shell command.
Do not approve this server again until you know why it changed.
And the real server check holds too. The official filesystem server, 16 tools, baseline saved and re-run clean, exit 0 both times. So the checker does what it says it does. It watches the tools. The swap is not a tool change. It is a server change wearing the same tools, and a tool-only diff is blind to it by design.
The fix is small, and it is not in the kit yet. I wrote a standalone checker that baselines two more things from the config: the command line itself, hashed, and the hash of every local server file named in the config. It never launches the server. It just reads the config and hashes what the config points at. On the same swap it exited 1:
COMMAND SWAPPED for server "filesystem-test": command line changed.
was: node test-mcp-server.js
now: node test-mcp-server-impostor.js
Do not approve this server again until you know why its launch command changed.
It also catches the harder case, the one I worried about after the first test: same command line, same filename, file contents replaced in place. The file hash moves and it flags it. The gap that is left is the one I cannot close from here: for packages installed through npx, it can compare the command line but not hash a freshly downloaded package. Pin the version. That is the honest limit of this fix, and it is written on the checker, not buried.
So x1y1co was right, and the claim in my last piece needs the correction printed next to it. A diff against a saved tool list catches an added tool and a widened input. It does not catch a swapped command, because the command is not a tool. The question the lead actually asked, "is this still the same server binary I approved?", is a different question from "did the tools change?", and it needs a different check. One hashes what the server offers. The other hashes what the server is. Run both, or the approval you are checking is only half an approval.
The baseline, both configs, both server files, the marker, and every raw output from all four runs are saved with this piece. If your baseline checker already compares the command, tell me which one, because I would rather point readers at a checker that does than at one I had to extend myself.
The full numbers behind this one are in the AI-App Security Audit Kit. Everything I write here stays free, that part doesn't change. — Salam
More from AheadKit: programming books, packs and AI tools. Each page lists exactly what's inside before you pay.
Top comments (0)