Describe the bug
In OAuthClientRegistrar the declared grant types for client registration are hard coded to authorization_code with no option to add additional grant types such as refresh_token. For authorization servers that require refresh_token grant type be declared during client registration, this effectively prevents clients from using refresh tokens with some authorization servers.
Both Python and Typescript MCP SDKs provide OAuthClientProvider/OAuthClientMetadata constructs to allow specifying grant types as well as other client metadata.
To Reproduce
Steps to reproduce the behavior:
- DCR with an MCP server/authz server that requires
refresh_token declaration
- Request
offline_access scope during authorization
- (may or may not get a refresh token depending on the authz server)
- Try to exchange the refresh token for a new access token
- Request will be rejected
Expected behavior
Provide a mechanism to specify grant types to be declared at client registration time.
Logs
n/a
Additional context
Mentioned above, but to reiterate, other official MCP SDKs (e.g. Typescript, Python, etc.) do support specifying grant types through configuration.
Describe the bug
In OAuthClientRegistrar the declared grant types for client registration are hard coded to
authorization_codewith no option to add additional grant types such asrefresh_token. For authorization servers that requirerefresh_tokengrant type be declared during client registration, this effectively prevents clients from using refresh tokens with some authorization servers.Both Python and Typescript MCP SDKs provide
OAuthClientProvider/OAuthClientMetadataconstructs to allow specifying grant types as well as other client metadata.To Reproduce
Steps to reproduce the behavior:
refresh_tokendeclarationoffline_accessscope during authorizationExpected behavior
Provide a mechanism to specify grant types to be declared at client registration time.
Logs
n/a
Additional context
Mentioned above, but to reiterate, other official MCP SDKs (e.g. Typescript, Python, etc.) do support specifying grant types through configuration.