Content-Length: 264355 | pFad | https://github.com/modelcontextprotocol/python-sdk/issues/1242

48 Validation of response_modes_supported member of OAuthMetadata is too strict · Issue #1242 · modelcontextprotocol/python-sdk · GitHub
Skip to content

Validation of response_modes_supported member of OAuthMetadata is too strict #1242

@joesavage-silabs

Description

@joesavage-silabs

Initial Checks

Description

Authentication providers such as Keycloak support an OAuth2 extension called JARM (JWT Secured Authorization Response Mode) which defines new values for the response_modes_supported member of the OAuthMetadata response. See https://openid.net/specs/oauth-v2-jarm.html#name-response-encoding for details.

The pydantic model for OAuthMetadata only allows certain values in the response, which causes the model construction and remainder of the auth flow to fail.

I would propose relaxing the validation such that response_modes_supported is simply a list[str].

Example Code

Python & MCP Python SDK

python 3.13
mcp v1.12.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/modelcontextprotocol/python-sdk/issues/1242

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy