Skip to content

[FEATURE] Capability to handle authorization with MCP #2898

Open
@kirmorozov

Description

@kirmorozov

Is your feature request related to a problem? Please describe.

Fresh update to the standard assumes authorization, which is missing at the moment.
https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization#2-6-access-token-usage

Describe the solution you'd like

Let inject interceptors for okhttp3 so tokens and actual token authorization can happen well before the actual invocation. tokens refreshed on time as needed, and other twists of authorizations.

Describe alternatives you've considered

  • Putting token lambda function instead of complete interceptor.
    Slightly more more to implement

Additional context

MCP server may use token to authorize use of selected tools based of the token.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions