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
| Action | What it is for |
|---|---|
| List tables and schema | The agent understands your data model before proposing changes. |
| Run SQL | Read queries to answer questions about real data. |
| Apply migrations | Create or alter tables in a versioned way. |
| Check logs | Diagnose API, auth or database errors. |
| View advisors | Catch security and performance problems, for example missing RLS. |
How to connect it
- 01Create the project in Supabase and keep its project reference handy.
- 02Add Supabase's official MCP server to your client following its documentation (the exact command is on the MCP's listing).
- 03Authorize with your account or with an access token, depending on the mode you choose.
- 04Start in read-only mode if you are working against a project with real data.
- 05Verify by asking the agent to list the tables.
Agency use case
Set up lead capture for a new site
- 1.You ask the agent for the subscribers table with insert-only anonymous RLS.
- 2.The agent applies the migration through the MCP and shows you the SQL.
- 3.You ask it to check the advisors to confirm no policy was left open.
- 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.
Other integrations
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.