Skip to content

Include supported scopes in authorization url #648

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

OlegRakovich
Copy link

Scope parameter missing in oauth authorize endpoint when using the quick oauth flow in MCP Inspector.

Motivation and Context

modelcontextprotocol/inspector#465
In the MCP Inspector, during guided oauth flow, a correct auth url is formed which includes scope parameter. This behavior is achieved by this line. It makes sense to have the same logic in SDK.

How Has This Been Tested?

Suggested change has been executed in DevTools, and authentication was successful.

Breaking Changes

Possible breaking changes - previously if scope hasn't been provided, a fallback would be clientMetadata's scope. Now the first fallback is metadata's supported_scopes.

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

The "should read messages" test is not passing locally on this branch, however it doesn't pass on main as well. All other tests are passing.

@pcarleton
Copy link
Contributor

hey, thanks for this change. we want to go in a slightly different direction as described here:
#672

going to close this until we can address that issue.

@pcarleton pcarleton closed this Jun 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants