Supabase MCP Server

Official

Manage your whole Supabase project in conversation — database, auth, storage, Edge Functions and branches.

Local + remotestdiostreamable-httpTypeScriptApache-2.0 2.2k

What is the Supabase MCP server?

Supabase's MCP server is broader than a database connector because Supabase is broader than a database. Alongside SQL access to your Postgres instance, it manages the platform around it: listing and creating projects, applying migrations, generating TypeScript types from your schema, deploying Edge Functions, checking logs and driving database branching for safe experimentation.

That makes it feel less like "chat with my database" and more like a conversational Supabase CLI. A representative session: describe a new feature, have the assistant design the tables, apply the migration to a branch database, generate the TypeScript types for your frontend, and only merge to production once you've reviewed it. The branching support is the standout — schema changes from an LLM are exactly the kind of thing you want isolated somewhere disposable first.

Setup is refreshingly modern: it runs as a remote server with OAuth, so most clients connect with a URL and an in-browser approval instead of copying access tokens around. Scoping flags matter here too — --read-only restricts SQL to reads, and --project-ref pins the server to a single project so an assistant can't wander across your whole account.

One habit worth adopting: Supabase's own docs recommend against pointing this at production with full permissions, and they're right. Use read-only mode for prod questions, do write-work on branches, and treat the merge step as your human review gate. Used that way it collapses a lot of dashboard-clicking into plain language.

Guardrails that pay off

  • get_advisors is the quietly essential tool: it flags tables exposed through PostgREST with row-level security missing or misconfigured, which is the most common way a Supabase project leaks data it shouldn't.
  • Regenerate types after every migration. generate_typescript_types reads the live schema, so a stale types file in your repo is the usual reason the frontend and the database start disagreeing.
  • Branches are billed while they exist, so delete them once merged instead of accumulating one per abandoned experiment.
  • The remote URL accepts a features query parameter that narrows which tool groups load — pinning it to database and docs is a clean way to ensure nothing ever deploys an Edge Function on your behalf.

What you can do with it

Schema work on branches

Design tables, apply migrations to a branch, review, then merge — LLM-driven schema changes with a safety net.

Full-stack scaffolding

Create the tables and generate the matching TypeScript types in one conversation.

Project debugging

Pull Edge Function logs and database advisories while diagnosing an issue, without touching the dashboard.

Available tools

ToolWhat it does
list_projects / get_projectEnumerate and inspect Supabase projects
execute_sqlRun SQL against the project database
apply_migrationApply a named schema migration
create_branch / merge_branchCreate and merge database branches for safe schema work
generate_typescript_typesGenerate TS types from the current schema
deploy_edge_functionDeploy a Supabase Edge Function
get_logsFetch recent logs by service (API, Postgres, Edge Functions)
get_advisorsSecurity and performance advisories for the project

How to install the Supabase MCP server

claude mcp add --transport http supabase https://mcp.supabase.com/mcp

A browser window opens to authorise access to your Supabase account.

Configuration

A Supabase account. Remote mode needs only OAuth approval; local mode needs Node.js 18+ and a personal access token.

VariableDescriptionRequired
SUPABASE_ACCESS_TOKENPersonal access token (local mode only; remote mode uses OAuth)e.g. sbp_...Optional

Example prompts to try

  • Create a branch, add a comments table with RLS policies, and show me the migration before merging.
  • Generate TypeScript types for the current schema and list what changed since last week.
  • Check the logs for the auth service — why are signups failing?

Frequently asked questions

With --read-only, it's reasonable for querying and debugging. For schema changes, use database branches and merge after review — Supabase themselves advise against giving an assistant full write access to prod.