$git clone https://github.com/alexander-zuev/supabase-mcp-server> π More than 17k installs via pypi and close to 30k downloads on Smithery.ai β in short, this was fun! π₯³ > Thanks to everyone who has been using this server for the past few months, and I hope it was useful for you. > Since Supabase has released their own [official MCP server]
| 1 | # Query | MCP server for Supabase |
| 2 | Β |
| 3 | > π More than 17k installs via pypi and close to 30k downloads on Smithery.ai β in short, this was fun! π₯³ |
| 4 | > Thanks to everyone who has been using this server for the past few months, and I hope it was useful for you. |
| 5 | > Since Supabase has released their own [official MCP server](https://github.com/supabase-community/supabase-mcp), |
| 6 | > I've decided to no longer actively maintain this one. The official MCP server is as feature-rich, and many more |
| 7 | > features will be added in the future. Check it out! |
| 8 | Β |
| 9 | Β |
| 10 | <p class="center-text"> |
| 11 | <strong>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.</strong> |
| 12 | </p> |
| 13 | Β |
| 14 | Β |
| 15 | <p class="center-text"> |
| 16 | <a href="https://pypi.org/project/supabase-mcp-server/"><img src="https://img.shields.io/pypi/v/supabase-mcp-server.svg" alt="PyPI version" /></a> |
| 17 | <a href="https://github.com/alexander-zuev/supabase-mcp-server/actions"><img src="https://github.com/alexander-zuev/supabase-mcp-server/workflows/CI/badge.svg" alt="CI Status" /></a> |
| 18 | <a href="https://codecov.io/gh/alexander-zuev/supabase-mcp-server"><img src="https://codecov.io/gh/alexander-zuev/supabase-mcp-server/branch/main/graph/badge.svg" alt="Code Coverage" /></a> |
| 19 | <a href="https://www.python.org/downloads/"><img src="https://img.shields.io/badge/python-3.12%2B-blue.svg" alt="Python 3.12+" /></a> |
| 20 | <a href="https://github.com/astral-sh/uv"><img src="https://img.shields.io/badge/uv-package%20manager-blueviolet" alt="uv package manager" /></a> |
| 21 | <a href="https://pepy.tech/project/supabase-mcp-server"><img src="https://static.pepy.tech/badge/supabase-mcp-server" alt="PyPI Downloads" /></a> |
| 22 | <a href="https://smithery.ai/server/@alexander-zuev/supabase-mcp-server"><img src="https://smithery.ai/badge/@alexander-zuev/supabase-mcp-server" alt="Smithery.ai Downloads" /></a> |
| 23 | <a href="https://modelcontextprotocol.io/introduction"><img src="https://img.shields.io/badge/MCP-Server-orange" alt="MCP Server" /></a> |
| 24 | <a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache%202.0-blue.svg" alt="License" /></a> |
| 25 | </p> |
| 26 | Β |
| 27 | ## Table of contents |
| 28 | Β |
| 29 | <p class="center-text"> |
| 30 | <a href="#getting-started">Getting started</a> β’ |
| 31 | <a href="#feature-overview">Feature overview</a> β’ |
| 32 | <a href="#troubleshooting">Troubleshooting</a> β’ |
| 33 | <a href="#changelog">Changelog</a> |
| 34 | </p> |
| 35 | Β |
| 36 | ## β¨ Key features |
| 37 | - π» Compatible with Cursor, Windsurf, Cline and other MCP clients supporting `stdio` protocol |
| 38 | - π Control read-only and read-write modes of SQL query execution |
| 39 | - π Runtime SQL query validation with risk level assessment |
| 40 | - π‘οΈ Three-tier safety system for SQL operations: safe, write, and destructive |
| 41 | - π Robust transaction handling for both direct and pooled database connections |
| 42 | - π Automatic versioning of database schema changes |
| 43 | - π» Manage your Supabase projects with Supabase Management API |
| 44 | - π§βπ» Manage users with Supabase Auth Admin methods via Python SDK |
| 45 | - π¨ Pre-built tools to help Cursor & Windsurf work with MCP more effectively |
| 46 | - π¦ Dead-simple install & setup via package manager (uv, pipx, etc.) |
| 47 | Β |
| 48 | Β |
| 49 | ## Getting Started |
| 50 | Β |
| 51 | ### Prerequisites |
| 52 | Installing the server requires the following on your system: |
| 53 | - Python 3.12+ |
| 54 | Β |
| 55 | If you plan to install via `uv`, ensure it's [installed](https://docs.astral.sh/uv/getting-started/installation/#__tabbed_1_1). |
| 56 | Β |
| 57 | ### PostgreSQL Installation |
| 58 | PostgreSQL installation is no longer required for the MCP server itself, as it now uses asyncpg which doesn't depend on PostgreSQL development libraries. |
| 59 | Β |
| 60 | However, you'll still need PostgreSQL if you're running a local Supabase instance: |
| 61 | Β |
| 62 | **MacOS** |
| 63 | ```bash |
| 64 | brew install postgresql@16 |
| 65 | ``` |
| 66 | Β |
| 67 | **Windows** |
| 68 | - Download and install PostgreSQL 16+ from https://www.postgresql.org/download/windows/ |
| 69 | - Ensure "PostgreSQL Server" and "Command Line Tools" are selected during installation |
| 70 | Β |
| 71 | ### Step 1. Installation |
| 72 | Β |
| 73 | Since v0.2.0 I introduced support |