Commit Graph
21 Commits
Author SHA1 Message Date
Raúl BarrosoandClaude Sonnet 5 11488801f7 docs(byo-mcp): how to use with custom domains (#51085)
## Problem

As part of my investigation of this
[issue](https://linear.app/supabase/issue/AI-1263/test-byo-mcp-with-custom-domains)
I realized that, in order for byo-mcp to work with custom domains,
there's a tweak needed, and I'm documenting it here.

The long term use to fix it lives
[here](https://linear.app/supabase/issue/FDBKIN-20212/use-custom-domain-in-oidc-and-oauth-well-known-discovery-endpoints).
With that one in place, we could remove the clarification and the
experience would be much much simpler.

Fixes AI-1263

## Solution

I'm documenting for now, and will follow up if something else needs a
change.

## Review instructions

Provide a clear numbered procedure that the PR reviewer can walk
through.

1. Visit `docs/guides/ai-tools/byo-mcp` and read the added text. 
2. See if it all makes sense.
3. Ask @raulb if something's not clear or confusing. 

## Checklist

Check all before review:

- [x] I have read
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
- [x] If I wrote a new docs topic or edited an existing topic, I used
the `/write-the-docs` or `/edit-the-docs` skill, which applies the docs
[style
guide](https://github.com/supabase/supabase/tree/master/apps/docs/style-guide)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Documentation**
* Added guidance for configuring MCP authorization metadata with a
custom domain, including setting the authorization server to the
Supabase Auth project issuer and checking it against the advertised
metadata.
* Clarified that the resource URL continues to use the domain requested
by the client, and that leaving the issuer setting unset locally retains
the default.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-10-02 19:07:46 +02:00
Raúl Barroso cad51d85fd docs: give your app an MCP server (BYO-MCP guide rewrite) (#50218)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Fixes AI-1009

Updates the BYO-MCP guide so it includes information about the new
middleware that will let users authenticate much more easily when
building their own MCP server. This one includes a couple of
clarifications which are important to document (use of environment
variables, etc.)

## What is the new behavior?


- Updated the existing guide (and example) for deploying an MCP server
to use `@modelcontextprotocol/server` v2 with `createMcpHandler`.
- Added new bits related to the new middleware which helps with
authentication specifying the required versions of supabase/server and
supabase/middleware, and also the auth prerequisites
- Includes a table of where each MCP client takes the URL.
- Added a new example to
`examples/edge-functions/supabase/functions/mcp/` to illustrate the
authentication example `authenticated-mcp-server`.

## Publish order

> [!IMPORTANT]  
> There will be a companion PR to include the library components so this
PR is blocked until https://github.com/supabase/supabase/pull/49579
ships.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added comprehensive guidance for deploying authenticated MCP servers
with OAuth 2.1, Supabase Auth, and user-scoped data access.
* Added an authenticated MCP server example with `list_todos` and
`create_todo` tools, protected by row-level security.
* Added setup instructions for OAuth configuration, consent screens,
local testing, and deployment.

* **Documentation**
* Updated authentication guidance and MCP security warnings across
related guides.
  * Added links to MCP server and OAuth consent resources.

* **Refactor**
* Simplified the unauthenticated MCP server example and updated its
tooling configuration.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-09-15 09:45:14 +02:00
Raúl Barroso f5f897a29b feat(functions): inject env var function slug (#49617)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Feature (self-hosted Edge Functions)

## What is the current behavior?

The self-hosted Edge Functions router
(`docker/volumes/functions/main/index.ts`) doesn't tell a function which
slug a request resolved to. As a result, `@supabase/server`'s
`withOAuthProtectedResource` can't derive its canonical resource URL and
falls back to reconstructing it from the request path against the
internal `api-gw` origin, so the advertised OAuth Protected Resource is
/wrong for self-hosted deployments.

## What is the new behavior?

`main/index.ts` now injects `SUPABASE_FUNCTION_SLUG: service_name` per
request (after the `Deno.env.toObject()` snapshot, so nothing in the
container env can shadow it).

Combined with the operator's `SUPABASE_PUBLIC_URL`, the advertised
resource is the correct external
`{SUPABASE_PUBLIC_URL}/functions/v1/{slug}`, not the internal
`http://api-gw:8000`.

Verified on the docker stack: the slug is injected per-function, the
resource origin resolves to `SUPABASE_PUBLIC_URL`, and the `401`
`www-authenticate` carries the right `resource_metadata`.

## Additional context

Fixes AI-1128

Companion to `@supabase/server` [PR
#117](https://github.com/supabase/server/pull/117) and the [CLI slug
injection](https://github.com/supabase/cli/pull/6345)

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Bug Fixes**
* Edge workers now receive the correct function slug in their runtime
environment, improving per-function request handling.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-08-28 12:32:30 +02:00
Raúl Barroso 01958e520f tests: add regression test for skills list (#47819)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Adds regression tests for something we noticed today. AI skills weren't
being loaded on https://supabase.com/docs/guides/ai-tools/ai-skills, so
while we fixed it, we wanted to make sure we could identify this faster.

## What is the current behavior?

Less tests. AI skills loading and not 

## What is the new behavior?

Two tests, no new workflows — both ride existing CI:

- **Unit test** (`AiSkills.utils.test.ts`) mocks GitHub, checks the
parsing/shaping logic (dir filtering, frontmatter, install command,
sorting, empty→fallback). Runs on every PR.
- **Smoke test** (`AiSkillsIndex.smoke.test.ts`) hits the live page and
asserts the skills table actually rendered. Runs in the daily docs smoke
job, and can be pointed at any environment via `DOCS_SMOKE_URL`.

Small supporting change: `getAiSkillsImpl` is now exported so the unit
test can call it directly.

## Additional Context

- Fixes
https://linear.app/supabase/issue/AI-915/skills-docs-page-fails-to-load-available-skills

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Tests**
* Added coverage for AI Skills loading, including directory filtering,
metadata parsing, install command generation, fallback descriptions, and
error handling.
* Added a smoke test confirming the AI Skills documentation page loads
successfully and displays install commands.
* **Refactor**
* Made AI Skills loading functionality accessible for direct testing
while preserving existing behavior.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-07-29 17:19:50 +00:00
Raúl BarrosoandIvan Vasilov edda1c4029 feat: block adding new owners to stripe orgs (#45601)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

> [!IMPORTANT]  
> This is only for Stripe managed organizations

New feature / Bug fix (Fixes
https://linear.app/supabase/issue/FE-3151/disable-the-option-of-adding-new-owners-to-an-organization-connected)

## What is the current behavior?

<img width="1270" height="1036" alt="CleanShot 2026-05-05 at 17 46
05@2x"
src="https://github.com/user-attachments/assets/311aa536-c08e-4b8e-948b-70a6fd3f42ad"
/>

<img width="1216" height="498" alt="CleanShot 2026-05-05 at 17 49 32@2x"
src="https://github.com/user-attachments/assets/0a26f92d-372b-45a2-958e-aa3cc78114aa"
/>


## What is the new behavior?

<img width="1284" height="1060" alt="CleanShot 2026-05-06 at 14 44
51@2x"
src="https://github.com/user-attachments/assets/cbc1b44f-358b-4c7b-8abb-aa53f5fc2e76"
/>

<img width="1232" height="590" alt="CleanShot 2026-05-06 at 14 44 29@2x"
src="https://github.com/user-attachments/assets/20262d11-4a62-4c84-84f2-2ba8636f2976"
/>

## Additional context

- This also updates the treatment of previous warning message. This one
was living next to the name of the role which made the whole select
element quite crowded. Decided to add a tooltip for better UX.
- Proper API fix lives on
https://github.com/supabase/platform/pull/32443

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Enhancements**
* "Owner" role is now disabled for certain managed organizations to
prevent unsupported assignments.
* Disabled role options now show clear tooltips explaining why a role
cannot be assigned, applied to member invitations and role update
workflows.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-05-06 13:05:53 +00:00
Raúl BarrosoandIvan Vasilov 1797842ee5 refactor(stripe projects): always create a new org (#44634)
## I have read the
[CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md)
file.

YES

## What kind of change does this PR introduce?

Refactor based on https://github.com/supabase/platform/pull/31325

## What is the current behavior?

We presented a page to Stripe users to let them either pick an existing
org or create one.

## What is the new behavior?

We're forcing them to create a new one (or show that there was one
already linked).

- It also adds the option to sign out when there's a conflict. Fixes
https://linear.app/supabase/issue/API-963/add-a-button-to-logout-from-the-page-you-must-be-logged-in-as-x-to
- And adds the link to root from the logo.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **New Features**
  * Added organization preview creation endpoint for billing workflows.

* **Bug Fixes**
* Removed organization-picking flow from Stripe Projects login; users
now proceed directly with confirmation.
  * Added a "Sign out" button on error pages.

* **Refactor**
  * Removed a legacy billing partner option.
  * Made the Supabase logo clickable for quick navigation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-04-08 17:11:28 +00:00
Raúl Barroso 527c342837 fix(mgmt-api): update types (#44087) 2026-03-23 16:06:06 +01:00
Raúl Barroso 2ba93c5632 refactor: to projects (#43825)
Use settled project name
2026-03-16 20:47:32 +01:00
Raúl Barroso 97f10d2087 fix: wording when an account was already linked and add option to create new orgs (#43698)
Minor tweak related to [this
comment](https://linear.app/supabase/issue/API-917/include-stripe-icon-for-orgs-created-via-stripe-fabric#comment-18343910).
This is when an account was already linked.


<img width="750" height="369" alt="image"
src="https://github.com/user-attachments/assets/1c10c10f-7179-4023-ac11-7496bb6b80fd"
/>


<img width="771" height="600" alt="image"
src="https://github.com/user-attachments/assets/55b0f90a-32e4-42a0-996d-ac46cb881e60"
/>

Fixes
https://linear.app/supabase/issue/API-935/add-the-ability-to-create-a-new-free-organization-as-part-of-the-link
2026-03-13 13:32:17 +01:00
Raúl BarrosoandIvan Vasilov 87e3e8aa2a feat(mgmt-api): add ability to choose orgs (#43549)
Related to
https://github.com/supabase/platform/compare/raulb/fix-API-906

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-03-11 09:01:49 +00:00
Raúl Barroso 22d706cd17 refactor: partner (#43466) 2026-03-06 09:48:24 +01:00
Raúl BarrosoandIvan Vasilov 86ef5e11cc feat(mgmt-api): adds partner confirmation page (#43237)
This adds some pages that will be needed soon.

Fixes
https://linear.app/supabase/issue/API-901/ship-studio-authentication-confirmation-page

Used by https://github.com/supabase/platform/pull/29718

Here are some screenshots of the 3 possible scenarios (initiated by the
Management API):

> [!NOTE]  
> As part of this flow, a new account + and a free organization will be
created.

### Initializing the confirmation flow

<img width="2708" height="1426" alt="CleanShot 2026-02-27 at 13 44
01@2x"
src="https://github.com/user-attachments/assets/e5a90886-43a9-4202-ad81-fb42c13da036"
/>

### Confirmation page

<img width="2610" height="1640" alt="CleanShot 2026-02-27 at 13 44
20@2x"
src="https://github.com/user-attachments/assets/8491fe24-c183-4987-a1c4-3d9b26dec9c3"
/>

### In the event of going through a flow with a different signed-in
account

<img width="1982" height="1564" alt="CleanShot 2026-02-27 at 13 47
44@2x"
src="https://github.com/user-attachments/assets/8a50b4c7-3fa4-4f6a-9d6f-b8776975b676"
/>

---------

Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
2026-03-04 11:38:10 +00:00
Raúl Barroso 10cea1e556 feat: add validate pr workflow (#41061) 2025-12-04 15:21:43 +00:00
Raúl Barroso 09df6e8373 refactor: infra queries to use attributes (#41018)
* refactor: infra queries to use `attributes`

This PR refactors the infrastructure monitoring query code reducing duplication and unifying the API request to always be `attributes`:

•  Removed the separate useInfraMonitoringQuery hook and getInfraMonitoring function that handled a single monitoring query
•  Consolidated all infrastructure monitoring queries into a unified useInfraMonitoringAttributesQuery hook that handles multi-attribute requests
•  Moved interval selection logic from the query layer to the consumer (InfrastructureActivity.tsx), where it can be computed dynamically based on user-selected date ranges
•  Simplified query types by removing intermediate InfraMonitoringData and InfraMonitoringVariables types
•  Interval is now computed in the component (defaults to 1d, switches to 1h for date ranges ≤48 hours) rather than hardcoded in the query layer
•  All queries now use the unified multi-attribute endpoint with explicit parameter passing

* fix: handle single-attribute response format
2025-12-04 16:16:12 +01:00
Raúl Barroso 7860dad841 fix: organization usage page (#40956)
* fix: organization usage page

Fixes https://linear.app/supabase/issue/API-759/egress-graph-does-not-change-when-filtering-by-project

* test: org usage
2025-12-02 14:37:24 +01:00
Raúl Barroso 9daecf842a docs(mgmt-api): Rate Limits (#40785) 2025-11-26 11:16:04 +01:00
Raúl BarrosoandAli Waseem bfef63e874 feat(mgmt-api): update reports API to use multiple attributes (#40473)
* feat(mgmt-api): update reports API

Related to https://github.com/supabase/infrastructure/pull/27519 and https://linear.app/supabase/issue/API-551/extend-infra-monitoring-with-multi-attribute-response

* tests: infra-monitoring-queries

---------

Co-authored-by: Ali Waseem <waseema393@gmail.com>
2025-11-21 12:56:04 +00:00
Raúl Barroso f4afd26d7d fix: top alignment on deleting project warning (#38862)
fix: top alignment
2025-09-22 08:39:57 +00:00
Raúl Barroso 4590b36a03 fix reading time for blog posts (#38600)
* fix reading time for blog posts

* fix prettier

* ran `pnpm run format`
2025-09-10 16:43:31 +02:00
Raúl Barroso 29ee6a2992 style: use GitHub's right product name (#38099)
* style: use GitHub's right product name

* fix: use correct kotlin provider
2025-08-22 13:43:47 +02:00
Raúl Barroso f551668d01 doc: add Raúl Barroso (#38032) 2025-08-20 09:27:58 +02:00