Supabase MCP
Connects Supabase projects to AI assistants, enabling them to manage database tables, execute SQL queries, and deploy Edge Functions through natural language. It provides a comprehensive suite of tools for project administration, including logs acces
What is Supabase MCP?
Supabase MCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to connects supabase projects to ai assistants, enabling them to manage database tables, execute sql queries, and deploy edge functions through natural language. it provides a comprehensive suite of tool...
Connects Supabase projects to AI assistants, enabling them to manage database tables, execute SQL queries, and deploy Edge Functions through natural language. It provides a comprehensive suite of tools for project administration, including logs acces
This server falls under the Databases category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Connects Supabase projects to AI assistants, enabling them t
Use Cases
Maintainer
Works with
Installation
NPM
npx -y supabase-mcpManual Installation
npx -y supabase-mcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Supabase MCP
The Supabase MCP Server connects AI assistants to Supabase projects, enabling natural language management of database tables, SQL execution, Edge Function deployment, and project administration. It implements a three-tier safety system (safe/write/destructive) to prevent accidental data loss, supports Auth Admin operations for user management, and provides access to Postgres, API gateway, auth, and storage logs — making it practical for developers who want to manage their Supabase backend through Claude or other AI coding tools.
Prerequisites
- Python 3.12 or later installed
- pipx or uv for Python tool installation
- A Supabase project with its project reference (SUPABASE_PROJECT_REF) and database password (SUPABASE_DB_PASSWORD)
- QUERY_API_KEY from thequery.dev (required for all operations)
- An MCP-compatible client such as Claude Desktop, Cursor, Windsurf, or Cline
Install supabase-mcp-server
Install the server using pipx (recommended for isolation) or uv.
# Using pipx (recommended)
pipx install supabase-mcp-server
# Or using uv
uv pip install supabase-mcp-serverGet your API key from thequery.dev
The QUERY_API_KEY is mandatory for all operations. Sign up at thequery.dev to obtain your API key.
Configure environment variables
Create the global config file at ~/.config/supabase-mcp/.env (macOS/Linux) or set environment variables directly. All four core variables are required.
QUERY_API_KEY=your_query_api_key
SUPABASE_PROJECT_REF=your_project_ref
SUPABASE_DB_PASSWORD=your_db_password
SUPABASE_REGION=us-east-1
# Optional:
SUPABASE_ACCESS_TOKEN=your_management_api_token
SUPABASE_SERVICE_ROLE_KEY=your_service_role_keyConfigure your MCP client
Add the supabase-mcp-server to your client configuration file. The server communicates over stdio protocol.
Verify the connection
Test the integration by asking your AI client to list your Supabase tables or describe the database schema.
Supabase MCP Examples
Client configuration
Claude Desktop configuration for supabase-mcp-server using npx with all required environment variables.
{
"mcpServers": {
"supabase": {
"command": "npx",
"args": ["-y", "supabase-mcp"],
"env": {
"QUERY_API_KEY": "your_query_api_key",
"SUPABASE_PROJECT_REF": "your_project_ref",
"SUPABASE_DB_PASSWORD": "your_db_password",
"SUPABASE_REGION": "us-east-1"
}
}
}
}Prompts to try
Example prompts for managing a Supabase project through the MCP server.
- "List all tables in my Supabase database and describe their schemas"
- "Run a SQL query to find all users who signed up in the last 7 days"
- "Show me the last 50 authentication log entries filtered by failed login attempts"
- "Create a new table called 'feedback' with columns for user_id, message, and created_at"
- "List all Edge Functions deployed to this project and their last deployment timestamps"Troubleshooting Supabase MCP
All operations fail with QUERY_API_KEY error
The QUERY_API_KEY from thequery.dev is mandatory and cannot be omitted. Sign up at thequery.dev to get your key, then add it to ~/.config/supabase-mcp/.env or your MCP client's env configuration.
Destructive operations are blocked even in unsafe mode
The three-tier safety system requires explicit confirmation for destructive operations (schema changes, drops) regardless of mode. Your AI client must send a confirmation signal. This is intentional to prevent accidental data loss.
Cannot connect to local Supabase development instance
For local development, set SUPABASE_PROJECT_REF to 'localhost:54322' (or your local Supabase API port) instead of a cloud project reference. Local instances do not require SUPABASE_REGION.
Frequently Asked Questions about Supabase MCP
What is Supabase MCP?
Supabase MCP is a Model Context Protocol (MCP) server that connects supabase projects to ai assistants, enabling them to manage database tables, execute sql queries, and deploy edge functions through natural language. it provides a comprehensive suite of tools for project administration, including logs acces It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Supabase MCP?
Install via npm with the command: npx -y supabase-mcp. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).
Which AI clients work with Supabase MCP?
Supabase MCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Supabase MCP free to use?
Yes, Supabase MCP is open source and available under the Apache 2.0 license. You can use it freely in both personal and commercial projects.
Supabase MCP Alternatives — Similar Databases Servers
Looking for alternatives to Supabase MCP? Here are other popular databases servers you can use with Claude, Cursor, and VS Code.
Excelize
★ 20.6kGo language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
MCP Toolbox for Databases
★ 15.3kOpen source MCP server specializing in easy, fast, and secure tools for Databases.
DBHub
★ 2.8kA universal database gateway MCP server that enables AI assistants to connect to and query multiple databases (PostgreSQL, MySQL, MariaDB, SQL Server, SQLite) with support for schema exploration, SQL execution, and secure connections via SSH tunnels.
Tabularis
★ 2.1kA lightweight, cross-platform database client for developers. Supports MySQL, PostgreSQL and SQLite. Hackable with plugins. Built for speed, security, and aesthetics.
Postgres AI Guide
★ 1.7kMCP server and Claude plugin for Postgres skills and documentation. Helps AI coding tools generate better PostgreSQL code.
Anyquery
★ 1.7k🏎️ 🏠 ☁️ - Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by design.
Browse More Databases MCP Servers
Explore all databases servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Supabase MCP in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Supabase MCP?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.