Supabase MCP Server
Access Supabase databases, manage authentication, run migrations, and interact with edge functions from Claude Code. Ideal for full-stack developers building on Supabase who want AI-assisted database management, schema design, and debugging.
MCP Server Configuration
{ "mcpServers": { "supabase": { "command": "npx", "args": [ "-y", "@supabase/mcp-server-supabase@latest", "--project-ref", "<your-project-ref>" ], "env": { "SUPABASE_ACCESS_TOKEN": "<your-access-token>" } } } }
Available Tools
| Tool | Description |
|---|---|
list_tables | List all tables in the database |
execute_sql | Run SQL queries against your database |
apply_migration | Apply a SQL migration to your project |
list_migrations | List all applied migrations |
get_project_info | Get project configuration and status |
list_edge_functions | List deployed Edge Functions |
deploy_edge_function | Deploy a new Edge Function |
get_logs | Retrieve project logs for debugging |
list_storage_buckets | List storage buckets |
list_auth_users | List authenticated users |
Setup
- Get your access token from https://supabase.com/dashboard/account/tokens
- Find your project ref in your project's dashboard URL:
https://supabase.com/dashboard/project/<project-ref> - Replace both placeholders in the configuration
Usage Examples
- "Show me all tables and their relationships"
- "Create a migration to add a comments table with RLS policies"
- "List all users who signed up this week"
- "Deploy this edge function for handling webhooks"
- "Show me recent error logs for my project"
Row Level Security (RLS) Tips
When creating tables via this server, always include RLS policies:
-- Example: Create table with RLS CREATE TABLE posts ( id UUID DEFAULT gen_random_uuid() PRIMARY KEY, user_id UUID REFERENCES auth.users(id), content TEXT NOT NULL, created_at TIMESTAMPTZ DEFAULT NOW() ); ALTER TABLE posts ENABLE ROW LEVEL SECURITY; CREATE POLICY "Users can read all posts" ON posts FOR SELECT USING (true); CREATE POLICY "Users can insert own posts" ON posts FOR INSERT WITH CHECK (auth.uid() = user_id);
Security Notes
- The access token grants management-level access to your project
- Use environment variables, never commit tokens
- SQL queries execute with admin privileges - bypasses RLS
- Review all migration and SQL operations before approving
- Create a separate Supabase project for testing
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Database MCP Integration
MCP server configuration for connecting Claude Code to PostgreSQL, MySQL, and MongoDB databases. Enables schema inspection, query building, and migration generation.
Elevenlabs Server
Streamline your workflow with this official, elevenlabs, text, speech. Includes structured workflows, validation checks, and reusable patterns for audio.
Browser Use Portal
Powerful mcp for server, enables, agents, control. Includes structured workflows, validation checks, and reusable patterns for browser_automation.