Repository navigation
feat(mcp demos): move OAuth templates to workers-oauth-provider 1.2.4 - #681
Merged
Merged
Conversation
Bump every OAuthProvider demo to @cloudflare/workers-oauth-provider ^1.2.4 and
keep the single-Worker OAuthProvider. 1.x requires resourceMetadata.resource,
so each demo builds one provider per origin with resource `${origin}/mcp`,
which works on workers.dev, custom domains and wrangler dev. Drop the removed
allowPlainPKCE option.
Replace the per-origin provider map with a single OAuthProvider whose resourceMetadata.resource comes from an MCP_RESOURCE var, as cloudflare-mcp does. The default points at the local dev URL; READMEs say to set it to the deployed URL.
|
Add it to minimumReleaseAgeExclude, as the repo does for other fresh releases, and update the lockfile for mcp-server-bearer-auth's bump.
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The MCP OAuth templates now use
@cloudflare/workers-oauth-provider@^1.2.4, still with the single-WorkerOAuthProvider. Follow-up to #680, whose last two commits landed on the branch after it merged.1.x requires
resourceMetadata.resource, the URL every token is bound to:MCP_RESOURCEvar, ascloudflare-mcpdoes. The default inwrangler.jsoncis the local dev URL (http://localhost:<port>/mcp).MCP_RESOURCEto the deployed URL before deploying.allowPlainPKCEoption is dropped, andmcp-server-bearer-auth(which only imports a type) is bumped too.Covers
remote-mcp-server,-server-autorag,-github-oauth,-google-oauth,-logto,-authkit,-cf-access,-auth0/mcp-auth0-oidcandmcp-slack-oauth.tsc --noEmitandwrangler deploy --dry-runpass for each template.remote-mcp-serverunderwrangler devthrough registration,/authorize, token exchange and an authorizedtools/callon 1.2.4. The protected resource metadata reports theMCP_RESOURCEvalue.