Skip to content

SEP-2207: OIDC-flavored refresh token guidance#2207

Open
wdawson wants to merge 10 commits intomodelcontextprotocol:mainfrom
ArcadeAI:doc/oidc-refresh
Open

SEP-2207: OIDC-flavored refresh token guidance#2207
wdawson wants to merge 10 commits intomodelcontextprotocol:mainfrom
ArcadeAI:doc/oidc-refresh

Conversation

@wdawson
Copy link
Contributor

@wdawson wdawson commented Feb 5, 2026

This PR introduces guidance for MCP implementations using OIDC-flavored Authorization Servers regarding refresh token issuance and handling of the offline_access scope.

Motivation and Context

MCP builds on OAuth 2.1, which doesn't require special scopes for refresh tokens—the AS decides based on client capabilities. However, many OIDC Authorization Servers require the offline_access scope.

This creates a gap: MCP clients interacting with OIDC-flavored servers may not receive refresh tokens, resulting in a poor UX (frequent re-authentication). This SEP clarifies:

  • When Authorization Servers should/shouldn't issue refresh tokens
  • How clients can request refresh tokens from OIDC servers
  • That MCP servers should not include offline_access in their responses

Discord discussion: MCP Authorization channel (Jan 2026)

How Has This Been Tested?

This is a specification/documentation change. The guidance has been reviewed by OAuth experts in the MCP community.

I plan to make appropriate changes to the MCP SDKs (at least TypeScript and Python, but will aim for Rust as well for Goose).

We also implemented this guidance for the Authorization Server and MCP server at Arcade.dev for MCP Gateways. You can sign up and create one for free to test with any MCP-compatible client.

Breaking Changes

None. This is additive guidance that does not change existing behavior.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Sponsor: @pcarleton

AI Disclosure: AI helped to create the structure of the SEP document. I reviewed and edited the text by hand afterward and manually contributed the specification change itself.

@wdawson wdawson requested a review from a team as a code owner February 5, 2026 00:37
@wdawson wdawson changed the title SEP-0000: OIDC-flavored refresh token guidance SEP-2207: OIDC-flavored refresh token guidance Feb 5, 2026
Copy link
Contributor

@localden localden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In docs/specification/draft/basic/authorization.mdx (line 509):

- **MAY** add offline_access to scopes when the AS metadata contains it in scopes_supported

This is a bit vague on timing and mechanism - does the client add offline_access to the scope parameter in the authorization request? The token request? Both? Let's make this explicit, e.g.:

- **MAY** add `offline_access` to the `scope` parameter of the authorization request when the AS metadata contains it in `scopes_supported`

@localden
Copy link
Contributor

localden commented Feb 6, 2026

@wdawson also, the spec change also provides quite a bit of normative guidance to Authorization Servers, but in most real MCP deployments the AS is a third-party system (Auth0, Okta, Keycloak, Entra ID, etc.) that MCP implementers don't control. I am not sure to what degree we want to go in depth around AS behavior design here.

The AS bullets are largely unactionable for the typical MCP developer. It might be worth framing these as "when building a custom Authorization Server for MCP" or acknowledging that these describe ideal AS behavior that existing providers may or may not follow.

`WWW-Authenticate` scope or Protected Resource Metadata `scopes_supported`, as refresh
tokens are not a resource requirement.

When building or selecting an Authorization Server for use in protecting MCP Servers,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@localden
The AS bullets are largely unactionable for the typical MCP developer. It might be worth framing these as "when building a custom Authorization Server for MCP" or acknowledging that these describe ideal AS behavior that existing providers may or may not follow.

I addressed your feedback here. I agree it's a bit odd to put this here, but didn't see this specific guidance mostly for the first bullet point in the OAuth 2.1 document and wanted to make sure it was covered somewhere. I may have missed it. @aaronpk might speak to it better, but I'm happy to remove this AS guidance section entirely if we think it's covered sufficiently in other specs.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants