Repository navigation
Conversation
Clients created by @supabase/server now send via=supabase-server/<version> in X-Client-Info, and middleware=oauth-protected-resource when the client middleware runs after withOAuthProtectedResource, so BYO-MCP usage can be queried in gateway logs and the warehouse. Refs SDK-1877 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
commit: |
yannbf
marked this pull request as ready for review
November 24, 2026 10:18
cmelchior
approved these changes
Nov 25, 2026
This branch has not been deployed
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
What changed?
Adds
via=supabase-server/<version>toX-Client-Infoon clients created by@supabase/server.Client middleware running after
withOAuthProtectedResourcealso addsmiddleware=oauth-protected-resource. Caller tokens are merged and deduplicated; callerviatakes precedence. Applies to user and lazy admin clients.Adds a Release Please-managed version constant, tests and MCP documentation.
Why was this change needed?
To query BYO-MCP usage through outgoing Supabase API requests in gateway logs and the warehouse.
🔄 Breaking changes
Older v2 SDKs continue to work without the new tags. The peer range remains
^2.0.0.📋 Checklist
📝 Additional notes
Depends on supabase-js#2887 and CI will be failing until that PR is release and I update the version of the SDK in this repo.
Validation: 591 unit tests, typecheck and lint pass against a local build of that supabase-js branch. Hosted Edge Functions, Compute and warehouse verification remain pending.
Linear: SDK-1877.
AI-assisted generated summary
Written with Claude Code and reviewed by me.
Files:
src/core/client-info.ts(new),src/core/create-context-client.ts,src/core/create-admin-client.ts,src/middleware/client/index.ts,src/middleware/admin-client/index.ts,src/version.tsandrelease-please-config.json,docs/mcp.md,docs/core-primitives.md, andsrc/client-info.test.tsandsrc/version.test.ts.🤖 Generated with Claude Code