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
- A portal with at least one access group
- An account with Supabase for each person who connects
- For the CLI steps: the Metorial CLI, signed in to your portal
Sign-in methods
| Method | Type | What a person provides |
|---|---|---|
| OAuth (default) | OAuth | Signs in to Supabase |
| Personal Access Token | API token | token |
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:
| Scope | Name | What it allows |
|---|---|---|
all:read | All Read | Read access to all Management API resources |
all:write | All Write | Write access to all Management API resources |
auth:read | Auth Read | Read access to Auth configuration |
auth:write | Auth Write | Write access to Auth configuration |
database:read | Database Read | Read access to database configuration |
database:write | Database Write | Write access to database configuration |
domains:read | Domains Read | Read access to custom domains |
domains:write | Domains Write | Write access to custom domains |
edge_functions:read | Edge Functions Read | Read access to Edge Functions |
edge_functions:write | Edge Functions Write | Write access to Edge Functions |
environment:read | Environment Read | Read access to environment variables |
environment:write | Environment Write | Write access to environment variables |
organizations:read | Organizations Read | Read access to organizations |
organizations:write | Organizations Write | Write access to organizations |
projects:read | Projects Read | Read access to projects |
projects:write | Projects Write | Write access to projects |
rest:read | REST Read | Read access to REST API configuration |
rest:write | REST Write | Write access to REST API configuration |
secrets:read | Secrets Read | Read access to secrets |
secrets:write | Secrets Write | Write access to secrets |
storage:read | Storage Read | Read access to storage configuration |
storage:write | Storage Write | Write 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:
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
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.
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 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. NeedsprojectRef.query_table: Query rows from a Supabase table using the auto-generated REST API (PostgREST). Needstable.get_project_logs: Query Supabase project logs through the Management API.get_database_schema: Export Supabase database schema metadata for development workflows. Needsformat.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. NeedsfunctionName.manage_project: Create, pause, restore, or delete a Supabase project. Needsaction.manage_storage_objects: List, inspect, upload, update, download, move, copy, or delete files in Supabase Storage buckets. NeedsactionandbucketId.manage_edge_functions: List, get, create, update, or delete Supabase Edge Functions. Needsaction.manage_table_rows: Insert, update, upsert, or delete rows in a Supabase table using the auto-generated REST API. Needstableandaction.manage_storage_buckets: List, get, create, update, empty, or delete storage buckets in a Supabase project. Needsaction.run_query: Execute a raw SQL query against a Supabase project's PostgreSQL database via the Management API. Needsquery.get_auth_config: Retrieve or update the authentication configuration for a Supabase project. Needsaction.manage_secrets: List, create, or delete secrets (environment variables) for a Supabase project. Needsaction.manage_auth_users: List, get, create, update, or delete authentication users in a Supabase project. Needsaction.
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
- Claude Code, Cursor, Codex and ChatGPT: connect each client to your portal and use Supabase there
- Create custom OAuth credentials: the Provider Auth screens in more detail
- Tool permissions: tool filters and what employees see
- Supabase on metorial.com: the integration overview