MetorialDocs

Set up Supabase in Metorial for Claude, ChatGPT and Cursor

Share Supabase with your team in Claude, ChatGPT and Cursor through Metorial: OAuth or personal access token sign-in, 17 tools (7 read-only).

To give your team Supabase in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Supabase integration in a Metorial portal, and each person signs in to Supabase with their own account. Agents can manage PostgreSQL databases, authenticate users, store files, and run edge functions on Supabase. The integration has 17 tools, 7 read-only and 10 destructive, plus 2 triggers.

What you'll learn

  • How an admin shares Supabase in a portal and how each person connects
  • The 22 OAuth scopes Supabase can request, and what each one allows
  • How to keep the 7 read-only tools and reject the other 10

Before you start

Sign-in methods

MethodTypeWhat a person provides
OAuth (default)OAuthSigns in to Supabase
Personal Access TokenAPI tokentoken

The portal and metorial setup use OAuth unless someone picks another method.

OAuth

People sign in to Supabase and approve the scopes you allow. The integration can request:

ScopeNameWhat it allows
all:readAll ReadRead access to all Management API resources
all:writeAll WriteWrite access to all Management API resources
auth:readAuth ReadRead access to Auth configuration
auth:writeAuth WriteWrite access to Auth configuration
database:readDatabase ReadRead access to database configuration
database:writeDatabase WriteWrite access to database configuration
domains:readDomains ReadRead access to custom domains
domains:writeDomains WriteWrite access to custom domains
edge_functions:readEdge Functions ReadRead access to Edge Functions
edge_functions:writeEdge Functions WriteWrite access to Edge Functions
environment:readEnvironment ReadRead access to environment variables
environment:writeEnvironment WriteWrite access to environment variables
organizations:readOrganizations ReadRead access to organizations
organizations:writeOrganizations WriteWrite access to organizations
projects:readProjects ReadRead access to projects
projects:writeProjects WriteWrite access to projects
rest:readREST ReadRead access to REST API configuration
rest:writeREST WriteWrite access to REST API configuration
secrets:readSecrets ReadRead access to secrets
secrets:writeSecrets WriteWrite access to secrets
storage:readStorage ReadRead access to storage configuration
storage:writeStorage WriteWrite access to storage configuration

Personal Access Token

To connect, a person enters:

  • token: Supabase Personal Access Token (starts with sbp_)

Setup settings

Whichever method you pick, setup also asks for:

  • projectRef (optional): Supabase project reference ID (e.g., "abcdefghijklmnop"). Required for project-level data operations.

Use your own Supabase OAuth app

With your own OAuth app, people see your company's name on the Supabase consent screen, and the client ID and secret belong to you.

Start the credentials in Metorial

In the dashboard, select Settings, then Organization Settings. Under Integrations and MCP, select Provider Auth, then Create Auth Credentials. Choose Supabase and copy the Redirect URI.

Register the app with Supabase

In your Supabase organization's settings, open the OAuth Apps tab, click Add application, fill in the details with the redirect URI from Metorial, and click Confirm. Supabase sets the scopes on the app itself, so choose them there.

The app acts on the organizations and projects a person allows when they connect.

Finish in Metorial

Copy the app's client ID and client secret. Back in Metorial, enter a Name, the Client ID and the Client Secret, review Scopes, and select Create. Then pick these credentials for the Supabase integration.

Admin: share Supabase in a portal

In the dashboard

Open Shared Resources

Open Workforce, choose the portal, and select Shared Resources under Access.

Share a new integration

Select Share a Resource, then New Integration, and choose Supabase. Under Auth Method, keep OAuth or pick another. For how members connect, choose Each person connects, so everyone signs in to Supabase as themselves.

Limit the tools

Under Tool Filters, set the write and destructive groups to Reject if agents should only read from Supabase.

Choose who gets it

Add the access groups that should see Supabase. When a person asks for access from the portal, the request appears under Access Requests.

With the CLI

The CLI cannot create the per-user Supabase integration. Once it exists, check which groups have it:

metorial-admin portals access list <portal-id> --type provider_template --search supabase

Employee: connect Supabase

In the portal

Open Supabase in the catalog

Sign in to your portal and open Supabase. The status reads Available.

Authenticate

Under Quick setup, select Authenticate. A Supabase sign-in tab opens. Sign in and approve the permissions listed.

Confirm

The status changes to Configured. If it later reads Needs reconnect, select Reconnect and sign in again.

With the CLI

metorial catalog search supabase
metorial setup <catalog-item-id>

catalog search prints the catalog item ID. metorial setup uses OAuth. To connect with Personal Access Token instead, find its ID with metorial catalog get <catalog-item-id> and add --auth-method <auth-method-id>.

Add it to your AI client

metorial install adds your Supabase connection to a local MCP client such as Claude Code, Cursor or Codex. metorial list prints the integration ID and metorial client list the client identifiers.

metorial list supabase
metorial client list
metorial install <client-identifier> <integration-id>

For a client that takes a server URL, such as ChatGPT, metorial install custom <integration-id> creates an installation token and shows the endpoint details.

Make it read-only

Open the integration's Tool Filters and set the write and destructive groups to Reject. Agents keep the 7 read-only tools, such as get_project and query_table, and lose the 10 destructive tools, such as run_query or invoke_rpc.

Employees see the result on the integration's page in the portal under Tool access. For the full walkthrough, see Tool permissions.

Check it worked

metorial list supabase
metorial tools <integration-id>
metorial call <integration-id> list_projects -d '{}'

metorial tools lists the 17 tools, minus any you rejected. list_projects takes no input. It lists all Supabase projects accessible to the authenticated user.

To see every input a tool takes, run metorial schema <integration-id> <tool-key>.

Tools

Read-only tools (7)

  • list_projects: List all Supabase projects accessible to the authenticated user.
  • list_organizations: List all Supabase organizations accessible to the authenticated user.
  • get_project: Retrieve detailed information about a specific Supabase project, including its configuration, status, database host, and API keys. Needs projectRef.
  • query_table: Query rows from a Supabase table using the auto-generated REST API (PostgREST). Needs table.
  • get_project_logs: Query Supabase project logs through the Management API.
  • get_database_schema: Export Supabase database schema metadata for development workflows. Needs format.
  • get_project_health: Check health for Supabase project services such as Auth, Postgres, REST, Realtime, Storage, and Pooler.

Destructive tools (10)

  • invoke_rpc: Call a PostgreSQL function (RPC) through the Supabase REST API. Needs functionName.
  • manage_project: Create, pause, restore, or delete a Supabase project. Needs action.
  • manage_storage_objects: List, inspect, upload, update, download, move, copy, or delete files in Supabase Storage buckets. Needs action and bucketId.
  • manage_edge_functions: List, get, create, update, or delete Supabase Edge Functions. Needs action.
  • manage_table_rows: Insert, update, upsert, or delete rows in a Supabase table using the auto-generated REST API. Needs table and action.
  • manage_storage_buckets: List, get, create, update, empty, or delete storage buckets in a Supabase project. Needs action.
  • run_query: Execute a raw SQL query against a Supabase project's PostgreSQL database via the Management API. Needs query.
  • get_auth_config: Retrieve or update the authentication configuration for a Supabase project. Needs action.
  • manage_secrets: List, create, or delete secrets (environment variables) for a Supabase project. Needs action.
  • manage_auth_users: List, get, create, update, or delete authentication users in a Supabase project. Needs action.

Triggers

Supabase has 2 triggers, which fire on events in Supabase:

  • database_changes: [Polling fallback] Polls for new, updated, or deleted rows in a Supabase table by tracking changes since the last poll.
  • database_webhook: Receives webhook notifications when INSERT, UPDATE, or DELETE events occur on Supabase database tables.

Next steps