Skip to content

Protected Resource Metadata request failed: 404 #1495

@daltonnyx

Description

@daltonnyx

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

python=3.12
mcp=v1.18.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions