# Supabase

<div style={{maxWidth: '720px'}}>
![The Supabase connector in Workspace Settings, for projects, branches, Edge Functions, and SQL, with a Connect button](</docs/_next/static/media/supabase-connector.1aif6pdnd1x25.jpg>)
</div>

The [Supabase MCP server](https://supabase.com/docs/guides/ai-tools/mcp) lets agents query your databases, apply migrations, and check logs.

For use cases and example prompts, see [Supabase for AI coding agents](/integrations/supabase).

## What is Supabase? [#what-is-supabase]

[Supabase](https://supabase.com) is a Postgres development platform with auth, storage, Edge Functions, and realtime built in.

## What agents can do [#what-agents-can-do]

Once you connect Supabase, agents can:

- List, create, pause, and restore projects
- Run SQL, list tables and extensions, and apply migrations
- Read logs, and run security and performance advisors
- Generate TypeScript types, and look up a project's URL and publishable keys
- Deploy Edge Functions and create development branches
- Create, run, and delete saved notebooks
- Search the Supabase docs

Agents can only do what the connected Supabase account or token can do.

<Callout>
Agents can run any SQL and delete notebooks without asking first. To limit them, connect an access token scoped to the projects and permissions you want, such as a read-only token for production.
</Callout>

## Setup [#setup]

Go to **Workspace Settings → Connectors** (or a project's **Connectors** page) and click **Connect** on the Supabase card (or **Connect another** to add another account).

### Step 1: who the connection is for [#step-1-who-the-connection-is-for]

Choose **Me** or **Workspace** as the owner, then choose which agents can use the connection. The default is **Me**, with **My personal assistants** selected. Enable **Agents in projects** separately and choose **In all projects, including future ones** or **In some projects**. Anyone with access to those projects can use the connection, including in sessions they launch themselves. See [connection options](/docs/integrations/connectors#fill-in-the-connection-details) for what each choice means.

Click **Continue**.

### Step 2: how agents reach Supabase [#step-2-how-agents-reach-supabase]

The second screen has two tabs: **Supabase account** and **Access token**. Pick one.

#### Supabase account [#supabase-account]

This tab is selected by default, and it's the easiest way in — there's no key to create.

Click **Continue to Supabase** and sign in. Choose the **Organization** agents can reach, and click **Authorize Superconductor**. You land back on the Connectors page with **Supabase connected**.

Agents then act in Supabase as whoever signed in, in the organization you authorized. If you enable **Agents in projects**, anyone with access to those projects can use that account, so sign in with an account whose permissions you're happy to share.

#### Access token [#access-token]

In Supabase, open [Access Tokens](https://supabase.com/dashboard/account/tokens) and click **Generate new token**. Choose the project or organization agents can reach, then set **Permissions**, which start at **No access**. Paste the token into the **Supabase Personal Access Token** field and click **Connect Supabase**.

## Reconnecting and disconnecting [#reconnecting-and-disconnecting]

If an account connection stops working, the Connectors page shows a **Reconnect needed** badge on it, and agents run without Supabase.

To fix it, click **Manage** next to the connection, then **Reconnect Supabase**, and sign in again. You can only reconnect a personal connection you own; for someone else's, Superconductor tells you who to ask.

A pasted access token that Supabase stops accepting doesn't show **Reconnect needed**. Agents' Supabase calls fail until you paste a new token under **Manage** and click its **Save** button.

If you connected with an access token, delete the token in Supabase after you click **Disconnect**.

## When to use it [#when-to-use-it]

Ask agents to use Supabase for a schema change, a data question, or a production problem. For example:

```text
Add a deleted_at column to our orders table as a Supabase migration, and update the queries in our app to skip deleted rows.
```

```text
How many people signed up for our newsletter each week this quarter? Query our Supabase database and put the numbers in a table.
```

```text
Sign-ups started failing this morning. Check the Supabase auth and API logs and tell me what went wrong.
```