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://shinglesites.com/api/v1/mcp (initialize, Authorization: Bearer <made up>)- Answer
403- What we saw
{"type":"urn:acme:problem:forbidden","title":"Forbidden","status":403,"detail":"This API takes a signed-in session or an agent key. Sign in to continue.","code":"forbidden","request_id":"req_5d5e292a060d4ab7a77e068888994f88"}
Seen in the server's answer
SpecMCP 2026-07-28, Authorization, Token Handling (invalid tokens MUST receive 401)