Supabase MCP Server: Connect Safely in Five Minutes

The Supabase MCP server lets an AI coding assistant read your tables, run SQL, check logs and deploy functions through one link: https://mcp.supabase.com/mcp. Add ?read_only=true so queries cannot change data and ?project_ref= so it can reach only one project, and keep approving each tool call by hand.

URL options documented by Supabase
OptionWhat it does
read_only=trueRuns every query as a read-only Postgres user
project_ref=<id>Limits access to one project and turns off account tools
features=database,docsTurns on only the listed tool groups; storage is off by default
Local URLhttp://localhost:54321/mcp when the CLI stack is running

Updated

MCP, the Model Context Protocol, is a standard way for an AI app to call outside tools. Build your connection link below: choose a project, read-only mode and the tool groups, then copy the config. Nothing leaves your browser.

Connection builder

Project reference ID (optional, but recommended)

Read-only mode

Tool groups: docs, account, database, debugging, development, functions, branching, storage, notebooks

Server link

https://mcp.supabase.com/mcp?read_only=true&features=docs,database,debugging,development,functions

Config JSON (for example .cursor/mcp.json)

{
  "mcpServers": {
    "supabase": {
      "url": "https://mcp.supabase.com/mcp?read_only=true&features=docs,database,debugging,development,functions"
    }
  }
}

A safe starting config

Scoped to one project, read-only, with only the database and docs tools. Swap in your own reference ID.

Scoped, read-only connection

Most clients read an mcpServers object like this one; the file name depends on the client.

{
  "mcpServers": {
    "supabase": {
      "url": "https://mcp.supabase.com/mcp?project_ref=<project-ref>&read_only=true&features=database,docs"
    }
  }
}

What each tool group covers

database: list_tables, list_extensions, list_migrations, apply_migration and execute_sql. debugging: query_logs and get_advisors. development: get_project_url, get_publishable_keys and generate_typescript_types.

functions covers listing, reading and deploying Edge Functions plus setting their secrets. docs has search_docs. account holds project and organisation tools, including create_project and pause_project, and is turned off when you scope to one project.

How it works

  1. Find your project reference ID in the project's settings in the Supabase dashboard.
  2. Build the link with the options you want and paste the JSON into your MCP client's settings file.
  3. On first use the client opens a browser window: sign in to Supabase, pick the organisation and allow access.
  4. For CI or a machine with no browser, create a scoped personal access token and send it as an Authorization: Bearer header.

Tips

Frequently asked questions

What can the Supabase MCP server do?

Its documented tools list tables and migrations, apply migrations, run SQL, query logs, read security and performance advisors, generate TypeScript types, manage Edge Functions, search the docs and, unless scoped, manage projects.

Is read-only mode safe enough?

It stops writes because queries run as a read-only database user, but the assistant can still read whatever that user can read. Pair it with project_ref and keep personal data out of what you ask.

Do I need an access token?

Not with the hosted server's default sign-in, which uses a browser login. A personal access token is only needed for CI or headless setups, and not every client supports custom headers.

Which feature groups exist?

The server code lists docs, account, database, debugging, development, functions, branching, storage and notebooks. Supabase's docs say every group except storage is on by default.

Can my site's visitors use it?

No. It runs with your developer permissions, so Supabase recommends keeping it as an internal tool rather than something end users reach.

Related: What is an MCP server, Build an MCP server, Supabase CLI, Supabase Auth guide.

Start for free or see all free tools. We.Inc is free to start, with no card needed. AI building is on paid plans from $20 a month.

More in Guides

We.Inc is an AI-powered website builder you can resell under your own brand. Launch a branded client dashboard, bill on Stripe Connect, and deliver AI-generated websites in minutes. White-label plans start at $99 a month for 25 client sites, with a 7-day free trial and no per-site fees.

Product

Who It's For

Features

Resources

Company

View Sitemap