Query | MCP server for Supabase
by alexander-zuev
Query MCP is an open-source MCP server that lets your IDE safely run SQL, manage schema changes, call the Supabase Management API, and use Auth Admin SDK — all with built-in safety controls. It provides a secure way to interact with your Supabase project from your IDE.
Last updated: N/A
What is Query | MCP server for Supabase?
Query MCP is an open-source MCP (Model Context Protocol) server designed to enhance the development experience with Supabase. It allows developers to safely execute SQL queries, manage database schema changes, interact with the Supabase Management API, and utilize the Auth Admin SDK directly from their IDEs, all while incorporating built-in safety mechanisms.
How to use Query | MCP server for Supabase?
To use Query MCP, you need to install it using a Python package manager like pipx
or uv
. Then, configure it with your Supabase project credentials, including the project reference, database password, and API keys. Finally, configure your MCP-compatible IDE (like Cursor, Windsurf, Cline, or Claude Desktop) to connect to the server by providing the path to the executable and the necessary environment variables.
Key features of Query | MCP server for Supabase
Compatible with Cursor, Windsurf, Cline and other MCP clients supporting
stdio
protocolControl 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
Manage your Supabase projects with Supabase Management API
Manage users with Supabase Auth Admin methods via Python SDK
Automatic versioning of database schema changes
Access to Supabase logs and analytics data
Use cases of Query | MCP server for Supabase
Safely execute SQL queries in your Supabase database from your IDE.
Manage database schema changes with automatic versioning.
Automate user management tasks using the Supabase Auth Admin SDK.
Interact with the Supabase Management API to manage your Supabase projects.
Monitor and troubleshoot your Supabase applications using logs and analytics.
Integrate Supabase functionalities into AI-powered development tools.
FAQ from Query | MCP server for Supabase
What is an MCP server?
What is an MCP server?
MCP stands for Model Context Protocol. An MCP server allows IDEs and other tools to interact with a service (like Supabase) in a structured and safe manner.
What are the prerequisites for installing the server?
What are the prerequisites for installing the server?
You need Python 3.12+ installed on your system. If you plan to use uv
, ensure it's installed as well.
How do I configure the server?
How do I configure the server?
You can configure the server using environment variables, a local .env
file (if running from source), or a global config file. The server prioritizes environment variables over the other methods.
What environment variables are required?
What environment variables are required?
SUPABASE_PROJECT_REF
, SUPABASE_DB_PASSWORD
, SUPABASE_REGION
, and QUERY_API_KEY
are required. SUPABASE_ACCESS_TOKEN
and SUPABASE_SERVICE_ROLE_KEY
are optional but needed for Management API and Auth Admin SDK features, respectively.
Why do I need an API key?
Why do I need an API key?
Since v0.4 MCP server requires an API key which you can get for free at thequery.dev to use this MCP server.