ai
ai copied to clipboard
[Demo] Create `mcp-clerk-oauth`
- Adds demo for a remote MCP server integrates with Clerk to be used as an OAuth provider.
- Notable differences include changing request parameters to include
scopesand token fetching withgrant_type
Thinking about this more, I believe there might be a diff approach ref: https://x.com/gching/status/1905466984999125220
In the case when we are using a third party auth service (Clerk, Auth0), we potentially shouldn't be following https://developers.cloudflare.com/agents/model-context-protocol/authorization/#3-bring-your-own-oauth-provider since this means that the MCP server acts as the oauth client where as the MCP client should be oauth client
I think in the most simplest case, this approach does work for third party auth services to utilize them as auth though for the MCP server itself, so not saying this approach is wrong
the other apporach we could think about is how we utilize OAuthProvider to delegate everything to a upstream third party auth service - and still (or not) generate access tokens on the MCP server 🤔
wanna revisit this, now that so much has changed?
Yep! Most definitely, I think Clerk is also pushing forward with their OAuth / OIDC provider implementation, when that's out I think we can have a create a better example
dope, no rush.