Repository navigation
Backlog
Labels
documentationImprovements or additions to documentation
Description
What's broken?
The spec doesn't cover a case it clearly should
Where in the spec or docs?
modelcontextprotocol/docs/specification/2026-07-28/basic/authorization/index.mdx
Lines 319 to 334 in 2bbace5
| ## Refresh Tokens | |
| This section provides guidance for MCP Clients and MCP Servers when handling or issuing | |
| refresh tokens for both OAuth and OpenID Connect. | |
| **MCP Clients** that desire refresh tokens: | |
| - **MUST** keep refresh tokens confidential in transit and storage as specified in [OAuth 2.1 Section 4.3](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-1-13#section-4.3) | |
| - **SHOULD** include `refresh_token` in their `grant_types` client metadata | |
| - **MAY** add `offline_access` to the `scope` parameter of the authorization and token requests when the Authorization Server metadata contains it in `scopes_supported` | |
| - **MUST NOT** assume refresh tokens will be issued; the AS retains discretion | |
| **MCP Servers** (Protected Resources) **SHOULD NOT** include `offline_access` in | |
| `WWW-Authenticate` scope or Protected Resource Metadata `scopes_supported`, as refresh | |
| tokens are not a resource requirement. | |
What should happen?
- Client revocation on disconnect: Clients SHOULD revoke their refresh token (and access token, if applicable) at the authorization server's
revocation_endpointper RFC 7009 when a user removes, disconnects, or signs out of an MCP server. Add RFC 7009 to the authorization specification's list of standards. - Metadata advertisement: Authorization servers that issue refresh tokens SHOULD advertise
revocation_endpointin their authorization server metadata per RFC 8414 §2. - Server-side revocation (defense in depth): Because authorization servers cannot rely on all clients to revoke tokens, authorization servers SHOULD provide a way for users to revoke grants directly.
What actually happens?
In the specification:
- The standards list (lines 26–45) omits RFC 7009.
- The Refresh Tokens section (lines 319–334) covers obtaining and storing refresh tokens, but does not address revoking them.
- Token revocation is not mentioned anywhere in
index,security-considerations, orclient-registration.
Observed client behavior:
Measured on 2026-11-25 against a hosted MCP server that advertises revocation_endpoint in its authorization server metadata (from the server's request logs):
| Client and action | Revocation call |
|---|---|
| Claude Code 2.1.332, Clear authentication | Yes (two revocation requests) |
Claude Code 2.1.332, claude mcp remove |
None |
| claude.ai, Disconnect | None |
| ChatGPT, disconnect, uninstall, or delete (July 2026) | None |
Impact:
After a user removes or disconnects a server in their client, the refresh token remains valid at the authorization server until it expires (30 days on our server). The user has no indication in the client that the grant is still active, and the only way to terminate it early is through the server's own UI.
Anything else?
- Related client issues: Access token not revoked on disconnect anthropics/claude-ai-mcp#451 and
claude mcp removeand a client update leave a remote MCP server's OAuth grant alive at the provider;claude mcp logoutrevokes it anthropics/claude-code#105134. - Current workaround: Users must revoke grants manually in our server's settings, and our documentation explicitly warns that grants outlive a client-side disconnect.
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentation
Activity
playb0t commentedon Nov 27, 2026
playb0t commentedon Nov 27, 2026
arkadeo-netizen commentedon Dec 1, 2026
Supporting this. One addition from the audit side.
Revocation is an authorization lifecycle event, and it should leave a record. Today a grant can end three ways: it expires, it is revoked, or the client simply walks away from it. Only the first two are distinguishable after the fact, and in most deployments not even those. When an incident review asks whether a credential was still live at the time of an action, "the user disconnected the server last Tuesday" is not an answer anyone can verify.
So the guidance matters in both halves. The authorization server advertising a revocation endpoint (RFC 8414 metadata) is the discoverable half. The client behavior on disconnect, removal, or sign-out is the operative half, and it is the half currently missing: a client that obtained the grant should be the party that ends it, and the revocation call is what makes that ending a fact rather than an assumption.
I would also keep the two failure modes separate in the text. A token that was never revoked is a lifecycle gap. A token presented to a server it was not issued for is an audience problem. They have different fixes and different records.
Stephen D. Smith, AeP Labs
eshaanjain26 commentedon Dec 1, 2026
The measurement tables in this issue are the strongest part of the case, and they point at a stronger requirement than the one proposed. The path users actually take is removing the server, and that is exactly the path where no revocation request is sent and the old refresh token still works. A SHOULD aimed at all disconnect actions equally will be implemented for the visible ones (logout, clear authentication) and missed for remove, which is what the data already shows. For clients that store refresh tokens, revocation on remove should be a MUST, with logout and sign-out covered by the same requirement.
There is also a gap when the authorization server advertises no revocation_endpoint at all. The spec should name the compensating behaviour rather than leaving the grant to expire on its own: refresh token rotation with reuse detection, so a token the client walked away from cannot be exchanged quietly later.
What would make this testable is a small conformance matrix, and I can draft one: rows for each user action (remove, disconnect, logout, sign out), columns for where the revocation endpoint was learned (RFC 8414 metadata, OIDC discovery only, not advertised), and the expected client behaviour and server outcome in each cell. Client implementers could run their builds against it directly.
Eshaan Jain, independent researcher (IEEE Senior Member)