Skip to content

Conversation

@jlowin
Copy link
Contributor

@jlowin jlowin commented Nov 15, 2025

Fixes a bug introduced in #1586 where the OAuth scope selection strategy was incorrectly passing the resource metadata URL instead of the scope from the WWW-Authenticate header.

AFAICT this breaks all Python MCP clients that connect to servers with WWW headers because it treats the URL as a scope with highest priority.

The get_client_metadata_scopes() function expects the first parameter to be the scope string extracted from the WWW-Authenticate header. However, in this case it was incorrectly passing www_auth_resource_metadata_url (a URL) instead of calling extract_scope_from_www_auth(response) to get the actual scope value.

Closes #1630

@jlowin
Copy link
Contributor Author

jlowin commented Nov 15, 2025

This has been addressed identically in #1631, closing in favor of that PR.

@jlowin jlowin closed this Nov 15, 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.

OAuth2: Protected-resource URL passed as scope instead of parsed scope

1 participant