Supabase MCP

v1.5.0Databasesstable

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

cursormodel-context-protocolsupabasewindsurfmcp
Share:
821
Stars
0
Downloads
0
Weekly
0/5

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

Supabase project management through natural language
SQL, Edge Functions, and admin operations
alexander-zuev

Maintainer

LicenseApache 2.0
Languagepython
Versionv1.5.0
UpdatedMay 14, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y supabase-mcp

Manual Installation

npx -y supabase-mcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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-server
2

Get 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.

3

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_key
4

Configure your MCP client

Add the supabase-mcp-server to your client configuration file. The server communicates over stdio protocol.

5

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.

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.

Quick Config Preview

{ "mcpServers": { "supabase-mcp-server": { "command": "npx", "args": ["-y", "supabase-mcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides