Protected Resource Metadata request failed: 404
Initial Checks
- I confirm that I'm using the latest version of MCP Python SDK
- I confirm that I searched for my issue in https://github.com/modelcontextprotocol/python-sdk/issues before opening this issue
Description
In python-sdk v1.18.0, the PR #1324 introduced new scopes selection and step-up authorization. but in the step 1
| else: | |
| raise OAuthFlowError(f"Protected Resource Metadata request failed: {response.status_code}") |
It raise an error if the oauth-protected-resource url is not found on server. this cause issue for old mcp server that does not support it yet. for example https://mcp.linear.app/sse or https://mcp.atlassian.com/v1/sse
Since we still allows discover fallback url in step 4. I suggest we should remove this exception and let the flow fall through.