How to Connect Supabase to AI: Query Tables and Run Migrations Safely
Connect Supabase to AI to explore tables, look up rows, see security warnings and generate types, and run SQL or migrations only after you approve the exact query. Step-by-step with Viro AI.
Supabase makes Postgres easy, but you still end up in the SQL editor for every quick question: how many orders today, which tables lack row-level security, what does this column hold. Connecting Supabase to AI lets you ask in plain English.
Viro works inside one project you choose, and every change shows the exact SQL for your approval before it runs.
This guide shows how to connect Supabase to Viro AI, the free AI assistant with ChatGPT, Claude, Gemini and Viro’s own model in one app, and what you can do once it’s connected.
What you can do when Supabase is connected to AI
Read and catch up:
- List your tables with their columns, keys, and whether row-level security is on
- Look up rows, such as counts, totals or the latest entries
- Show Supabase’s security and performance warnings for the project
- List the migrations that have run and the installed extensions
- Generate TypeScript types from your database
Make changes, with your OK:
- Create or change tables, columns, indexes and row-level security policies
- Add, change or delete rows
What it won’t do: see or change any project other than the one you choose, undo a change once it has run, delete a whole schema or database, touch Supabase’s own auth, storage and secrets tables, deploy edge functions, or read logs and API keys.
How to connect Supabase to AI, step by step
- Open Viro AI at ai.viro.app, or in the iPhone, Android or Mac app, and sign in. It’s free.
- Go to Customize → Connectors, open Supabase and select Connect to Viro.
- Sign in to Supabase, choose the organization that holds your project, and select Authorize Viro AI. Back in Viro, pick the one project Viro may use and select Use this project.
- Check that it’s connected. Back in Viro, Supabase is listed under Yours.
Supabase recommends connecting AI tools to a development project. If you connect a project your live app runs on, read each card carefully before you confirm.
What to ask Supabase once it’s connected
Once it’s connected, just ask in any chat. Use your own names and dates.
Exploring
- “What tables are in my Supabase project?”
- “How many rows are in my orders table?”
- “Any security warnings for my Supabase project?”
Building
- “Add a table for blog posts with a title, a body and a published date.”
- “Add a notes column to the orders table.”
- “Generate the TypeScript types for my Supabase project.”
Does the AI change Supabase without asking?
No. For a change, Viro shows a card marked Needs your OK with the project’s name and the exact SQL. Run migration applies a structural change and records it in your migration history; Run SQL changes rows. You can Edit the SQL first. For anything destructive, such as dropping a table, deleting rows, removing a security policy or a query with no WHERE, Viro asks twice: the card turns red and asks Are you sure? Viro cannot undo this. Lookups only read, so they never need a card.
Is it private?
Viro reads your Supabase data only to answer what you ask. It is never used to train AI models and Viro never sells your data. Free-plan ads are matched to words in the current conversation, never to your identity or your connected apps, and no human reads your chats.
To disconnect, open Supabase in Customize → Connectors and select Disconnect. To change projects instead, select Change on the same page.
Why use Viro for Supabase?
- Exact SQL, approved by you. Destructive changes ask twice.
- More than one model. Ask with ChatGPT, Claude, Gemini or Viro’s own model, and switch mid-conversation.
- Free. Connectors are included on every plan, including Free, on web, iPhone, Android and Mac.
- All your apps in one place. More than 40 connectors, so one question can cover your email, calendar, files and work apps together.
- Clean energy. Viro’s own model runs in data centers powered by hydro, geothermal and wind, and Viro funds new clean energy to match its partner models. See the data centers.
Connect Supabase to Viro AI free. Full details are on the Supabase help page, and every other app is listed in how to connect your apps to AI.
Frequently asked questions
Can AI run SQL on my Supabase database?
Yes, with your approval. Viro shows the exact SQL on a card and nothing runs until you confirm. Destructive queries need a second confirmation.
Can AI see all my Supabase projects?
No. Viro works inside the one project you choose and can’t see or change any other.
Should I connect a production Supabase project?
Supabase recommends connecting AI tools to a development project. If you connect a live one, read every card carefully before confirming.
Is it safe to connect Supabase to AI?
With Viro, your Supabase data is read only to answer your questions. It is never used to train AI models and never sold, and every change waits for your OK. You can disconnect at any time.
Is connecting Supabase to Viro free?
Yes. Connectors are included on every Viro plan, including Free.
Sources
- Supabase connector, Viro Help Center
- Connectors, Viro Help Center



