Layered, from most to least important:
- Schema doesn't need data. Generate types and a schema dump into the repo:
supabase gen types typescript --project-id <ref> > lib/database.types.ts. Claude reads the file; no connection needed. This solves 90% of the guessing. - If it must query: Supabase MCP with
--read-only(it runs queries as a read-only Postgres user) and--project-refso it's scoped to one project. - Better: point it at a dev project or local Supabase, never prod. Customer data (emails, addresses) shouldn't flow into a chat by default.
- Deny destructive commands anyway in
.claude/settings.json, e.g."deny": ["Bash(supabase db reset:*)", "Bash(psql:*)"].