MCP Servers

Supabase MCP Server — AI-Powered Database Management

Connect AI assistants to your Supabase project for natural language database queries, schema management, edge function deployment, and real-time data analysis.

The Supabase MCP server connects AI assistants to your Supabase project — enabling natural language SQL queries, schema exploration, table management, and edge function deployment without leaving your AI workflow.

What the Supabase MCP Server Does

Supabase is an open-source Firebase alternative built on PostgreSQL. The Supabase MCP server gives MCP-compatible AI assistants direct access to your Supabase project — including the database, authentication, storage, and edge functions. Think of it as a superset of the Postgres MCP server with Supabase-specific features layered on top.

Instead of switching between the Supabase dashboard, SQL editor, and your AI assistant, you can do everything through conversation: explore schemas, run queries, create tables, manage RLS policies, and even deploy edge functions.

storage
Database
lock
Auth & RLS
cloud_upload
Storage
functions
Edge Functions

Installation

You need your Supabase project URL and a service role key (or anon key for restricted access). Find both in your Supabase dashboard under Settings > API.

# Claude Desktop config: { "mcpServers": { "supabase": { "command": "npx", "args": ["-y", "@anthropic/mcp-supabase"], "env": { "SUPABASE_URL": "https://your-project.supabase.co", "SUPABASE_SERVICE_ROLE_KEY": "eyJ..." } } } } # Claude Code: claude mcp add supabase npx @anthropic/mcp-supabase \ --env SUPABASE_URL=https://your-project.supabase.co \ --env SUPABASE_SERVICE_ROLE_KEY=eyJ...
warning

Security Warning

The service role key bypasses Row Level Security. For production environments, use the anon key with proper RLS policies, or create a restricted database role. Never expose the service role key in client-side code.

Key Capabilities

Feature What You Can Do Example
SQL QueriesRun any read or write SQL"Show me all users who signed up this week"
Schema ManagementCreate/alter tables and indexes"Add an email_verified boolean to the users table"
RLS PoliciesCreate and manage row-level security"Add a policy so users can only read their own rows"
Edge FunctionsDeploy serverless functions"Create an edge function that sends welcome emails"

Supabase MCP vs Postgres MCP

If you just need database access, the Postgres MCP server is lighter and works with any PostgreSQL database. The Supabase MCP server adds Supabase-specific features: auth management, storage bucket operations, edge function deployment, and RLS policy management. Use the Postgres server for raw database work; use the Supabase server when you want the full Supabase platform integration.

Frequently Asked Questions

Is the Supabase MCP server safe for production databases?

Use with caution. With a service role key, the AI has full database access including writes and deletes. For safety, use the anon key with RLS policies, or create a read-only database role for the MCP connection.

Can it handle large databases?

Yes. The MCP server streams query results and can handle databases of any size. For very large result sets, the AI will typically add LIMIT clauses to keep responses manageable.

Does it work with Supabase's free tier?

Yes. The MCP server works with all Supabase plans including the free tier. API access is available on every plan.

Last updated: 2026 • Browse all courses