Skip to content

Allow AuthorizationManager to hit endpoints outside of the base URL #403

Description

@camfulton

Is your feature request related to a problem? Please describe.
The AuthorizationManager removes the path from the URL that you provide to it, turning something like https://www.example.com/CoolServer/mcp into just https://www.example.com/

This URL is then used to form the paths for performing OAuth operations: https://www.example.com/register, for example.

However, I have encountered servers in the wild whose paths are not build off the base url - they expect /CoolServer/register or something, rather than just hitting at the base.

Describe the solution you'd like
I believe the TS implementation of this crate allows you to provide a path to build off of with options.prependPathname, rather than just always normalizing to the root. That seems like a reasonable solution, and would keep solutions aligned across implementations.

https://github.com/modelcontextprotocol/typescript-sdk/blob/main/src/client/auth.ts#L551

Describe alternatives you've considered
I'm not sure if there is an alternative at the moment, but I am open to them.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium: important but non-blocking improvementT-securitySecurity-related changesbugSomething is not workingready for workIssue is well-defined and ready to be picked up

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions