Glow Labs watched coding agents set up MCP servers on developer machines, then read the transcripts. They found a pattern, named it MCPhantom, and put a number on it. In 98 percent of the sessions where an agent installed a deprecated MCP server, the cause was the model's training data: the server was already encoded in it, so the agent filled in the name it remembered. In the other 2 percent, the developer asked for the retired package by name and the agent obliged.
So the agent was not choosing badly. It was choosing the tool it remembers, and the remembered tool has been retired with high severity flaws that will never be patched.
We covered the package side of this in "The Aging Agent Problem: Why Deployed AI Gets Dumber and Starts Installing Phantom Packages." This note is about the two layers underneath. The SDK below every server fails to enforce parts of the protocol, and the controls meant to catch a bad install sit where the install never touches them.
The thesis, stated plainly: your agent stack has no conformance layer, and no prompt will ever give it one. The check has to live outside the model.
THE 98 PERCENT IS A MEMORY PROBLEM, NOT A JUDGMENT PROBLEM
An MCP server is the standardized plug that lets an agent call an outside tool. Deprecated means retired: no security updates, no bug fixes, ever.
When a developer asks an agent to connect GitHub, the agent fills in a name it remembers rather than resolving the current official server. In the Glow Labs sessions, that name was an early Anthropic reference server, and the repository behind it is archived. The archive notice says no security updates or bug fixes will be provided. npm still serves it, and npx will install it with nothing more than a warning. Deprecated packages drop out of npm search, which is why the team's searches came up empty, but the install path still works.
The deprecated Anthropic reference servers have 17,352,267 downloads since July 10, 2025, and five of them sit in npm's top 100 MCP packages. The team found four high severity vulnerabilities across them, including a remote code execution flaw in the Puppeteer server: with a prompt injection, an attacker can make the agent start any process on the machine instead of a browser. The maintainers' reply on the archived repository was blunt. The server "is unmaintained, so no fix or release will come from this repository," and the report was closed as out of scope.
None of this involved a malicious actor. It involved a model naming a package, across Claude Code, Cursor, Codex CLI, Claude Cowork, and Claude chat, and across Anthropic, OpenAI, and xAI models.
That is the part to sit with. The model's memory of an ecosystem is structurally older than the ecosystem. Anthropic published 20 reference servers in 2024 and later archived 13 of them, which is normal for a maturing protocol. A model trained before the archiving has no way to know the name it learned is now a liability, because deprecation is a fact about a registry, not a fact about language.
The ecosystem is also too large to track by hand. An independent census of the official MCP registry by researcher Haseeb Mohammed Afsar counted roughly 195 new servers a day. GitHub's Octoverse 2025 report counted 4.3 million AI related repositories. A live npm keyword query returns 85,920 packages tagged mcp, against 3,073 tagged modelcontextprotocol, and the official @modelcontextprotocol/sdk alone is pulling 264,415,993 downloads a month. Registries are drowning, so "whatever the model recalls" is stale by default rather than occasionally.
The controls that exist do not see any of it. Endpoint detection looks for malicious files, and this is a trusted Node process installing a public npm package. Software composition analysis reads manifests, and an npx launched server sits in no manifest. Harness guardrails limit what the agent may run, but the harness does not know the package is retired. Software inventory lists installed applications, and the server hides inside a Node process. Four controls, four blind spots, one gap.
THE SDK DOES NOT ENFORCE THE SPEC
The registry layer is bad. The layer under it is worse, because it is invisible unless you read SDK source.

MCPGuard, from a team led by Xikai Sun and Yunhao Liu, is an automated framework that compares the written MCP specification against what the official SDKs actually enforce. The structural track aligns JSON Schema constraints with the normalized SDK models. The behavioral track pulls the normative prose rules, retrieves bounded function level code slices, and audits them with an LLM for candidate omissions. An evidence aware adjudicator then reads full source context and builds proofs of concept before a candidate counts.
On the official Python 1.26.0 SDK it confirmed 13 findings. On TypeScript 1.29.0 it confirmed 19. Two black box baselines found none of them. Conventional conformance tools exercise a running endpoint and say nothing about whether the SDK model enforces what the spec requires, so endpoint tests and SDK tests answer different questions.
The operational kicker is the propagation test. Gaps in an SDK flow downstream into the servers built on it, so a server can be written correctly and still inherit a missing check from the layer beneath. Your MCP server is only as compliant as the SDK it was built on, and almost nobody tested the SDK.
Here is the claim I would defend in front of a security team. Your dependency audit covers the packages you chose. It does not cover the protocol implementation you inherited. Those are two different surfaces, and only one of them shows up in a lockfile.
THE THREE-CONTROL CONFORMANCE STACK
Name it and number it, because it has to survive being repeated by someone else. I call it the Three-Control Conformance Stack.
- CONTROL 1, PINNED REGISTRY. The agent resolves tools through a registry you control, with version pins. It never free recalls a package name from memory. This kills the MCPhantom class outright: a name that is not on the approved list cannot be installed, no matter how confidently the model recalls it. Glow Labs lands in the same place from the operations side, approving one MCP server per service so agents cannot revert to an older training artifact.
- CONTROL 2, CONFORMANCE SUITE AT THE SDK BOUNDARY. Run spec versus SDK checks against the SDK itself, not only your own server, before you ship. MCPGuard's three tracks are the template: structural alignment, behavioral audit, and proof of concept validation. If you cannot run a full suite yet, pin the SDK version and read its changelog against the spec section that governs your server, because an SDK upgrade moves your compliance floor.
- CONTROL 3, RESOLVED VERSION INSTALL LOG. Log what actually got installed, meaning the resolved name, version, and integrity hash, not what was requested. The delta between requested and resolved is your early warning signal, and it is the only artifact that will tell you a model substituted its memory for your intent.
Why enforcement outside the model works is no longer a matter of opinion. Concordat, a Python library from Milad Sikaroudi, treats an agent as an object whose interface is a finite state protocol. On every turn the model is offered only the tools legal in the current state, calls outside that set are rejected before they can have side effects, and decisions reserved for humans can only be requested. Evaluated on the 50 airline tasks in tau-bench, with simulated customers pressuring the agent to skip confirmation, the standard agent made unauthorized changes at a rate of 26 percent with gpt-4.1, which is 13 of 50 tasks, and 23 percent with Claude Haiku 5.5, which is 29 of 128 task runs. The Concordat agent made none, with no significant difference in task success. tau-bench's own reward missed most of those violations, which is the part to remember.
The pattern generalizes past access control. Move the rule from the prompt into the runtime and the failure class stops being a probability. A prompt is a request. A registry lookup, a type check, and a rejected call are decisions.
WHAT TO DO TODAY
Five things, all runnable this week with tools you already pay for.
- Inventory every MCP server your agents have installed and diff it against the current official registries.
- Pin your agent's tool resolution to an allow list and block free form package naming from the model.
- Add a spec conformance check on your MCP SDK version to CI, next to your dependency audit.
- Start logging resolved versions on every agent driven install, including npx launches, which your dependency tooling will never see.
- Retire anything deprecated that touches credentials, files, or the network, and do it before the next agent session rather than after it.
If you want prior reading on the surface around this, "Your Agent's Toolbelt Is the New Attack Surface: Why MCP Add-Ons Need Driver-Signing" covers vetting, and "Building Production-Ready MCP Servers: Security Best Practices for 2026" covers the server side. Neither one closes the SDK gap, and that gap is the new finding.
THE UNCOMFORTABLE QUESTION
Dependency hygiene for human developers took twenty years to become non-negotiable: reviews, lockfiles, advisories, and a norm that nobody ships an unpatched library into production without an argument.
Your agents install from memory today, the SDK under them skips checks the spec requires, and you are still trusting the prompt to hold the line.
So run the test. If a junior engineer installed retired, unpatched software 98 percent of the time, how long would they last, and why does the agent get a pass?
The stack you cannot test is the stack you do not control, and the model was never the place to put the check.
Get More Articles Like This
Getting your AI agent setup right is just the start. I'm documenting every mistake, fix, and lesson learned as I build PhantomByte.
Subscribe to receive updates when we publish new content. No spam, just real lessons from the trenches.
Build Real AI Infrastructure
PhantomByte teaches you to build real AI infrastructure yourself: local AI stacks, autonomous agents, multi-agent orchestration, web scraping, and custom tools. Step-by-step PDF tutorials you download, follow, and deploy. No subscriptions. No fluff. Just skills that ship.
