S

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.

MCPCommunitydatabasev1.0.0Apache-2.0
0 views0 copies

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

ToolDescription
list_tablesList all tables in the database
execute_sqlRun SQL queries against your database
apply_migrationApply a SQL migration to your project
list_migrationsList all applied migrations
get_project_infoGet project configuration and status
list_edge_functionsList deployed Edge Functions
deploy_edge_functionDeploy a new Edge Function
get_logsRetrieve project logs for debugging
list_storage_bucketsList storage buckets
list_auth_usersList authenticated users

Setup

  1. Get your access token from https://supabase.com/dashboard/account/tokens
  2. Find your project ref in your project's dashboard URL: https://supabase.com/dashboard/project/<project-ref>
  3. 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
Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates