Supabase MCP
Manage Supabase projects, databases, branches, Edge Functions, storage, logs, and development workflows through Supabase's hosted MCP server.
Verdict
Common use cases
- Pull user signup metrics for weekly review
- Debug foreign key constraints in staging
- Generate SQL migration scripts from schema changes
- Export filtered rows to CSV for analysis
- Check real-time subscription event logs
Integration
- Vendor
- Supabase MCP
- Category
- other
- Auth
- OAUTH2
- Composio slug
supabase_mcp
Tools
Setup
Setup guide
- 11. In Switchy, open your workspace settings and navigate to the Integrations page. 2. Find Supabase MCP in the directory and click Connect. 3. You'll redirect to Supabase's OAuth consent screen — sign in with the account that owns your project. 4. Grant the requested scopes, which typically include reading table schemas and executing queries; if you want the AI to insert or update rows, approve write permissions as well. 5. Select which Supabase project to link, then authorize. 6. Back in Switchy, confirm the connection shows as active. 7. Open any Project, type '@Supabase list my tables' in the chat, and verify it returns your schema. 8. If you see table names and column definitions, the integration is live and ready for queries.
What teammates see: by default, memories from Supabase MCP are scoped to the Project (PROJECT visibility) - you can mark any memory PRIVATE or share it ORG-wide.
Works well with
Top models
Compatibility data appears once enough Projects have used this MCP together with a given model.
How Switchy teams use it
Starter prompts
Schema Overview
@Supabase show me all tables in my project and their column definitions, including data types and constraints.
Recent Signups
@Supabase query the users table for the 50 most recent signups, ordered by created_at descending, and show email and signup date.
Row Count by Status
@Supabase count rows in the orders table grouped by status field, and return the totals as a summary.
Generate Migration SQL
@Supabase write a SQL migration to add a 'last_login' timestamp column to the users table with a default of now().
Check RLS Policies
@Supabase list all RLS policies on the profiles table and explain what each policy allows or restricts.
Example outputs
Illustrative - representative of the model's voice and quality, not literal recordings.
@supabase list all users who signed up in the last 7 days and show their email verification status
Based on your Supabase auth records, 23 users registered in the past week. 18 have verified emails, 5 remain unverified. The query returned user IDs, email addresses (masked for privacy in this example), and created_at timestamps. The unverified accounts are clustered around January 8-9, suggesting a possible email delivery issue during that window.
This example assumes read access to auth.users via the Supabase Management API. The MCP must be configured with a service role key or appropriate OAuth scope. Results reflect your project's actual user table — empty projects return zero rows. No write operations occur.
@supabase create a new row in the 'feedback' table with message 'Login flow is confusing' and user_id from the session context
Row inserted successfully into public.feedback. Assigned ID: fb_8x2k9m. The record includes your message text, the authenticated user's ID (pulled from the current session token), and a server-generated timestamp of 2025-01-10 14:32:18 UTC. This write operation respects your table's RLS policies — if the policy blocks inserts for this user role, the MCP will return a permission error instead.
Requires INSERT permission on the target table and valid RLS policy configuration. The MCP does not bypass Row Level Security — it operates as the authenticated user or service role you've authorized. Side-effect: data is immediately committed to your production database.
@supabase pull the last 50 error logs from the 'api_logs' table and summarize the most common failure patterns
Retrieved 50 log entries spanning the past 6 hours. The AI identifies three dominant patterns: 14 instances of 'foreign key constraint violation' on orders.customer_id (likely deleted customer records), 9 timeout errors on the /search endpoint exceeding 5 seconds, and 7 authentication failures with expired JWT tokens. The constraint violations peaked between 10-11 AM UTC, correlating with a batch delete script you may have run.
This synthesis example combines the MCP's table read capability with the AI's pattern recognition. Accuracy depends on your log schema — if 'api_logs' uses non-standard column names, the query may need adjustment. The MCP streams raw rows; the AI performs the grouping and interpretation.
Use-case deep-dives
When Supabase MCP speeds up support team triage
A 5-person support team fields 80 tickets a day and needs to pull user account details, subscription status, and recent activity logs without switching between Supabase dashboard tabs. Supabase MCP is the right call here if your team already stores this data in Supabase tables and you've granted OAuth2 read access to the relevant schemas. The MCP lets agents query user records and join across tables in natural language during a ticket conversation, cutting lookup time from 90 seconds to under 10. The trade-off: if your support data lives in multiple systems (Stripe, Intercom, Zendesk), you'll need additional MCPs to get the full picture, and coordinating OAuth scopes across tools adds setup friction. If 70% of your triage context lives in Supabase, this MCP pays for itself in the first week.
When this MCP replaces repetitive SQL for product teams
A 3-person product team runs the same five Supabase queries every Monday to check feature adoption, cohort retention, and funnel drop-off. Supabase MCP makes sense if those queries hit tables under 500k rows and you're tired of copy-pasting SQL into the Supabase console. The MCP lets you ask 'show me last week's signups who completed onboarding' in Switchy and get a formatted result without leaving the conversation. The threshold: if your queries involve complex window functions, multi-step CTEs, or tables over 1M rows, the MCP's natural-language translation can produce slow or incorrect SQL, and you're better off saving parameterized queries in Supabase directly. For straightforward aggregations and filters on mid-sized tables, this MCP saves 20 minutes per standup.
When Supabase MCP fits a moderation workflow
A 2-person community team reviews 40 flagged posts per day stored in a Supabase moderation queue table. Supabase MCP is a fit if your flagging logic writes to Supabase and you need to pull post content, user history, and flag metadata in one query during review. The MCP lets you ask 'show me the last 10 flagged posts with user join dates' and get results inline, then update the status column after a decision. The boundary: if your moderation rules require writing back to Supabase (approving, banning, soft-deleting), confirm the MCP supports write operations through OAuth2, or you'll still need the dashboard for half the workflow. If your queue is read-heavy and under 10k rows, this MCP cuts review time by 30%.
Frequently asked
What does the Supabase MCP do in Switchy?
It connects your Supabase project to Switchy's AI workspace so your team can query databases, manage auth users, and interact with storage buckets through natural language. Instead of writing SQL or navigating the Supabase dashboard, you ask questions and the MCP translates them into the right API calls. Useful for teams who want AI-assisted database operations without leaving their workflow.
Do I need admin access to connect Supabase?
You need a Supabase account with at least read access to the project you're connecting. OAuth2 handles the handshake, so you'll authorise Switchy through Supabase's consent screen. If you want the MCP to write data or manage users, your Supabase role must have those permissions. Read-only accounts can still query tables and inspect schemas.
Can the Supabase MCP create tables or run migrations?
Not directly. The MCP focuses on querying existing tables, reading auth data, and interacting with storage. If you need schema changes, use Supabase's migration tools or SQL editor. The MCP is designed for operational queries and data retrieval, not infrastructure-as-code workflows. Think of it as a read-heavy assistant, not a database admin replacement.
How is this different from just using Supabase's API?
The API requires you to write code, manage credentials, and handle response parsing. The MCP wraps that complexity so your team can ask questions in plain English and get structured answers. You skip the boilerplate and get faster iteration on data questions. Trade-off: less control over exact query construction, but much lower friction for non-technical teammates.
Who on the team should connect the Supabase MCP?
Whoever owns your Supabase project and understands which tables contain sensitive data. They'll authorise the OAuth connection and decide which project to link. After that, anyone in your Switchy workspace can query through the MCP, but access still respects Supabase's row-level security policies. One connection per workspace is typical.