-
Notifications
You must be signed in to change notification settings - Fork 385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Proxy OAuth Server Provider #159
base: main
Are you sure you want to change the base?
Add Proxy OAuth Server Provider #159
Conversation
da8bb7e
to
8d7b387
Compare
@allenzhou101 was testing this with Entra ID. Thank you for putting this together! It mostly works with vanilla endpoints, but I feel like there are some gaps. Let me know what the best way you want to collaborate on this (happy to contribute to the PR).
For Entra ID specifically, this would kind of work with the public client flow, but is a bit more problematic because the server is responsible for getting the token rather than the client, which means that things like integration with authentication brokers (e.g., WAM) is not possible. This probably is more of a client conversation anyway, but thought I'd call it out here as well. |
@localden Thanks for your review! I’d definitely appreciate any contributions.
Would love to collaborate if you’re interested in contributing a PR here. |
Love this! Basically what I need! |
Introduces a new
ProxyOAuthServerProvider
class that enables proxying OAuth operations to an upstream OAuth server, allowing delegation of OAuth flows while maintaining our interface contract.Motivation and Context
In many deployment scenarios, we need to integrate with existing OAuth infrastructure (like corporate identity providers or third-party auth services) rather than implementing OAuth flows directly. This proxy implementation provides a clean abstraction layer that allows applications to delegate OAuth operations to an upstream server while maintaining a consistent interface to plug into other parts of the MCP sdk (eg. routing).
How Has This Been Tested?
Using Descope as the external/upstream OAuth IdP and MCP Inspector as the client, the below cases were tested:
token
endpoint and explicitly definingauthorize
)Breaking Changes
None
Types of changes
Checklist
Additional context
Considerations
Usage