Supabase MCP Server logo

Supabase MCP Server

by alexander-zuev

This server implements a Supabase MCP server that allows Cursor and Windsurf IDEs to interact directly with a Supabase PostgreSQL database. It provides database management tools that work seamlessly with these IDEs through the MCP protocol.

View on GitHub

Last updated: N/A

What is Supabase MCP Server?

The Supabase MCP Server is an implementation that enables Cursor and Windsurf IDEs to interact directly with a Supabase PostgreSQL database using the MCP protocol.

How to use Supabase MCP Server?

To use, install the prerequisites (Python 3.12+, PostgreSQL 16+, uv package manager). Clone the repository, create a virtual environment, install dependencies using uv sync. Configure Cursor or Windsurf with the provided command and environment variables to connect to either a local or production Supabase instance.

Key features of Supabase MCP Server

  • Works with both Windsurf and Cursor IDEs

  • Supports local and production Supabase projects

  • Built-in database exploration tools with schema insights

  • Secure read-only database access

  • SQL query validation

Use cases of Supabase MCP Server

  • Database exploration within Cursor and Windsurf IDEs

  • Managing Supabase projects directly from the IDE

  • Validating SQL queries before execution

  • Securely accessing Supabase databases in development and production

FAQ from Supabase MCP Server

What is MCP?

MCP stands for Machine Code Protocol. It is a protocol used for communication between IDEs and backend servers.

What IDEs are supported?

Currently, the server supports Cursor and Windsurf IDEs.

Can I use this with a production Supabase project?

Yes, you can. You need to set the SUPABASE_PROJECT_REF and SUPABASE_DB_PASSWORD environment variables.

I'm getting psycopg2 compilation errors. What should I do?

Make sure you have installed PostgreSQL before installing the project dependencies. psycopg2 requires PostgreSQL development libraries during compilation.

What are the future improvements planned?

Future improvements include supporting methods and objects available in the native Python SDK and improving SQL syntax validation.