- Home
- MCP servers
- Supabase
Supabase
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"mcp-mirror-alexander-zuev_supabase-mcp-server": {
"command": "uv",
"args": [
"--directory",
"/path/to/cloned/supabase-mcp-server",
"run",
"main.py"
],
"env": {
"SUPABASE_DB_PASSWORD": "postgres",
"SUPABASE_PROJECT_REF": "abcdefghijklm"
}
}
}
}This MCP server lets you connect Cursor and Windsurf IDEs directly to a Supabase PostgreSQL database, giving you secure read-only access, schema insights, and SQL query validation. It enables practical database exploration and management from your familiar development tools while keeping your data safe.
How to use
You connect an MCP client (Cursor or Windsurf) to the Supabase MCP Server to access database tooling from your IDE. Use the local development setup for testing and switch to production settings when you work with a staging or live Supabase project. The server exposes local connection details by default and can be configured for production credentials.
How to install
Follow these steps to prepare and run the Supabase MCP Server locally.
# 1) Clone the MCP server repository
git clone https://github.com/alexander-zuev/supabase-mcp-server.git
cd supabase-mcp-server
# 2) Create and activate a Python virtual environment using uv
uv venv
# Mac/Linux
source .venv/bin/activate
# Windows
.venv\Scripts\activate
# 3) Install dependencies
uv sync
# If you encounter psycopg2 compilation errors, ensure PostgreSQL is installed first
Additional notes
Prerequisites include Python 3.12 or newer, PostgreSQL 16 or newer, and the uv package manager. For macOS you need PostgreSQL installed before dependencies so psycopg2 can compile. Windows users should install PostgreSQL 16+ with the Command Line Tools and then install uv.
Local development defaults for the MCP server are:
- Host: 127.0.0.1:54322
- Password: postgres
For production or staging, set these environment variables to point to your Supabase project:
- SUPABASE_PROJECT_REF: your-project-ref
- SUPABASE_DB_PASSWORD: your-db-password
Configuration for Cursor and Windsurf
The following configurations specify how to connect Cursor or Windsurf to the MCP server. Use these exact formats when configuring your IDEs.
# Cursor configuration example
name: supabase
protocol: stdio
command: uv --directory /path/to/cloned/supabase-mcp-server run main.py
# Windsurf configuration example
{
"mcpServers": {
"supabase": {
"command": "/Users/az/.local/bin/uv",
"args": [
"--directory",
"/Users/username/cursor/supabase-mcp-server",
"run",
"main.py"
],
"env": {
"SUPABASE_PROJECT_REF": "127.0.0.1:54322",
"SUPABASE_DB_PASSWORD": "postgres"
}
}
}
}