Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
🦋 Changeset detectedLatest commit: af7fec9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-google-signin
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/mcp-tools
@clerk/mosaic
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
Package manifest, build, test and TypeScript configuration. The package is listed in the changeset ignore list, so nothing publishes yet. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Reads the tools/call messages of a request through the SDK's classifyInboundRequest, resolves per-tool scopes from a Map, and orders scopes by the configured catalog. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
An MCP SDK token verifier backed by @clerk/backend. It reports the token's single audience as AuthInfo.resource and enforces its own resource option. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ation server metadata RFC 9728 document with only the fields the RFC defines. The RFC 8414 document is relayed from the authorization server and cached, so it cannot drift from the instance's settings. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Cached per subject, resource and scope set, with a scope-escalation check and stable error codes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The 401 and 403 challenges, audience binding, the per-tool scope gate, withScopes(), mcpHandler() and exchangeToken(). Keys and credentials are read on first use. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Each returns the same object with handlers in the framework's shape. mcpHandler() authorizes in every binding, and the Express binding parses JSON itself so the scope gate always sees the body. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Usage per runtime, how requests are authorized, troubleshooting, and the migration table. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
djgould
force-pushed
the
devin/clerk-mcp-tools-v2-23f24b
branch
from
September 17, 2026 16:11
a394e4f to
af7fec9
Compare
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.
Description
Adds
@clerk/mcp-toolsto the monorepo as a rewrite around the MCP TypeScript SDK v2 (@modelcontextprotocol/server), replacing the standalone clerk/mcp-tools package and the resource-server code the Clerk remote MCP worker hand-rolls today.createClerkMcpAuth()is the single entry point. Framework subpaths (/hono,/express,/next) return the same object with handlers in that framework's shape; the root export is the plainfetchbinding for Cloudflare Workers, Deno and Bun.401withresource_metadataand a catalog-orderedscopelist of the baseline plus the requested tools' scopes, and403 insufficient_scopefor step-up, or a tool error withinsufficientScope: 'tool-error'. Tool calls are read from the body via the SDK'sclassifyInboundRequest, so routing headers cannot bypass the check.@clerk/backend'sverifyMachineAuthToken. Tokens must be issued forresource, which can be a function of the request. Opaque tokens bind through the verifiedaudonce feat(backend): enforce audience binding for OAuth access tokens #9794 lands; until then they need JWT access tokens.mcpHandler()authorizes every request in every binding, then dispatches to a fresh server.withScopes()checks again at call time and records telemetry.baselineScopes, and a relay of the authorization server's RFC 8414 document for clients that look for it on the MCP server's origin.exchangeToken(): an RFC 8693 client cached per subject, resource and scope set, with a scope-escalation check and stableClerkMcpErrorcodes.Review by commit: there are eight, one per module, and each typechecks and passes its tests.
Out of scope: the MCP client helpers and stores, migrating the remote MCP worker (demo in clerk/cloudflare-workers#2811), and resource registration in Clerk.
Release notes: the package is listed in
.changeset/config.jsonignore, following the@clerk/honoprecedent, so nothing publishes until the standalone repo's publish workflow is retired. The version base is the published 0.6.0.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
🤖 Generated with Claude Code