Skip to content

[Demo] Create mcp-clerk-oauth #55

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

gching
Copy link

@gching gching commented Mar 27, 2025

  • 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 scopes and token fetching with grant_type

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it best practice to commit these types? I am assuming no and we just add in the README to generate the types beforehand 🤔

@gching
Copy link
Author

gching commented Mar 28, 2025

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 🤔

@threepointone
Copy link
Collaborator

wanna revisit this, now that so much has changed?

@gching
Copy link
Author

gching commented May 9, 2025

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

@threepointone
Copy link
Collaborator

dope, no rush.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants