Execute SQL queries against your Supabase database with validation and safety controls
Retrieve logs from multiple Supabase services with filtering and search capabilities
Create and modify database schema with automatic migration versioning
Access the Supabase Management API to manage projects, organizations, and settings
Manage authentication and users through the Auth Admin SDK
Explore database structure, tables, and relationships
Query MCP is an open-source server that enables comprehensive management of Supabase databases through a chat interface. It allows you to safely execute SQL queries, manage schema changes, call the Supabase Management API, and utilize the Auth Admin SDK with built-in safety controls. The server provides powerful features like automatic migration versioning, access to logs across multiple Supabase services, and database introspection tools.
Query MCP provides a powerful interface for managing your Supabase projects through natural language. It enables you to execute SQL queries, manage database schemas, interact with the Supabase Management API, and leverage the Auth Admin SDK—all with built-in safety controls.
pip install supabase-mcp-server
uv install supabase-mcp-server
Create a .env
file in your project directory based on the .env.example
file from the repository.
Configure the following essential environment variables:
SUPABASE_URL
: Your Supabase project URLSUPABASE_KEY
: Your Supabase service role key (for database operations)SUPABASE_ACCESS_TOKEN
: Your Supabase access token (for management API)SUPABASE_PROJECT_ID
: Your Supabase project IDOptional configuration:
SUPABASE_REGION
: Your Supabase project region (e.g., us-east-1)SUPABASE_ORG_ID
: Your Supabase organization IDPORT
: Port for the MCP server (default: 8000)Run the MCP server using:
supabase-mcp-server
Or with uv:
uv run supabase-mcp-server
Add the following configuration to your MCP client (Claude, Cursor, etc.):
"mcpServers": {
"supabase-query": {
"command": "supabase-mcp-server",
"args": []
}
}
If using uv:
"mcpServers": {
"supabase-query": {
"command": "uv",
"args": [
"run",
"supabase-mcp-server"
]
}
}
The repository includes a Dockerfile for containerized deployment:
docker build -t supabase-mcp-server .
docker run -p 8000:8000 --env-file .env supabase-mcp-server
For more information, visit thequery.dev or check the GitHub repository.