All integrations
DatabaseMCP serverBy SupabaseFor engineering teams
Supabase logo

Run agents with Supabase

Connect Supabase once, and every run that names it works in Supabase on the account you connected.

Manage a Supabase project: run SQL queries, design and inspect database schemas and tables, manage branches and config.

What agents do with Supabase

  • Review a Supabase Database SchemaYes. An agent reads your Supabase schema and table stats through the connection and returns schema-review.md with index, bloat and type fixes as SQL you did not run.Every weekly schema drift checkRun it
  • Find Slow Postgres Queries in a Supabase AppYes. An agent reads pg_stat_statements on your Supabase project, matches the slowest queries to the calling code, and writes slow-queries.md with a fix for each.Every slow query alertRun it
  • Review Supabase Migrations in Every Pull RequestYes. On every pull request an agent reads new Supabase migrations against your live schema and flags missing row-level security, broad grants and slow locks.Every pull request openedRun it
  • Audit Row-Level Security in a Supabase ProjectYes. An agent reads every public Supabase table, its policies and its grants, and writes where row-level security is missing or wide open.Every schema changeRun it
  • Weekly metrics reportPull last week's signups, runs and revenue, compare each with the week before, and write a one-page report in Notion that leads with what changed most.Writes a Notion pageAutomate this
  • Review access to productionList who and what can reach production, flag keys nobody has used in 30 days, and post the list to Slack.Posts to SlackAutomate this

How it works

  1. Connect Supabase once

    Sign in under Settings → Connections. Rush keeps the sign-in; no script or laptop holds a token.

  2. Hand an agent the work

    From the console, on a schedule, or with one API call that names supabase.

  3. Get the result back

    Files, an answer or a PR, with a record of every step the agent took.

Code changes on a Supabase codebase

These change the code of an app built on Supabase. They run on your repository in a Project and need no Supabase connection.

For developers: how Supabase connects

Supabase is a remote MCP server, published by Supabase, at https://mcp.supabase.com/mcp. Connecting it signs in through the MCP OAuth flow on Supabase's side.

From Supabase: Supabase's MCP documentation · source code.

Connect it once in the console under Settings → Connections, or from your server with POST /me/connections. The sign-in finishes in a browser signed in to the console as the same person, and a link not finished within 10 minutes expires.

After that, a run that names supabase in connections, or runs a saved agent that names it, gets it; your connections reach no run that does not name them.

POST https://api.phoenix.so/me/connections

{
  "type": "mcp",
  "name": "Supabase",
  "url": "https://mcp.supabase.com/mcp"
}

Whose Supabase account the agent uses

Your Supabase connection is personal: it belongs to the person who signed in. A run started in the console uses that person's Supabase, and a run started with an API key uses the Supabase of the member who created the key.

To act for your own app's users, make each user an agent from your template and show them, signed in to your app, the sign-in link POST /o/{org}/agents/{agent}/connections returns. They sign in to their own Supabase, and that agent's runs use their account and nothing else: never yours, never another user's.

More Database integrations

Frequently asked questions

How do I connect Supabase to Rush?

Open Settings → Connections in the console and connect Supabase, or send POST /me/connections with {"type":"mcp","name":"Supabase","url":"https://mcp.supabase.com/mcp"} and open the authorize_url it returns while signed in to the console. The connection reads pending until the sign-in finishes, then connected.

Does every run get my Supabase account?

No. A run gets your Supabase connection only when it names it in connections ("connections": ["supabase"]), or runs a saved agent that names it. A saved agent names its connections once, and every run of it gets them.

What can an agent do in Supabase?

Manage a Supabase project: run SQL queries, design and inspect database schemas and tables, manage branches and config. 4 published jobs use it; this page lists them.

Can my app's users connect their own Supabase?

Yes. Make each user an agent from your template, and they sign in to their own Supabase through the link POST /o/{org}/agents/{agent}/connections returns. That agent's runs use their account alone.

Keep reading