Content
1// ── Cloud (recommended for Claude Code) ─────────────────────────────────────
2// claude mcp add --transport http supabase \
3// "https://mcp.supabase.com/mcp?project_ref=YOUR_PROJECT_REF"
4//
5// ── Local stdio ──────────────────────────────────────────────────────────────
6{
7 "mcpServers": {
8 "supabase": {
9 "command": "npx",
10 "args": ["-y", "supabase-mcp"],
11 "env": {
12 "SUPABASE_PROJECT_ID": "your-project-ref",
13 "SUPABASE_SERVICE_ROLE_KEY": "your-service-role-key"
14 }
15 }
16 }
17}
18
19// ── Setup ────────────────────────────────────────────────────────────────────
20// Find your project ref and service role key at:
21// https://supabase.com/dashboard/project/YOUR_PROJECT/settings/api
22//
23// Official docs: https://supabase.com/docs/guides/getting-started/mcp
24//
25// ── Available tools ──────────────────────────────────────────────────────────
26// execute_sql run a SQL query against your database
27// list_tables list tables in a schema
28// apply_migration run a SQL migration file
29// list_migrations show migration history
30// get_logs fetch recent project logs
31// get_project_url get the project's API URL
32