# Fix: an unsupported protocol version is rejected -32022 with data.supported

> Web-audit fix skill for the `mcp-modern-version-reject` check (MCP, SHOULD).

## Goal

Refuse unsupported protocol version claims with -32022 and advertise the served revisions.

## Fix

Reject a request claiming an unsupported `MCP-Protocol-Version` with
`error.code: -32022` (UnsupportedProtocolVersion) and populate `error.data.supported` with
the revisions you serve (for example `["2026-07-28"]`); echoing the claim in
`error.data.requested` helps debugging. The `data.supported` array is what lets a typed
client fall back to a revision you both speak, so an envelope without it fails the check.

## Resources

- [MCP lifecycle (2026-07-28)](https://modelcontextprotocol.io/specification/2026-07-28/basic/lifecycle)

## Copy-paste prompt

Paste this into your coding agent. [Your audit](https://anc.dev/audit) adds what it observed for this check:

```text
Goal: Refuse unsupported protocol version claims with -32022 and advertise the served revisions
Fix: Reject a request claiming an unsupported `MCP-Protocol-Version` with `error.code: -32022` (UnsupportedProtocolVersion) and populate `error.data.supported` with the revisions you serve (for example `["2026-07-28"]`); echoing the claim in `error.data.requested` helps debugging. The `data.supported` array is what lets a typed client fall back to a revision you both speak, so an envelope without it fails the check.
Skill: https://anc.dev/fix/mcp-modern-version-reject
Docs: https://modelcontextprotocol.io/specification/2026-07-28/basic/lifecycle
```

## Verify

Re-run the audit at [https://anc.dev/audit](https://anc.dev/audit) or call the `audit_website` MCP tool; the `mcp-modern-version-reject` check should report `pass`.
