---
title: "Supabase MCP Server: Connect Claude or Cursor to Supabase"
url: "https://mcpshelf.co/servers/supabase"
description: "Supabase's MCP server manages projects, runs SQL, applies migrations, reads logs and deploys Edge Functions. The hosted URL, sign-in and read-only scoping."
updated: "2026-10-27"
site: "MCP Shelf"
---

# Supabase

> Manage Supabase projects, tables, migrations, logs and Edge Functions.

Source: https://mcpshelf.co/servers/supabase  
Markdown: https://mcpshelf.co/servers/supabase.md  
Generated: 2026-11-22T21:06:56.003Z

## Facts

- **Name:** Supabase
- **Tagline:** Manage Supabase projects, tables, migrations, logs and Edge Functions.
- **Description:** The Supabase MCP server is Supabase's official hosted MCP server, letting AI assistants manage Supabase projects: run SQL, apply migrations, create branches, deploy edge functions and search the docs.
- **Repository:** https://github.com/supabase-community/supabase-mcp
- **Install:** `claude mcp add --scope project --transport http supabase "https://mcp.supabase.com/mcp?project_ref=YOUR_PROJECT_REF&read_only=true"`
- **Server URL:** https://mcp.supabase.com/mcp
- **Transport:** Streamable HTTP (remote)
- **Auth:** Needs `https://mcp.supabase.com/mcp`
- **Tools exposed:** 29: `list_organizations`, `get_organization`, `list_projects`, `get_project`, `get_cost`, `confirm_cost`, `create_project`, `pause_project`, `restore_project`, `list_tables`, `list_extensions`, `list_migrations`, `apply_migration`, `execute_sql`, `query_logs`, `get_advisors`, `get_project_url`, `get_publishable_keys`, `generate_typescript_types`, `list_edge_functions`, `get_edge_function`, `deploy_edge_function`, `create_branch`, `list_branches`, `delete_branch`, `merge_branch`, `reset_branch`, `rebase_branch`, `search_docs`
- **Category:** Databases and data (https://mcpshelf.co/categories/databases)
- **Stats:** 3K GitHub stars, last commit 28 Oct 2026, 0 upvotes on MCP Shelf
- **Install check:** Needs your setup first
- **Listed:** 2026-10-26
- **Page updated:** 2026-10-27

## Full description

### What is Supabase?

**The Supabase MCP server is Supabase's official hosted MCP server, letting AI assistants manage Supabase projects: run SQL, apply migrations, create branches, deploy edge functions and search the docs.**

Supabase maintains this server. It covers the whole project, not just the database: list and create projects, run SQL, apply migrations, read logs, generate TypeScript types and deploy Edge Functions.

The easiest setup is the hosted server, which signs you in with your Supabase account in the browser. You can scope it to one project and to read-only from the URL.

|  |  |
| --- | --- |
| Made by | Supabase |
| GitHub | https://github.com/supabase-community/supabase-mcp |
| Licence | Apache-2.0 |
| GitHub stars | 3K |
| Last commit | 28 Oct 2026 |
| Tools | 29 |
| Runs on | Hosted |
| Install check | Needs your setup first |
| Category | [Databases and data](https://mcpshelf.co/categories/databases) |
| Works with | Claude Code, Cursor, Claude Desktop, VS Code, Codex, Windsurf, ChatGPT |
| Setup checked | 27 Oct 2026 |
| Page updated | 27 Oct 2026 |

**Our check:** It needs something our Linux test machine does not have (an account, a desktop app, a Mac or a running service), so on 26 Oct 2026 we listed its tools from its package instead of running this config. The npm package called "supabase-mcp" comes from a different repository (Cappahccino/SB-MCP). Supabase's own server is the hosted URL above; their local package is @supabase/mcp-server-supabase.

#### Try asking Supabase

- "List the tables in my Supabase project and the row-level security on each."
- "Create a migration that adds a profiles table linked to auth.users."
- "Show me the last hour of API errors from the logs."

#### MCP Shelf take

> Supabase needs something our Linux test machine does not have (an account, an app or a service), so on 26 Oct 2026 we ran its package and counted 29 tools. 18 of the 29 only read; the other 11 can change things. 28 of 29 come with a useful description, all of them say whether they change things, and the tool list costs about 2,200 tokens of context before you ask a thing. Other directories point at a package with the same name that belongs to someone else; the config on this page installs the real one. It sits 5th of 10 in its category on our shelf by GitHub stars (3K).

— MCP Shelf tests (numbers from our own runs), tested on 26 Oct 2026

### What tools does Supabase have?

We listed 29 tools on 26 Oct 2026. 18 only read; the rest can change things or run commands.

| Tool | Kind | What it is for |
| --- | --- | --- |
| `list_organizations` | reads | Lists the organisations your account belongs to. |
| `get_organization` | reads | Shows one organisation's details and plan. |
| `list_projects` | reads | Lists every project you can reach. |
| `get_project` | reads | Shows one project's details, region and status. |
| `get_cost` | reads | Tells you what a new project or branch would cost before you make it. |
| `confirm_cost` | reads | Asks you to accept the price before a new project or branch is created. |
| `create_project` | changes | Starts a new Supabase project in the organisation and region you choose. |
| `pause_project` | changes | Pauses a project so it stops running. |
| `restore_project` | changes | Wakes a paused project up again. |
| `list_tables` | reads | Lists tables in the chosen schemas, with their columns. |
| `list_extensions` | reads | Shows which Postgres extensions are installed. |
| `list_migrations` | reads | Lists the migrations already applied to the database. |
| `apply_migration` | changes | Runs a schema change as a named migration so it is tracked like any other. |
| `execute_sql` | runs | Runs a SQL query against the project's Postgres database and returns the rows. |
| `query_logs` | reads | Pulls recent logs for the API, Postgres, auth, storage or functions to help debug. |
| `get_advisors` | reads | Lists security and performance warnings, such as tables missing row level security. |
| `get_project_url` | reads | Returns the API URL your app uses to reach the project. |
| `get_publishable_keys` | reads | Returns the public keys a front end needs to talk to the project. |
| `generate_typescript_types` | reads | Builds TypeScript types from the current database schema. |
| `list_edge_functions` | reads | Lists the Edge Functions deployed in a project. |
| `get_edge_function` | reads | Fetches the source of one deployed Edge Function. |
| `deploy_edge_function` | changes | Uploads and deploys an Edge Function from code the agent wrote. |
| `create_branch` | changes | Spins up a development branch of a project to try changes safely. |
| `list_branches` | reads | Lists a project's development branches and their state. |
| `delete_branch` | changes | Removes a development branch you no longer need. |
| `merge_branch` | changes | Merges a branch's migrations and functions back into production. |
| `reset_branch` | changes | Rolls a branch's migrations back to an earlier version. |
| `rebase_branch` | changes | Brings a branch up to date with migrations added to production since it was made. |
| `search_docs` | reads | Searches Supabase's documentation for an up-to-date answer. |

#### How clearly it describes its tools

28 of 29 tools have a description and 29 of 29 say whether they change things. The tool list takes at least ~2,200 tokens of context. Every tool says whether it only reads or can change things, so a client can ask before the risky ones.

### How do I install Supabase?

#### Install steps from the Supabase README

Copied from the project's [README on GitHub](https://github.com/supabase-community/supabase-mcp#readme) on 27 Oct 2026 under its Apache-2.0 licence.

##### Setup

###### 1. Follow our security best practices

Before setting up the MCP server, we recommend you read our [security best practices](https://supabase.com/docs/guides/ai-tools/mcp#security-risks) to understand the risks of connecting an LLM to your Supabase projects and how to mitigate them.

###### 2. Configure your MCP client

To configure the Supabase MCP server on your client, visit our [setup documentation](https://supabase.com/docs/guides/getting-started/mcp#step-2-configure-your-ai-tool). You can also generate a custom MCP URL for your project by visiting the [MCP connection tab](https://supabase.com/dashboard/project/_?showConnect=true&connectTab=mcp) in the Supabase dashboard.

Your MCP client will automatically prompt you to log in to Supabase during setup. Be sure to choose the organization that contains the project you wish to work with.

Most MCP clients require the following information:

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

If you don't see your MCP client listed in our documentation, check your client's MCP documentation and copy the above MCP information into their expected format (json, yaml, etc).

###### CLI

If you're running Supabase locally with [Supabase CLI](https://supabase.com/docs/guides/local-development/cli/getting-started), you can access the MCP server at `http://localhost:54321/mcp`. Currently, the MCP Server in CLI environments offers a limited subset of tools and no OAuth 2.1.

###### Self-hosted

For [self-hosted Supabase](https://supabase.com/docs/guides/self-hosting/docker), check the [Enabling MCP server](https://supabase.com/docs/guides/self-hosting/enable-mcp) page. Currently, the MCP Server in self-hosted environments offers a limited subset of tools and no OAuth 2.1.

##### Configuration options and tools

See the [Supabase MCP Server](https://supabase.com/mcp) docs for the full list of [available tools](https://supabase.com/mcp#available-tools) and [configuration options](https://supabase.com/mcp#configuration-options).

The docs also feature an interactive URL builder to populate configuration options for you.

##### Usage with AI SDK's MCP Client

The `@supabase/mcp-server-supabase` package exports `createToolSchemas()` to populate input and output schemas for Vercel AI SDK's [MCP client](https://ai-sdk.dev/docs/ai-sdk-core/mcp-tools). This allows Supabase MCP tools to be treated as static tools with client-side validation and inferred TypeScript types for their inputs and outputs.

```
import { createToolSchemas } from '@supabase/mcp-server-supabase';
import { createMCPClient } from '@ai-sdk/mcp';
import { streamText } from 'ai';

const mcpClient = await createMCPClient({
  transport: {
    type: 'http',
    url: 'https://mcp.supabase.com/mcp',
  },
});

const tools = await mcpClient.tools({
  schemas: createToolSchemas(),
});

const result = streamText({ model, tools, prompt: '...' });

for (const step of await result.steps) {
  for (const toolResult of step.staticToolResults) {
    if (toolResult.toolName === 'get_project_url') {
      toolResult.input;  // { project_id: string }
      toolResult.output; // { url: string }
    }
  }
}
```

`createToolSchemas()` accepts similar filtering options as the MCP server's URL parameters:

- `features`: Restrict to specific [feature groups](https://supabase.com/mcp#configuration-options) (e.g. `['database', 'docs']`). Defaults to all default feature groups.
- `projectScoped`: When `true`, omits `project_id` from tool input schemas and excludes account-level tools — use when connecting to a server configured with `project_ref`. Defaults to `false`.
- `readOnly`: When `true`, excludes mutating tools — use when connecting to a server configured with `read_only=true`. Defaults to `false`.

```
const mcpClient = await createMCPClient({
  transport: {
    type: 'http',
    url: 'https://mcp.supabase.com/mcp?project_ref=<project-ref>&read_only=true&features=database,docs',
  },
});

const tools = await mcpClient.tools({
  schemas: createToolSchemas({
    features: ['database', 'docs'],
    projectScoped: true,
    readOnly: true,
  }),
});
```

> **Note:** This server does not send `structuredContent` in MCP tool results. AI SDK falls back to parsing JSON from `content` text.

For more information, see [Schema Definition](https://ai-sdk.dev/docs/ai-sdk-core/mcp-tools#schema-definition) and [Typed Tool Outputs](https://ai-sdk.dev/docs/ai-sdk-core/mcp-tools#typed-tool-outputs) in the AI SDK docs.

#### What you need first

- A Supabase account

#### Claude Code

Where: Your terminal, in the project folder

```bash
claude mcp add --scope project --transport http supabase "https://mcp.supabase.com/mcp?project_ref=YOUR_PROJECT_REF&read_only=true"
```

Then sign in from a normal terminal: run claude /mcp, pick supabase and choose Authenticate, and select the organisation that owns the project. Drop read_only=true only on a development project.

#### Cursor

Where: ~/.cursor/mcp.json, or .cursor/mcp.json in a project

```json
{
  "mcpServers": {
    "supabase": {
      "url": "https://mcp.supabase.com/mcp"
    }
  }
}
```

Cursor signs you in to Supabase in the browser. Check the connection under Settings → Cursor Settings → Tools & MCP, and restart Cursor if tools are missing.

#### Claude Desktop

Where: Customize → Connectors → add a custom connector

```
https://mcp.supabase.com/mcp
```

Paste the URL and sign in if asked. Custom connectors depend on your plan.

#### VS Code

Where: .vscode/mcp.json in your project

```json
{
  "servers": {
    "supabase": {
      "type": "http",
      "url": "https://mcp.supabase.com/mcp"
    }
  }
}
```

#### Codex

Where: ~/.codex/config.toml, shared by the Codex CLI, IDE extension and ChatGPT desktop app

```
[mcp_servers.supabase]
url = "https://mcp.supabase.com/mcp"
```

Or run: `codex mcp add supabase --url https://mcp.supabase.com/mcp`, then `codex mcp login supabase` if it asks you to sign in.

#### Windsurf

Where: ~/.codeium/windsurf/mcp_config.json

```json
{
  "mcpServers": {
    "supabase": {
      "serverUrl": "https://mcp.supabase.com/mcp"
    }
  }
}
```

#### ChatGPT

Where: chatgpt.com/plugins → + → Add custom MCP server

```
https://mcp.supabase.com/mcp
```

Paste the URL as the server address, choose OAuth if it asks you to sign in, create it as a plugin, then install it before using it in a chat. Workspace admins can block custom servers.

Add ?project_ref=your-project-ref&read_only=true to the URL to lock it to one project and to read-only queries.

Checked against the project's own install docs on 27 Oct 2026: https://github.com/supabase-community/supabase-mcp#readme, https://supabase.com/docs/guides/getting-started/mcp

### How do I configure Supabase?

| Setting | Kind | Required | What it does |
| --- | --- | --- | --- |
| `https://mcp.supabase.com/mcp` | config | yes | The hosted server address. Your client opens a Supabase sign-in the first time you connect. |
| `project_ref` | config | no | Add to the URL to lock the agent to one project. Account-wide tools such as creating projects disappear. Example: `?project_ref=abcdefghijklmnop` |
| `read_only` | config | no | Add read_only=true to the URL and every tool that changes data is left out. Example: `&read_only=true` |
| `features` | config | no | Comma-separated tool groups to switch on: account, database, debugging, development, docs, functions, branching, storage. Example: `&features=database,docs` |
| `http://localhost:54321/mcp` | config | no | Address of the smaller tool set served by a local stack started with the Supabase CLI. |

### What can Supabase read and change?

**It can read**

- Projects, organisations, schemas, logs and advisor reports for the account you sign in with
- Supabase's public docs

**It can change**

- Database rows and schema through SQL and migrations
- Projects and branches, which can add to your bill
- Deployed Edge Functions

**Safer setup:** Use a development project, not production, and add project_ref plus read_only=true to the URL. Supabase also advises keeping manual approval of each tool call switched on in your client.

### Good for

- Building a Supabase app with Cursor or Claude Code
- Checking logs and advisories when something breaks
- Writing and applying migrations

### Supabase not working? Common fixes

**The agent works on the wrong project**
Add ?project_ref=<your project ref> to the server URL so it can only see that one.

**Sign-in picks the wrong organisation**
Disconnect and reconnect, then choose the organisation that owns the project on the Supabase consent screen.

**Tools are missing on a local or self-hosted stack**
The CLI and self-hosted servers only offer a subset of tools. Account and branching tools need the hosted URL.

**An old client cannot connect**
The server only speaks the current MCP protocol. Update your client to a recent version.

### What are the alternatives to Supabase?

| Server | What it does | Tools | Runs on | Licence | Stars |
| --- | --- | --- | --- | --- | --- |
| [Supabase](https://mcpshelf.co/servers/supabase) | Manage Supabase projects, tables, migrations, logs and Edge Functions. | 29 | Hosted | Apache-2.0 | 3K |
| [MCP Toolbox for Databases](https://mcpshelf.co/servers/mcp-toolbox-for-databases) | Google's toolbox for Postgres, MySQL, BigQuery, Spanner and other databases. | 29 | Your computer | Apache-2.0 | 16.7K |
| [Qdrant](https://mcpshelf.co/servers/qdrant) | Store notes and find them by meaning in a Qdrant vector collection. | 2 | Your computer | Apache-2.0 | 1.6K |
| [Excel MCP Server](https://mcpshelf.co/servers/excel) | Create, edit, format and chart .xlsx files, no Excel needed. | 46 | Your computer | MIT | 4.3K |
| [DBHub](https://mcpshelf.co/servers/dbhub) | One small server for Postgres, MySQL, MariaDB, SQL Server, Oracle and SQLite. | 2 | Your computer | MIT | 3.7K |
| [MongoDB MCP Server](https://mcpshelf.co/servers/mongodb) | Query, inspect and manage MongoDB databases and Atlas clusters, read-only if you like. | 20 | Your computer | Apache-2.0 | 1.2K |

### Supabase FAQ

#### How do I add the Supabase MCP server to Claude Code?

Run claude mcp add --scope project --transport http supabase with the URL https://mcp.supabase.com/mcp plus ?project_ref=YOUR_PROJECT_REF&read_only=true, then authenticate from a normal terminal with claude /mcp. The dashboard's MCP connection tab builds the URL for you.

#### Do I need a Supabase access token for MCP?

Not for the hosted server. Your client signs in to Supabase with OAuth in the browser; just pick the organisation that contains the project you want. Local CLI and self-hosted stacks have no OAuth and offer fewer tools.

#### Is it safe to connect the Supabase MCP server to production?

Supabase itself advises against it. Data returned by a query could carry instructions that trick the model, so use a development project, add read_only=true to run as a read-only Postgres user, scope it with project_ref and keep approving each tool call.

#### Is the Supabase MCP server free?

The server is free and Apache 2.0 licensed. Some actions, such as creating projects or branches, can add charges to your Supabase bill, so it shows the cost and asks you to confirm before doing them.

#### Does the Supabase MCP server work with ChatGPT?

It is a hosted server that signs in with OAuth, so you can add https://mcp.supabase.com/mcp as a custom MCP server on chatgpt.com/plugins. Supabase's own guides focus on coding tools such as Claude Code and Cursor.

#### What does project_ref do?

It limits the server to one project and turns off the account-level tools, so the assistant cannot list or touch your other projects. Without it, every project in the organisation you sign in with is reachable.

#### Can I use the Supabase MCP server with a local Supabase stack?

Yes. The Supabase CLI serves it at http://localhost:54321/mcp while your local stack runs. It offers a smaller set of tools and no OAuth, which is fine for local development.

#### Supabase MCP or Postgres MCP Pro?

Pick Supabase's server to manage a Supabase project end to end: SQL, migrations, branches, edge functions and logs. Pick Postgres MCP Pro to tune any Postgres database, with index advice and health checks.

#### How do I add Supabase to Cursor?

In ~/.cursor/mcp.json, or .cursor/mcp.json for one project, add an entry named supabase with the URL https://mcp.supabase.com/mcp. Cursor signs you in to Supabase in the browser. Check the connection under Settings → Cursor Settings → Tools & MCP, and restart Cursor if tools are missing.

#### Can I use Supabase in VS Code?

Yes, through GitHub Copilot. In .vscode/mcp.json, add a server named supabase with type http and the URL https://mcp.supabase.com/mcp. Then switch Copilot Chat to Agent mode to use its tools.

#### Does Supabase work with Codex?

Yes. Run codex mcp add supabase --url https://mcp.supabase.com/mcp in a terminal, or add an [mcp_servers.supabase] table to ~/.codex/config.toml, which the Codex CLI and IDE extension share. Then codex mcp login supabase if it asks you to sign in.

Full docs on GitHub: https://github.com/supabase-community/supabase-mcp

## Notes for agents

Fetch these instead of parsing the HTML page:

- llms.txt: https://mcpshelf.co/llms.txt
- llms-full.txt: https://mcpshelf.co/llms-full.txt
- ai.txt: https://mcpshelf.co/ai.txt
- Full catalog (.md): https://mcpshelf.co/catalog.md
- API spec: https://mcpshelf.co/openapi.json
- MCP server: https://mcpshelf.co/mcp
- MCP manifest: https://mcpshelf.co/.well-known/mcp.json
- Developer docs: https://mcpshelf.co/developers

MCP endpoint (Streamable HTTP, no key): https://mcpshelf.co/mcp. REST API: https://mcpshelf.co/api/v1.

