On this page
- Build a token for one agent
- A 403 with missing_permissions
- Scoped tokens with the Supabase CLI and in CI
- A token follows your own role
- Find tokens committed to the repo
- What we do not know yet
- Replace a full-access token
- Which permissions each job needs
- Related guides
- Official docs behind this checklist
- FAQ for builders before launch
Supabase change
Supabase personal access token scopes: how do I give an agent or CI a token for one project with only the permissions it needs?
Create a new token on the Dashboard's access tokens page: since scoping became generally available on September 28, 2026, every new personal access token is scoped to the organizations or projects you pick, with Read or Read-write for each permission and an expiry up to one year out. For an agent that only reads one project, scope it to that project, start from the No access preset and turn on Database Read; the Read-only preset includes API key secrets. Scope cannot be edited after creation, a token never has more access than your own role, and old full-access tokens keep working with a Legacy badge. The browser flow of supabase login still creates a full-access token, so give the CLI and CI a scoped one with supabase login --token or SUPABASE_ACCESS_TOKEN.
Build a token for one agent
On the access tokens page, choose the resources (the Dashboard recommends a project-level scope), the permissions and the expiry. The review screen expands each permission into the Management API endpoints and MCP tools it covers, and shows a Low, Medium or High risk banner for the mix of reach and write access. Copy the value before you close the page: it is shown once.
A 403 with missing_permissions
When a Management API request lacks a permission, the 403 names it in a missing_permissions field. Check that your own role has that permission, then create a replacement token that includes it: scope and permissions are fixed at creation. A request for a project outside the token's scope gets a plain 403 with no field.
export SUPABASE_ACCESS_TOKEN="sbp_fc..."
# Database Read covers this endpoint
curl "https://api.supabase.com/v1/projects/your-project-ref/types/typescript" \
-H "Authorization: Bearer $SUPABASE_ACCESS_TOKEN"
# needs Project Settings Read: HTTP 403 without it
curl -i "https://api.supabase.com/v1/projects/your-project-ref" \
-H "Authorization: Bearer $SUPABASE_ACCESS_TOKEN"Scoped tokens with the Supabase CLI and in CI
Create the token in the Dashboard and pass it with supabase login --token, or set SUPABASE_ACCESS_TOKEN, which overrides any saved token and is the one to use in CI.
supabase login --token sbp_fc...
# CI
export SUPABASE_ACCESS_TOKEN="sbp_fc..."
supabase link --project-ref your-project-refA token follows your own role
Every request checks both the token's scope and your current role. If you leave an organization or lose a permission, the token loses it too, and gets it back if your access returns; the token's detail view marks resources you can no longer reach. The Dashboard lets you add a permission your role lacks, but the token cannot use it until your role has it.
Find tokens committed to the repo
Personal access tokens start with sbp_, and scoped ones with sbp_fc. Search the repo and its history for both; a token found there should be deleted in the Dashboard and replaced with a scoped one.
On a public GitHub repo, also look at its secret scanning alerts. GitHub's list of supported secret scanning patterns, read on October 22, 2026, includes two kinds of Supabase personal access token, and push protection covers one of them. Which Supabase keys that list covers.
grep -rn "sbp_" --exclude-dir=node_modules --exclude-dir=.git .
git log -p --all -S "sbp_" --onelineReplace a full-access token
- 1List the tools that hold a Supabase token: coding agents, MCP configs, CI secrets, deploy scripts.
- 2For each one, create a token scoped to its project, with only the permissions its job needs and an expiry that matches it.
- 3Start an agent from the No access preset and add Database Read; add Migrations Read-write only if it applies migrations.
- 4Swap the new value into the tool or CI secret, run its usual job once, and read any missing_permissions in a 403.
- 5Delete the old token in the Dashboard once nothing uses it.
Which permissions each job needs
Built from the permission table in Supabase's Personal Access Tokens docs and its post of October 26, 2026, both checked on 2026-10-28. Pick the job first, then add only what it lists.
Permissions by job
| Job | Scope | Permissions |
|---|---|---|
| Coding agent that reads one project through the Supabase MCP server | That project | No access preset, then Database Read |
| Agent that also applies migrations | That project | Database Read, Migrations Read-write |
| Agent that reads logs and advisor warnings | That project | Logs Read, Advisors Read |
| supabase link, locally or in CI | That project | Project Settings, API Keys and API Key Secrets, all Read |
| supabase db push in CI | That project | Not limited by the token: it connects with SUPABASE_DB_PASSWORD, so the database password is the limit |
Which permission each Supabase MCP tool needs
Each tool checks before it runs and returns a tool error when the permission is missing. With Database Read, a SQL write through execute_sql returns a Postgres permission error rather than a 403.
| MCP tool | Permission |
|---|---|
| execute_sql, list_tables, list_extensions, generate_typescript_types | Database (Read) |
| list_migrations | Migrations (Read) |
| apply_migration | Migrations (Read-write) |
| get_logs, query_logs | Logs (Read) |
| get_advisors | Advisors (Read) |
| list_edge_functions, get_edge_function | Edge Functions (Read) |
| deploy_edge_function | Edge Functions (Read-write) |
| get_project, get_project_url | Project Settings (Read) |
| get_publishable_keys | API Keys (Read) |
| list_projects | Projects (account-wide) (Read) |
| create_branch, merge_branch | Development or Production Branches (Read-write) |
| search_docs | Always available |
Related guides
Official docs behind this checklist
Browse all launch guides · Read resources · How to make and check your next change
FAQ for builders before launch
Do my existing Supabase access tokens stop working?
No. Existing tokens keep working until they expire or you delete them; full-access ones show a Legacy badge, and Create legacy token is still there.
Can I change the scope of a token later?
No. Scope and permissions are fixed at creation, so create a replacement token and swap it in.
Why not use the Read-only preset for an agent?
Because Read-only includes secrets such as API keys. Supabase suggests starting from No access and turning on Database Read.