Supabase MCP
Manage tables, queries, and migrations straight from Claude Code.
Manage tables, queries, and migrations straight from Claude Code.
What it is
The official Supabase MCP gives Claude direct access to your Supabase projects: inspect tables, run queries, write migrations, manage auth users. No more dashboard hopping between code and the SQL editor.
Install / Setup
You'll need a Supabase Personal Access Token (supabase.com/dashboard/account/tokens) and your project-ref.
Option 1 โ Terminal:
claude mcp add supabase --scope user -- npx -y @supabase/mcp-server-supabase@latest --read-only --project-ref=YOUR_PROJECT_REF
Export the token as an env var first: SUPABASE_ACCESS_TOKEN=sbp_xxx.
Option 2 โ Prompt Claude Code:
Install the official Supabase MCP server (@supabase/mcp-server-supabase) via claude mcp add in --read-only mode. Ask me for my Supabase Personal Access Token and project-ref, set the token as an env var, and check with /mcp that it's running.
Liking this?
Inside the community I show you how I run all of this day-to-day โ live sessions, direct feedback on your setup, and my full configs.
Use cases
- Schema changes โ "Add a
deleted_atfield to the users table" โ Claude writes and runs the migration. - Ad-hoc queries โ "How many signups did we get last week, per day?" โ SQL generated, run, result formatted.
- Seed data โ Claude inserts test users and sample rows straight into the DB.
- Debug RLS policies โ "Why can't user X see this row?" โ Claude reads the policies + data and walks the logic.
- Auth user management โ Create test accounts or find and kill junk users.
Pro tip
For production projects: ALWAYS use --read-only and a separate read-only token. Write access stays in local/staging projects only. One unlucky prompt and Claude drops real user data otherwise.
๐ Anyone can install MCPs. Knowing which combo actually moves the needle for your workflow โ that saves you weeks. Inside the community I share my full MCP stack. โ Join the Claude Code Mastery Community
Updated regularly โ follow @vine.codes for more.
Want more?