Supabase MCP Server
by Niell007
The Supabase MCP Server enables any MCP clients to safely interact with Supabase databases. It provides tools for database management, SQL query execution, and Supabase Management API access with built-in safety controls.
Last updated: N/A
What is Supabase MCP Server?
The Supabase MCP Server is a feature-rich server that allows MCP clients like Cursor, Windsurf, and Cline to securely interact with Supabase databases. It provides tools for executing SQL queries, managing databases, accessing the Supabase Management API, and handling user authentication, all with built-in safety measures.
How to use Supabase MCP Server?
To use the Supabase MCP Server, 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 optionally, the access token and service role key. Finally, configure your MCP client (e.g., Cursor, Windsurf, Cline) to connect to the server using the correct command and environment variables.
Key features of Supabase MCP Server
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
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 Supabase MCP Server
Safely executing SQL queries against a Supabase database from an IDE
Managing Supabase projects using the Management API from within an MCP client
Automating user authentication tasks using the Auth Admin SDK
Implementing database migrations with automatic versioning
Integrating Supabase functionality into AI-powered development tools
FAQ from Supabase MCP Server
What MCP clients are compatible with this server?
What MCP clients are compatible with this server?
This server is compatible with any MCP client that supports the stdio
protocol, including Cursor, Windsurf, Cline, and Claude Desktop.
How do I configure the server to connect to my Supabase project?
How do I configure the server to connect to my Supabase project?
You need to set the SUPABASE_PROJECT_REF
and SUPABASE_DB_PASSWORD
environment variables. Optionally, you can also set SUPABASE_ACCESS_TOKEN
and SUPABASE_SERVICE_ROLE_KEY
for Management API and Auth Admin SDK access, respectively.
What is the safety system and how does it work?
What is the safety system and how does it work?
The server has a three-tier safety system: safe
(read-only), write
(data modifications), and destructive
(schema changes). The live_dangerously
tool toggles between safe and unsafe modes, requiring confirmation for high-risk operations in unsafe mode.
Does this server support local Supabase development?
Does this server support local Supabase development?
Yes, the server supports local Supabase development using the default configuration. However, Management API and Auth Admin SDK features only work with remote Supabase projects.
Where can I find the logs for the MCP server?
Where can I find the logs for the MCP server?
The logs are located at ~/.local/share/supabase-mcp/mcp_server.log
on macOS/Linux and %USERPROFILE%\.local\share\supabase-mcp\mcp_server.log
on Windows.