Supabase MCP Server Setup
Connect Claude to your Supabase database using a managed MCP server. Query your data in plain English โ no SQL, no local setup, read-only by default.
Supabase is the database of choice for thousands of startups โ fast to set up, PostgreSQL under the hood, great dashboard. But when you want to actually ask questions about your data, you're still stuck opening the SQL editor, writing queries, and interpreting results manually.
MCP changes that. This guide shows you how to connect Claude to your Supabase database so you can query it in plain English. (New to MCP? Start with What is an MCP Server?)
Why Supabase + Claude Is a Powerful Combination
Supabase gives you a real PostgreSQL database with a clean API. Claude is excellent at understanding data questions and writing SQL. Connect them via MCP and you get a conversational interface to your own data โ without hiring an analyst or learning SQL.
Ask things like:
- "How many users signed up this week versus last week?"
- "Which rows in my orders table have a null shipping address?"
- "What's the average session length by user cohort?"
Claude handles the SQL. You just ask the question.
What You'll Need
- A Supabase project (any plan, including free)
- Your Supabase Project URL and Service Role Key
- Claude Desktop or Claude.ai with connector support
- A Synra account (free to start)
Finding Your Supabase Credentials
- Open your Supabase project dashboard
- Go to Settings โ API
- Copy your Project URL โ looks like
https://xxxxxxxxxxxx.supabase.co - Copy your service_role key (not the anon key โ the service role key has read access to all tables)
โ ๏ธ Keep your service role key private. Synra encrypts it with AES-256 on save and never exposes it in logs or responses.
Step-by-Step Setup
Step 1 โ Add your Supabase credentials to Synra
- Sign up at mcpserver.design
- Go to Credentials โ Add Database
- Select Supabase
- Paste your Project URL and Service Role Key
- Save โ Synra tests the connection immediately
Step 2 โ Get your MCP endpoint URL
Once connected, go to the Endpoints tab. Copy your unique MCP endpoint URL.
Step 3 โ Connect to Claude
Open Claude โ Settings โ Connectors โ Add custom connector โ paste your Synra URL.
Claude will confirm the connection with a database icon in the toolbar. You're live.
What Synra Exposes as MCP Tools
When Claude connects to your Supabase database via Synra, it gets access to four tools:
- list_tables โ returns all tables in your database with row counts
- describe_table โ returns column names, types, and constraints for any table
- query_table โ runs a filtered SELECT query on a specific table
- execute_sql โ runs a custom SELECT query you specify
All four are read-only. No writes, no schema changes, no risk to your production data.
Security Considerations
Supabase's service role key bypasses Row Level Security (RLS) โ which is what makes it useful for analytics queries, but also means it has broad read access. Synra mitigates this by:
- Blocking all destructive SQL keywords at the gateway level
- Logging every query with timestamp and tool name
- Encrypting your service role key at rest with AES-256
- Never storing query results โ only metadata
If you want more restrictive access, create a dedicated Supabase database role with SELECT-only permissions on specific tables, and use those credentials in Synra instead of the service role key.
Real Examples
Once connected, try asking Claude:
- "What tables are in my database?" โ Claude calls
list_tables - "Describe the profiles table" โ Claude calls
describe_table - "Show me users who signed up in the last 7 days" โ Claude writes and runs a SELECT query
- "How many active subscriptions do I have by plan type?" โ Claude joins and aggregates your data
The more context you give Claude about your schema, the better its queries get. You can paste a brief description of your tables into the conversation and Claude will factor that in.
Ready to connect Supabase to Claude? Get started free at mcpserver.design โ setup takes under 60 seconds.
Related guides:
- Connect Claude to PostgreSQL โ works with any Postgres database, not just Supabase
- Connect Claude to MySQL โ for MySQL-based projects
- Self-Hosted vs Managed MCP Server โ comparing local vs hosted
- What is an MCP Server? โ foundational overview