Initial Checks
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.
Example Code
Python & MCP Python SDK
Initial Checks
Description
In python-sdk v1.18.0, the PR #1324 introduced new scopes selection and step-up authorization. but in the step 1
python-sdk/src/mcp/client/auth.py
Lines 272 to 273 in 40acbc5
It raise an error if the
oauth-protected-resourceurl is not found on server. this cause issue for old mcp server that does not support it yet. for examplehttps://mcp.linear.app/sseorhttps://mcp.atlassian.com/v1/sseSince we still allows discover fallback url in step 4. I suggest we should remove this exception and let the flow fall through.
Example Code
Python & MCP Python SDK