Fix: unknown JSON-RPC method returns -32601

Web-audit fix skill for the mcp-unknown-method check (MCP & API, SHOULD).

Goal

Reject unknown JSON-RPC methods with error -32601 instead of a hang or 500.

Fix

Reject an unknown JSON-RPC method with the standard error code -32601 (Method not found), not a hang, a 500, or a silent empty body. Agents rely on -32601 to distinguish "unsupported" from "failed"; anything else looks like an outage.

Resources

Copy-paste prompt

Paste this into your coding agent, replacing the Issue line with the Result line from your audit:

Verify

Re-run the audit at https://anc.dev/web-audit or call the audit_website MCP tool; the mcp-unknown-method check should report pass.