import { MCP_PROTOCOL_VERSION } from "iagenify";
MCP_PROTOCOL_VERSION; // "2026-07-28" — the one this client prefersfrom iagenify import MCP_PROTOCOL_VERSION
MCP_PROTOCOL_VERSION # "2026-07-28" — the one this client prefersThe order
2026-07-28, 2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05. The handshake announces them and settles on the newest the server also knows; with none in common it raises mcp_protocol_unsupported instead of guessing.
Why the list is the real list
A server implementing the newest revision properly refuses a handshake that claims it and omits what it requires. An older one answers with its own revision instead, which looks like success. The second case is the dangerous one, because nothing says anything is wrong.
The modern core is stateless
That is why there is nothing to hold open and nothing to resume: a call is a request and a response. A process that restarts loses no connection, which matters when the thing carrying the package is a server that redeploys.
Reading what was agreed
const servers = await api.mcp.list();
servers.map((s) => `${s.name}: ${s.protocolVersion}`);
// Re-negotiate and record it again
await api.mcp.get("example", { refresh: true });servers = api.mcp.list()
[f"{s['name']}: {s['protocolVersion']}" for s in servers]
# Re-negotiate and record it again
api.mcp.get("example", refresh=True)The one fallback
A modern server that refuses the modern discovery is retried once with the older handshake — and only on a protocol-level refusal. A 401, a redirect, a silence or a timeout already name what to fix.