QVeris
MCP & TOOL CALLING

How to Add Supabase MCP to Claude Code

Register Supabase MCP in Claude Code, authenticate in the browser, and verify a scoped read-only request before approving development changes.

Published: April 6, 2026 · By the QVeris Team
Schema tables and a data grid linked to review, code and database icons.
The illustration connects table diagrams and a data grid with a review sheet, a code file and a database; user-permission icons sit below.

TL;DR

Fastest supported path

Add Supabase's hosted HTTP endpoint with the Claude CLI, then authenticate from the /mcp menu in a regular terminal.

Safe default

Limit the URL to one project_ref, turn on read_only=true, and enable only the feature groups required for the task.

First proof

Verify the reviewed URL, connection status, selected organization, visible tools, and a known read-only metadata result before changing anything.

Promotion gate

Remove read-only only for an isolated development branch after reviewing the proposed SQL, migration, rollback, and test plan.

This walkthrough follows the official hosted Supabase MCP path: prepare a non-production project, choose the Claude Code scope, generate a restricted URL, register the remote HTTP server, complete OAuth, approve the project configuration when required, and prove the connection with a harmless request. The finish line is not “the server appears”; it is evidence that Claude reached the intended project with only the intended tools.

Add Supabase MCP to Claude Code

Start from the current Supabase MCP guide, because its endpoint options and feature groups can change. Select the hosted platform, the intended development project, Claude Code, read-only mode, and only the features needed now. Copy the generated command instead of reconstructing a URL from memory.

Choose the Claude Code scope before running the command

ScopeUse it whenConfiguration behaviorReview point
ProjectThe repository should share one server definition with the team.Writes the definition to repository-level .mcp.json.Inspect and approve the file before commit; never include a token.
LocalOnly this user and repository need the connection.Keeps the definition outside the shared project file.Useful for evaluation, but teammates cannot reproduce it automatically.
UserThe same personal server should be available across many repositories.Makes the connection broadly available for that user.Avoid it when different repositories require different Supabase projects.
1. Confirm prerequisites and target

Update Claude Code, open the repository root, and copy the development project's reference from Supabase. Verify that the project contains no production or unredacted customer data. Decide whether the team needs project scope or whether local is safer for evaluation.

2. Generate a least-privilege URL

Select the project, enable read-only, and start with database,docs. The result should use https://mcp.supabase.com/mcp with project_ref, read_only=true, and a short features query. Project binding also removes account-management tools.

3. Add the hosted server

Run claude mcp add --scope project --transport http supabase "https://mcp.supabase.com/mcp?project_ref=YOUR_PROJECT_REF&read_only=true&features=database,docs". Replace the placeholder, and change only the scope if the earlier decision calls for local or user configuration.

4. Authenticate in the browser

Start Claude Code from a regular terminal, enter /mcp, choose supabase, and select Authenticate. Sign in to the organization that owns the selected project. Normal interactive use relies on OAuth and does not require a personal access token.

5. Approve and reload the project server

Project-scoped servers may require workspace trust and explicit approval because the definition comes from the repository. Review the URL before approving it. Reload the session if authorization succeeds but the selected tools have not appeared.

Do not paste credentials into the command. The project reference identifies a project but is not an authentication secret. OAuth credentials are handled separately. A personal access token is reserved for non-interactive cases and belongs in a secret manager, never in the repository URL.

Verify the server before changing data

Begin with: “List this project's tables and schemas; do not execute writes.” Compare the result with the Supabase dashboard before enabling mutations.

CheckSafe requestExpected evidenceStop when
IdentityRun claude mcp get supabase.The URL contains the intended project_ref.The reference is missing or wrong.
DatabaseList schemas and tables only.Names match the dashboard.Sensitive or unknown schemas appear.
PermissionsExplain available MCP tools.Only selected feature groups are present.Unexpected mutation tools are enabled.

Use a five-part acceptance test

  1. Definition: claude mcp get supabase shows HTTP transport, the intended scope, exact project reference, read-only flag, and chosen features.
  2. Reachability: the server reaches an authentication state rather than failing to start or timing out.
  3. Authorization: /mcp shows a connected Supabase server under the correct organization.
  4. Tools: database and docs tools appear, while excluded groups and account tools do not.
  5. Result: a known table-list request matches the dashboard without executing SQL that changes data.

Fix failures in the same order

Server is missing

Run the command from the intended repository, verify the scope and server name, inspect .mcp.json for project scope, and reload Claude Code. A configuration created elsewhere will not automatically apply here.

Server is present but disconnected

Confirm the URL host and transport, check proxy or firewall restrictions, then repeat authentication from a regular terminal. Do not replace OAuth with a pasted token merely to bypass a browser problem.

Connected but tools are missing

Inspect the features parameter. Storage is disabled by default, project-scoped mode excludes account management, and a client may need a reload after authorization or configuration changes.

Tools work but results are unexpected

Recheck the project reference, selected organization, database branch, schema, and account permissions. Stop if unfamiliar schemas or sensitive data appear; do not “test” by writing a marker row.

Apply least privilege and resist prompt injection

Keep project and feature scope narrow

A URL without project_ref may expose every project the authenticated account can access, while project-scoped mode disables account-management tools. Add features=database,docs or an even smaller list instead of enabling every group by default.

Use read-only mode first

read_only=true runs database queries as a read-only Postgres user. Supabase also advises using this MCP server for development and testing, not production data.

Keep tool approval enabled

Database content can contain prompt-injection instructions. Review every tool call and SQL statement before approval; Supabase's protective wrapping reduces risk but is not foolproof.

Understand what read-only does not solve

Read-only prevents database mutation through its restricted role, but it cannot stop sensitive rows from entering model context or output. Use development data, minimize schemas and feature groups, and keep customer or authentication records out of the test project.

Promote changes through review

When writes are eventually required, first ask for a migration plan, generated SQL, affected objects, rollback, and tests. Apply approved work to an isolated branch, run database advisors, inspect the diff, and merge through the team's normal process.

Use QVeris beyond the Supabase project boundary

Supabase MCP connects Claude Code to one backend platform. A live search found no exact Supabase result in the QVeris Tool or Provider directory, so use QVeris Docs and the Playground for complementary capability discovery rather than assuming a direct Supabase integration.

  • Keep database inspection and mutation inside the official Supabase MCP boundary.
  • For a separate external task, discover a current QVeris capability and inspect its provider, schema, constraints, and cost before calling it.
  • Validate any external result before writing it to Supabase, with human approval at the cross-system boundary.

FAQ

Does Supabase MCP require a PAT?

Not for normal interactive use. The hosted server opens an OAuth browser flow. A PAT is mainly relevant to non-interactive CI authentication.

Which scope should I choose?

Use project when the repository should share a reviewed definition, local for one user in one repository, and user only when the same personal connection truly belongs across projects.

Why is approval pending?

Project MCP definitions come from repository files. Open Claude Code in that repository, review the URL, trust the workspace when appropriate, and approve the server.

Why are storage or account tools absent?

Storage is disabled by default, selected feature groups control visibility, and project_ref intentionally disables account-management tools.

Can I connect a production project in read-only mode?

It is still unsafe by default because readable data can be disclosed or contain prompt injection. Supabase recommends development and testing data instead.

How do I remove or replace the server?

Inspect it with claude mcp get supabase, remove it with the current Claude MCP command, then add the corrected definition and repeat every verification step.

References and next steps

Supabase MCP guide
Supabase MCP repository
Claude Code MCP documentation