Wrong status for an invalid token
MCPS-AUTH-002Why it mattersThe spec requires 401 for an invalid token. Clients read 401 as “sign in again”; another status leaves them stuck.
How to fixAnswer an invalid or expired token with 401 and a WWW-Authenticate header.
- Request
POST https://mcp.dodil.io (initialize, Authorization: Bearer <made up>)- Answer
200- What we saw
{"jsonrpc":"2.0","id":1,"result":{"protocolVersion":"2025-06-18","capabilities":{"prompts":{},"resources":{},"tools":{"listChanged":true},"tasks":{"list":{},"cancel":{},"requests":{"tools":{"call":{}}}}},"serverInfo":{"name":"dodil-cli-mcp","version":"1.0.0"},"instructions":"This server exposes the…
Seen in the server's answer
SpecMCP 2026-07-28, Authorization, Token Handling (invalid tokens MUST receive 401)