# Supabase — MCP Server

> Manage Supabase projects, run SQL and inspect schemas with AI.

**Source:** https://mcpplaygroundonline.com/mcp-servers/supabase  
**Transport:** http  
**Requires auth:** Yes

---

## What it does

The Supabase MCP server wraps the Supabase Management API and the Postgres connection of the project you scope it to. Models can list projects and branches, run read or write SQL against your database, describe schemas and policies, generate and apply migrations, fetch logs from any service (auth, db, storage, functions), and (with the right scopes) deploy or update Edge Functions. It is a one-stop surface for any "build with Supabase" AI workflow.

## Tools exposed

- list_projects / get_project — manage your Supabase projects
- execute_sql — run SQL against the project's Postgres database
- list_tables / describe_table — schema inspection
- apply_migration — run a SQL migration on the project
- get_logs — read logs from auth, db, storage or functions
- list_edge_functions / deploy_edge_function — manage functions

## Example queries you can run

- "List my Supabase projects and tell me which one was last used."
- "Show me the schema of the public.users table and any RLS policies on it."
- "Generate and apply a migration that adds a stripe_customer_id column to public.users."
- "Fetch the last hour of auth logs and summarise any failed login patterns."

## Details

- **Recommended model:** anthropic/claude-sonnet-4.5 — Claude Sonnet 4.5 is best at multi-step build workflows (schema → migration → query). Haiku 4.5 is faster and cheaper for read-only schema exploration.
- **Transport:** http
- **Authentication:** Required — Supabase personal access token (app.supabase.com → Account → Access Tokens). Append ?project_ref=<your-ref> to the URL to scope to one project.
- **Hosted endpoint:** https://mcp.supabase.com/mcp
- **Official source:** [Supabase MCP docs](https://supabase.com/docs/guides/getting-started/mcp)

## Frequently asked questions

### What is the Supabase MCP server?

It is an official MCP server hosted by Supabase at mcp.supabase.com/mcp. It wraps the Supabase Management API and Postgres connection so AI models can manage projects, run SQL, apply migrations and read logs through a single set of tools.

### How do I scope the Supabase MCP server to one project?

Append ?project_ref=<your-project-ref> to the MCP URL. The server then only operates against that project — useful when an agent should not be able to touch your other Supabase environments.

### Can the Supabase MCP server run write SQL or migrations?

Yes — it can run write SQL and apply migrations if your access token has those scopes. For exploration we recommend pointing it at a development branch first; Supabase branching makes it cheap to give an agent a throwaway project.

### How is Supabase MCP different from a generic Postgres MCP?

Generic Postgres MCP (e.g. crystaldba/postgres-mcp) only knows about SQL. The Supabase server adds project management, RLS policy inspection, log streaming and Edge Functions — the full Supabase platform, not just the database.

### Does the Supabase MCP server work with Claude, Cursor and ChatGPT?

Yes. Any MCP-compatible client works — Claude Desktop, Cursor, Cline, and browser-based tools like MCP Agent Studio. Paste the URL and your personal access token into the client.

---

_Test this server across 40+ models on MCP Playground: https://mcpplaygroundonline.com/mcp-servers/supabase — free, no install._
