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.

TL;DR
Add Supabase's hosted HTTP endpoint with the Claude CLI, then authenticate from the /mcp menu in a regular terminal.
Limit the URL to one project_ref, turn on read_only=true, and enable only the feature groups required for the task.
Verify the reviewed URL, connection status, selected organization, visible tools, and a known read-only metadata result before changing anything.
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
| Scope | Use it when | Configuration behavior | Review point |
|---|---|---|---|
| Project | The 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. |
| Local | Only this user and repository need the connection. | Keeps the definition outside the shared project file. | Useful for evaluation, but teammates cannot reproduce it automatically. |
| User | The 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. |
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.
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.
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.
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.
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.
| Check | Safe request | Expected evidence | Stop when |
|---|---|---|---|
| Identity | Run claude mcp get supabase. | The URL contains the intended project_ref. | The reference is missing or wrong. |
| Database | List schemas and tables only. | Names match the dashboard. | Sensitive or unknown schemas appear. |
| Permissions | Explain available MCP tools. | Only selected feature groups are present. | Unexpected mutation tools are enabled. |
Use a five-part acceptance test
- Definition:
claude mcp get supabaseshows HTTP transport, the intended scope, exact project reference, read-only flag, and chosen features. - Reachability: the server reaches an authentication state rather than failing to start or timing out.
- Authorization:
/mcpshows a connected Supabase server under the correct organization. - Tools: database and docs tools appear, while excluded groups and account tools do not.
- Result: a known table-list request matches the dashboard without executing SQL that changes data.
Fix failures in the same order
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.
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.
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.
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
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.
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.
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.
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.
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
Not for normal interactive use. The hosted server opens an OAuth browser flow. A PAT is mainly relevant to non-interactive CI authentication.
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.
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.
Storage is disabled by default, selected feature groups control visibility, and project_ref intentionally disables account-management tools.
It is still unsafe by default because readable data can be disclosed or contain prompt injection. Supabase recommends development and testing data instead.
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
