Skip to content

MCP server

Supabase MCP server

Supabase's official hosted MCP server lets AI work with your Supabase projects: tables, SQL, migrations, edge functions, branches and docs.

At a glance

Maintained by
Supabase
Tools exposed
10 listed below
Reviewed
September 24, 2026

Why it matters

What it does and why it matters

Supabase gives many startups and product teams a Postgres database, authentication, storage and edge functions in one platform. Its official MCP server is hosted by Supabase and connects with your Supabase account through a browser sign-in. An assistant can list tables, run SQL, apply migrations, generate TypeScript types, deploy edge functions and search the Supabase docs.

For developers, that makes a coding assistant far more useful: it can check the real schema before writing code and create a branch to test a change.

Two settings make it safer. The read-only option runs queries as a read-only Postgres user, and the project option limits the server to a single project. We use both by default and keep write access for development branches, never for production data.

Use cases

Best business use cases

Schema-aware coding

Let a coding assistant read the real schema before writing queries.

Safe experiments

Create a branch to test a migration before it reaches production.

Type generation

Generate TypeScript types that match the database.

Data questions

Answer product questions from live data in read-only mode.

Docs lookup

Search Supabase documentation from the same assistant.

Tools

Available tools

Tool names as published by the maintainer at review time. Versions change, so check the repository for the current list.

Read and write: Read and write across database, functions, branches and projects; read_only=true runs queries as a read-only Postgres user and project_ref limits it to one project.

  • list_tables

    Lists tables in the chosen schemas.

  • execute_sql

    Runs raw SQL on the database.

  • apply_migration

    Applies a SQL migration and tracks it.

  • list_migrations

    Lists migrations in the project.

  • get_advisors

    Returns security and performance advisor notices.

  • generate_typescript_types

    Generates TypeScript types from the schema.

  • deploy_edge_function

    Deploys an Edge Function.

  • search_docs

    Searches the Supabase documentation.

  • list_projects

    Lists Supabase projects on the account.

  • create_branch

    Creates a development branch.

Workflows

Example workflows

Add a feature with a migration

  1. 1

    Connect the server scoped to the development project.

  2. 2

    Ask the assistant to propose a table for the new feature.

  3. 3

    It creates a branch and applies the migration there.

  4. 4

    It generates updated TypeScript types.

  5. 5

    A developer reviews and merges the change.

Product usage check

  1. 1

    Connect in read-only mode to the production project.

  2. 2

    Ask how many active users used a feature last week.

  3. 3

    The assistant writes and runs the SQL.

  4. 4

    It returns the count with the query shown.

  5. 5

    No data is changed.

Prompts

Example prompts

  • “List the tables in this project and describe how they relate.”

  • “Create a branch and add a table for customer feedback with a migration.”

  • “How many users logged in during the last seven days?”

Setup

Installation and configuration

Examples for Claude Desktop and Claude Code. Replace the placeholder values with your own keys, and store secrets outside version control.

Claude Desktop: claude_desktop_config.json

{
    "mcpServers": {
        "supabase": {
            "type": "http",
            "url": "https://mcp.supabase.com/mcp"
        }
    }
}

Claude Code: terminal

claude mcp add --scope project --transport http supabase "https://mcp.supabase.com/mcp"
  • Hosted server: https://mcp.supabase.com/mcp (OAuth). Optional query params: read_only=true, project_ref=<id>.
  • Local server: npm: @supabase/mcp-server-supabase (mainly for self-hosted setups).
  • Needs: Supabase account login via OAuth 2.1 (browser) for the hosted server; Personal access token for self-hosted or local setups.

Security

Security considerations

  • Read-only by default

    Turn on the read-only option for anything touching real data.

  • One project

    Scope the server to a single project.

  • Use branches

    Test migrations on a branch, not on production.

  • Not for production writes

    Keep write access to development projects only.

Related servers

Servers that pair well with it

PostgreSQL

Lets AI assistants explore a PostgreSQL database, run SQL in a restricted read-only mode and check query performance and database health.

GitHub

GitHub's official MCP server lets AI read repositories, search code, manage issues and pull requests and, when allowed, change files.

Vercel

Vercel's official MCP server lets AI search Vercel docs, list teams, projects and deployments, read build and runtime logs and deploy with confirmation.

Keep exploring

FAQ

Questions people ask us

Have a question that is not here? Ask us directly.

Start a project

Want this connected to your own systems? We build AI workflows with MCP.

Send a short brief. We reply with questions, a suggested plan and an estimate you can compare with other offers.

Your privacy choices

We use necessary storage to run this site. With your permission we also use Google Analytics to see which pages help people, and load maps from Google. You can change this at any time. Read the cookie policy.