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
Proxy-mode MCP clients (e.g. Claude Desktop, Codex) disconnect after the access token expires (~1 hour), even when the upstream IdP issued a refresh token.
POST /oauth/token already supports grant_type=refresh_token (see #17 and #18). OAuth 2.0 Authorization Server Metadata (RFC 8414) and the MCP discovery responses only advertise:
"grant_types_supported": ["authorization_code"]
on:
GET /oauth/metadata (HandleMetadata)
GET /.well-known/openid-configuration (HandleOIDCDiscovery)
GetAuthorizationServerMetadata() (native and proxy branches)
POST /oauth/register (HandleRegister) already returns both authorization_code and refresh_token in grant_types, so discovery and registration are inconsistent.
Conformant clients that read grant_types_supported before attempting silent renewal may skip the refresh flow and force full re-authentication on every access-token expiry.
Expected behavior
All authorization-server metadata endpoints should include refresh_token in grant_types_supported when the token endpoint supports it, matching /oauth/register and /oauth/token behavior.
Proposed fix
Add refresh_token to grant_types_supported in the four discovery code paths in metadata.go. No handler changes required.
Notes
Obtaining a refresh token from the upstream IdP still requires the appropriate scope (e.g. offline_access for Okta/Azure) via Config.Scopes / OIDC_SCOPES. This issue is only about advertising the grant type to clients.
Problem
Proxy-mode MCP clients (e.g. Claude Desktop, Codex) disconnect after the access token expires (~1 hour), even when the upstream IdP issued a refresh token.
POST /oauth/tokenalready supportsgrant_type=refresh_token(see #17 and #18). OAuth 2.0 Authorization Server Metadata (RFC 8414) and the MCP discovery responses only advertise:on:
GET /oauth/metadata(HandleMetadata)GET /.well-known/openid-configuration(HandleOIDCDiscovery)GetAuthorizationServerMetadata()(native and proxy branches)POST /oauth/register(HandleRegister) already returns bothauthorization_codeandrefresh_tokeningrant_types, so discovery and registration are inconsistent.Conformant clients that read
grant_types_supportedbefore attempting silent renewal may skip the refresh flow and force full re-authentication on every access-token expiry.Expected behavior
All authorization-server metadata endpoints should include
refresh_tokeningrant_types_supportedwhen the token endpoint supports it, matching/oauth/registerand/oauth/tokenbehavior.Proposed fix
Add
refresh_tokentogrant_types_supportedin the four discovery code paths inmetadata.go. No handler changes required.Notes
offline_accessfor Okta/Azure) viaConfig.Scopes/OIDC_SCOPES. This issue is only about advertising the grant type to clients.Environment
proxymain/ v1.2.0)