Public: anyone can read this; the crew can change it.
The MCP's 401 is one challenge from one function: it names the scopes, and says invalid_token when a presented token is expired or revoked #8362
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
A harness can tell "sign in" from "your token is dead, re-authorize" without guessing. Today the challenge string is built in two places (src/http/oauth.ts:46 and src/http/mcp.ts:385). Neither carries
scope, and an expired token gets the same bare challenge as no token at all.Done:
scope="ro rw"(from OAUTH_SCOPES), anderror="invalid_token"when a bearer was sent and refused (RFC 6750 §3).Files: src/http/oauth.ts, src/http/mcp.ts, a new test/oauth-challenge.test.ts. Risk: keep
resource_metadataexactly as it is. Clients key discovery on it.