Skip to content

Authorization spec lacks token revocation (RFC 7009) guidance; grants outlive disconnecting or removing a server #3591

Backlog

Description

@bschwabQ

What's broken?

The spec doesn't cover a case it clearly should

Where in the spec or docs?

## 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?

  1. Client revocation on disconnect: Clients SHOULD revoke their refresh token (and access token, if applicable) at the authorization server's revocation_endpoint per 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.
  2. Metadata advertisement: Authorization servers that issue refresh tokens SHOULD advertise revocation_endpoint in their authorization server metadata per RFC 8414 §2.
  3. 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, or client-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?

Activity

  1. added
    bug
    on Nov 25, 2026
  2. playb0t commented on Nov 27, 2026

    @playb0t
  3. playb0t commented on Nov 27, 2026

    @playb0t
  4. added
    documentation
    and removed
    bug
    on Nov 27, 2026
  5. arkadeo-netizen commented on Dec 1, 2026

    @arkadeo-netizen

    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

  6. eshaanjain26 commented on Dec 1, 2026

    @eshaanjain26

    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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions