# Fix: an unknown method on the modern lane returns -32601

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

## Goal

Reject unknown header-routed methods with -32601 on the 2026-07-28 lane.

## Fix

Reject a modern request (`MCP-Protocol-Version: 2026-07-28`, `Mcp-Method` naming a method
you do not implement) with `error.code: -32601` (Method not found). Delivering the envelope
at HTTP `404` conforms; a bare `404` with no envelope does not (it is indistinguishable
from a dead endpoint).

## Resources

- [JSON-RPC 2.0](https://www.jsonrpc.org/specification#error_object)
- [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: Reject unknown header-routed methods with -32601 on the 2026-07-28 lane
Fix: Reject a modern request (`MCP-Protocol-Version: 2026-07-28`, `Mcp-Method` naming a method you do not implement) with `error.code: -32601` (Method not found). Delivering the envelope at HTTP `404` conforms; a bare `404` with no envelope does not (it is indistinguishable from a dead endpoint).
Skill: https://anc.dev/fix/mcp-modern-unknown-method
Docs: https://www.jsonrpc.org/specification#error_object, 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-unknown-method` check should report `pass`.
