Integration

Claude Code + Supabase

With Supabase's official MCP, Claude Code can read your schema, query tables, apply migrations and check logs without you leaving the terminal.

Updated 2026-07-27

What you can do

ActionWhat it is for
List tables and schemaThe agent understands your data model before proposing changes.
Run SQLRead queries to answer questions about real data.
Apply migrationsCreate or alter tables in a versioned way.
Check logsDiagnose API, auth or database errors.
View advisorsCatch security and performance problems, for example missing RLS.

How to connect it

  1. 01Create the project in Supabase and keep its project reference handy.
  2. 02Add Supabase's official MCP server to your client following its documentation (the exact command is on the MCP's listing).
  3. 03Authorize with your account or with an access token, depending on the mode you choose.
  4. 04Start in read-only mode if you are working against a project with real data.
  5. 05Verify by asking the agent to list the tables.

Agency use case

Set up lead capture for a new site

  1. 1.You ask the agent for the subscribers table with insert-only anonymous RLS.
  2. 2.The agent applies the migration through the MCP and shows you the SQL.
  3. 3.You ask it to check the advisors to confirm no policy was left open.
  4. 4.You connect the form and validate with a test insert.

What you will trip over

  • Against a production project, work in read-only mode unless the migration has been reviewed.
  • Always check the RLS policies after creating tables: a table without RLS is exposed.
  • Supabase's free plan limits active projects, so plan ahead if you manage several sites.

FAQ

Frequently asked questions

Is it safe to give an agent access to my database?+

With judgment, yes. Use read-only mode by default, review each migration before applying it, and never point it at production while you are exploring.

Does it work for databases that are not Supabase?+

This MCP is specific to Supabase. For generic Postgres there are other database MCP servers.