← Back to Supabase MCP Server
Install Supabase MCP Server
Pick your client, copy the command, done.
1
Add it to Claude Code
claude mcp add -e "SUPABASE_URL=${SUPABASE_URL}" -e "SUPABASE_SERVICE_KEY=${SUPABASE_SERVICE_KEY}" supabase-mcp-server -- npx -y @leomeirae/supabase-mcp-serverRequired:
SUPABASE_URLSUPABASE_SERVICE_KEYEnvironment Variables
Set these before running Supabase MCP Server.
VariableDescriptionRequired
SUPABASE_URLThe URL of your Supabase projectYesSUPABASE_SERVICE_KEYThe service role key for your Supabase projectYesAvailable Tools (9)
Once configured, Supabase MCP Server gives your AI agent access to:
list_tablesLists all tables in the database.schemasexecute_sqlExecutes raw SQL queries on the database.queryapply_migrationApplies DDL migrations to the database.namequeryget_logsRetrieves project logs from Supabase services.serviceget_advisorsRetrieves security and performance advisories.typesearch_docsSearches the official Supabase documentation.graphql_querylist_edge_functionsLists all deployed edge functions.deploy_edge_functionDeploys a new edge function.namefileslist_storage_bucketsLists all storage buckets in the project.Try It Out
After setup, try these prompts with your AI agent:
→List all tables in my public schema to understand the database structure.
→Execute a SQL query to find all leads with a qualification_status of 'NEW'.
→Search the Supabase documentation for how to implement row-level security.
→List all my current edge functions and tell me if any are failing based on the logs.
→Deploy a new edge function named 'process-lead' with the provided index.ts content.
Prerequisites & system requirements
- An MCP-compatible client (Claude Code, Cursor, Windsurf, Claude Desktop, or Codex)
- Node.js 18+ with npm/npx installed
SUPABASE_URL— The URL of your Supabase projectSUPABASE_SERVICE_KEY— The service role key for your Supabase project
Keep this setup from going cold
Save the docs, env vars, and workflow around Supabase MCP Server in Conare so Claude Code, Codex, and Cursor remember it next time.