← 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-server
Required:SUPABASE_URLSUPABASE_SERVICE_KEY

Environment Variables

Set these before running Supabase MCP Server.

VariableDescriptionRequired
SUPABASE_URLThe URL of your Supabase projectYes
SUPABASE_SERVICE_KEYThe service role key for your Supabase projectYes

Available Tools (9)

Once configured, Supabase MCP Server gives your AI agent access to:

list_tablesLists all tables in the database.
schemas
execute_sqlExecutes raw SQL queries on the database.
query
apply_migrationApplies DDL migrations to the database.
namequery
get_logsRetrieves project logs from Supabase services.
service
get_advisorsRetrieves security and performance advisories.
type
search_docsSearches the official Supabase documentation.
graphql_query
list_edge_functionsLists all deployed edge functions.
deploy_edge_functionDeploys a new edge function.
namefiles
list_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 project
  • SUPABASE_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.

Remember this setup