Supabase MCP in Claude Code: your projects, scoped and read-only
Supabase's MCP server connects Claude Code to your own projects: query tables, read logs, manage migrations and functions, and look things up in Supabase's documentation.
Everything that narrows it — a project, read-only mode, a short list of tool groups — rides in the query string, which is why the exact line Supabase prints looks long.
Sources read November 25, 2026. By the Omniscio team. Updated .
What it gives Claude Code
Supabase describes the server as a way for AI assistants to interact with a project and do tasks such as managing tables, fetching config and querying data. Its tools are organised into feature groups: database, debugging, development, edge functions, account management, docs, branching, feedback, storage and notebooks. The URL's features parameter takes those group names, with two exceptions: functions for edge functions and account for account management.
Database is the group most people are after: list_tables, list_extensions, list_migrations, apply_migration and execute_sql. Debugging adds query_logs and get_advisors; development adds get_project_url, get_publishable_keys and generate_typescript_types; edge functions adds deploy and secret tools; docs adds search_docs.
Two groups switch themselves off according to the URL. Account management is disabled when project_ref scopes the connection to one project, and feedback is disabled in read-only mode. That is the trade the URL is making: the narrower the connection, the fewer tools it can offer.
Three more caveats are worth knowing before you rely on a group. Branching is marked experimental and needs a paid plan, and storage is the one group that is off by default. Notebooks are available only on the hosted connection, not the local or self-hosted one.
The command
The shortest line that works, run in your terminal rather than inside a session:
claude mcp add --transport http supabase https://mcp.supabase.com/mcpSupabase's installation panel prints a longer version of the same command, with project scope and the feature list its builder had selected:
claude mcp add --scope project --transport http supabase \
"https://mcp.supabase.com/mcp?features=docs%2Caccount%2Cdatabase%2Cdebugging%2Cdevelopment%2Cfunctions%2Cbranching%2Cfeedback%2Cnotebooks"The query is a comma-separated list, percent-encoded because it sits in a URL, and every group it names is one the installation builder had ticked. Editing that list is the normal way to trim the server: drop account and the account-level tools go with it.
Four query parameters do the work people actually ask about, and they combine:
| Parameter | What it does | When to use it |
|---|---|---|
project_ref=<id> | Scopes the server to one project and disables the account tools | Almost always: a repository belongs to one project |
read_only=true | Runs every query as a read-only Postgres user | When Claude should read, not change |
features=<groups> | Enables only the tool groups named, comma-separated | To cut the attack surface to what the task needs |
skip_elicitations=<tools> | Skips the form confirmations for the tools it names | Only once the confirmations are in the way |
https://mcp.supabase.com/mcp?project_ref=abc123&read_only=trueThe project ref is the id in the dashboard; Supabase's MCP connection tab builds the whole URL for you if you would rather not assemble it.
Account tools disappear two ways: project_ref scopes the connection to one project, or a features list that leaves account out. Either is fine, and the project ref is the one to reach for first, because it also stops the server seeing your other projects.
The .mcp.json equivalent
A client JSON entry is a type and a URL, which is exactly what Claude Code's .mcp.json reads. The project id can ride in the URL as a query parameter:
{
"mcpServers": {
"supabase": {
"type": "http",
"url": "https://mcp.supabase.com/mcp?project_ref=${SUPABASE_PROJECT_REF}"
}
}
}Claude Code expands ${VAR} and ${VAR:-default} in a server's url, so a team can commit the file and keep the project id on each machine; each person sets SUPABASE_PROJECT_REF before starting Claude Code. The full URL form is fine too; both are read the same way.
For a headless setup — CI, an agent with no browser — Supabase's documented shape adds an access token header instead of OAuth, and says the token should be scoped to the project and granted only the permissions the enabled tools need:
{
"mcpServers": {
"supabase": {
"type": "http",
"url": "https://mcp.supabase.com/mcp?project_ref=${SUPABASE_PROJECT_REF}",
"headers": { "Authorization": "Bearer ${SUPABASE_ACCESS_TOKEN}" }
}
}
}Which scope to use
Local is the default: your configuration, this project only. Project scope writes .mcp.json at the repository root, and user scope makes it available in every project. The general rules for all three are in Add an MCP server to Claude Code; here is what changes for Supabase.
Supabase prints --scope project because its server is a project's server: a database belongs to a repository, and the project id in the URL is the same for everyone on the team. Each person still signs in as themselves, so committing the file shares the connection and not the credentials.
A project-scoped server is approved on first use, so a fresh clone shows it as pending until someone runs claude interactively and accepts it.
The auth step
Start Claude Code in a regular terminal rather than the IDE extension — Supabase's wording is "run claude /mcp" — then type the command inside the session:
/mcpA browser window opens, you sign in to Supabase, and you grant the client access to an organisation. Supabase is explicit that no personal access token is needed for this path.
The organisation you grant is what decides which projects exist for the session. Supabase's own setup notes say to choose the organisation that contains the project you want to work with, which is the first thing to check when the tool list looks healthy but no project appears.
For a machine with no browser, the same flow runs from a shell: claude mcp login supabase prints the authorisation URL instead of trying to open one.
Confirm it connected
claude mcp list
claude mcp get supabaseThe list prints a health status beside the name, such as ✔ Connected, ! Needs authentication or ✘ Failed to connect. claude mcp get supabase prints the entry's details, and on a failure an Issue: line with the status the server returned.
Inside a session, /mcp shows the server, its tool count and the menu where you re-authenticate. A zero tool count is the case the panel flags — the server advertises the tools capability and exposes none — so check the organisation you granted, then the URL's features list.
The first real check is a read. Ask Claude to list the tables in your public schema. That proves the connection, the project scope and the database permission in one call, and it changes nothing; Supabase still recommends connecting to production only when the task needs production evidence.
The failure people hit
One failure is a server that connects and then appears empty. Two settings cause it: the OAuth grant went to an organisation that does not hold the project, or the features list left out the group the tool belongs to. Check the organisation first, then the query string.
The second is a tool that is simply missing. Storage is off by default, account tools vanish under project_ref, feedback is disabled in read-only mode, and branching needs a paid plan — four documented reasons a tool is absent that have nothing to do with the connection.
The message each failure prints belongs to the MCP errors guide, and the add command's flags and scopes are covered in full in Add an MCP server to Claude Code.
Before you point it at production
Connecting an LLM to a database carries real risk, and Supabase documents the main one — prompt injection through content the agent reads — along with the mitigations: read-only mode, a narrow feature list, a project-scoped connection and a token scoped to the project when you use one. Its own rule is to connect to a production project only when the task needs production evidence.
The local stack is a separate case. With the Supabase CLI the server is at http://localhost:54321/mcp, and Supabase states that the CLI and self-hosted versions expose a limited subset of tools and no OAuth 2.1 — so a setup that works against the hosted URL can behave differently against a local one.
Sources
Every line on this page rests on one of these. The date beside each one is the day we read it.
- Supabase: MCP server, for the installation panel's Claude Code command, the
.mcp.jsonform, theclaude /mcpauthentication step, the URL parameter table, the tool groups, the security guidance and the local CLI endpoint. Read November 25, 2026. - supabase-community/supabase-mcp, for the endpoint, the organisation note, the JSON block and the local and self-hosted limitations. Read November 25, 2026.
- Anthropic: Connect Claude Code to tools via MCP, for the remote-server shape, the scope table and approval prompt, the health statuses,
${VAR}expansion in a URL,claude mcp loginand the OAuth flow. Read November 25, 2026.
Common questions
What is the command to add Supabase MCP to Claude Code?
claude mcp add --transport http supabase https://mcp.supabase.com/mcp is the short form. Supabase's own installation panel adds --scope project and a features query, and both write the same kind of entry.
Does Supabase MCP need an access token?
No. The hosted server signs you in with OAuth and Supabase states that you do not need a personal access token. A token is only needed for headless setups such as CI, where it goes in an Authorization header.
How do I limit Supabase MCP to one project?
Add project_ref to the URL, as in https://mcp.supabase.com/mcp?project_ref=abc123. Supabase documents that parameter as scoping the server to one project, and it also turns off the account-level tools.
How do I stop Claude changing my database?
Add read_only=true to the URL, which runs every query as a read-only Postgres user. Supabase's own guidance is to read its security best practices first and then cut the server down with read-only mode and a narrow feature list.
Why do I see no Supabase projects after signing in?
The OAuth step asks which organisation to grant, and the server can only reach projects in the one you chose. Re-authenticate from /mcp and pick the organisation that holds the project.
Every session, one window
Omniscio runs several agent sessions side by side in one window, each with its own context and its own diff view. Any model, any harness — Claude Code, Codex, OpenCode, Devin, Pi, and Hermes all supported.