Query MCP (Supabase MCP Server) logo

Query MCP (Supabase MCP Server)

by MCP-Mirror (originally alexander-zuev)

Query MCP, formerly Supabase MCP Server, enables your IDE to safely execute SQL queries, manage your database end-to-end, access the Management API, and handle user authentication with built-in safety controls. It's evolving into thequery.dev with plans for premium features while keeping the core tool free and open-source.

View on GitHub

Last updated: N/A

What is Query MCP (Supabase MCP Server)?

Query MCP is a server that acts as a bridge between your IDE and your Supabase project, allowing you to manage your database, access the Supabase Management API, and use the Auth Admin SDK through a Model Context Protocol (MCP) interface. It provides safety controls and tools to streamline database management and user authentication.

How to use Query MCP (Supabase MCP Server)?

  1. Install the server using pipx or uv. 2. Configure the server with your Supabase project credentials (project ref, database password, region, access token, service role key) via environment variables or a configuration file. 3. Configure your MCP client (Cursor, Windsurf, Cline, Claude Desktop) to connect to the server, providing the server's command and environment variables. 4. Use the available tools within your MCP client to execute SQL queries, manage users, and interact with the Supabase Management API.

Key features of Query MCP (Supabase MCP Server)

  • Compatible with Cursor, Windsurf, Cline and other MCP clients supporting stdio protocol

  • Control read-only and read-write modes of SQL query execution

  • Runtime SQL query validation with risk level assessment

  • Three-tier safety system for SQL operations: safe, write, and destructive

  • Robust transaction handling for both direct and pooled database connections

  • Automatic versioning of database schema changes

  • Manage your Supabase projects with Supabase Management API

  • Manage users with Supabase Auth Admin methods via Python SDK

  • Pre-built tools to help Cursor & Windsurf work with MCP more effectively

  • Dead-simple install & setup via package manager (uv, pipx, etc.)

Use cases of Query MCP (Supabase MCP Server)

  • Safely execute SQL queries in your IDE with risk assessment and safety controls.

  • Manage your Supabase database schema and data with automatic versioning.

  • Automate user management tasks with the Supabase Auth Admin SDK.

  • Access and manage your Supabase project through the Management API.

  • Troubleshoot your Supabase applications by accessing logs and analytics data.

FAQ from Query MCP (Supabase MCP Server)

What is MCP?

MCP stands for Model Context Protocol, a protocol that allows IDEs and other clients to interact with servers that provide tools and information about a specific context (e.g., a Supabase project).

How do I find my Supabase project reference?

Your Supabase project reference is found in your Supabase project URL: https://supabase.com/dashboard/project/<project-ref>

Why am I getting a 'Tenant or user not found' error?

This is likely because your SUPABASE_REGION setting doesn't match your project's actual region. You can find your project's region in the Supabase dashboard under Project Settings.

Can I use this with a self-hosted Supabase instance?

No, the server only supports official Supabase.com hosted projects and local development instances.

Why am I getting 'Client closed - no tools available' in Cursor?

Find the full path to the executable by running which supabase-mcp-server (macOS/Linux) or where supabase-mcp-server (Windows) and use the full path in your MCP server configuration instead of just supabase-mcp-server.