You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Client] Implement refresh_token grant + offline_access scope #323
When an access token expires, the client must transparently refresh using the stored refresh_token rather than re-prompting the user. Per OIDC/OAuth, offline_access scope is requested at authorize time when the AS advertises it; otherwise the client degrades gracefully (no refresh available).
Scope
Mcp\Client\Auth\Grant\RefreshTokenGrant.
Pre-flight check: if expires_at - now() < skew, refresh before sending request.
Reactive: on 401 with valid refresh token, refresh + retry once.
Request offline_access scope at authorize time when scopes_supported contains it; otherwise omit.
If the AS does not advertise offline_access and tokens expire, surface a re-auth signal cleanly (no infinite loop).
Cross-reference: this work is gated on SEP-2207 for the MCP Spec 2026-07-28 release — without requesting the offline_access scope at auth-code time, refresh tokens won't be issued by OIDC-flavored authorization servers.
The offline_access request behavior is tracked separately as #363 and should land alongside this issue. See umbrella #338.
Activity
chr-hertel commentedon May 26, 2026
Cross-reference: this work is gated on SEP-2207 for the MCP Spec 2026-07-28 release — without requesting the
offline_accessscope at auth-code time, refresh tokens won't be issued by OIDC-flavored authorization servers.The
offline_accessrequest behavior is tracked separately as #363 and should land alongside this issue. See umbrella #338.[Client] Add OAuth authorization to the HTTP transport
[Client] Add OAuth authorization to the HTTP transport