Supabase PostgREST MCP – Model Context Protocol Server for Windsurf

free

Supabase PostgREST MCP server. Lets Windsurf query and mutate Postgres data through the Supabase PostgREST endpoint.

Curated by AI Stack · Platform pick
Installation Instructions →
Category: DatabaseCompany: Supabase
Compatible Tools:
Windsurf (Primary)

Featured on AI Stack

Add this badge to your README or site so visitors know this MCP is listed in our directory.

Listed on AI Stack MCP Directory
<a href="https://ai-stack.dev/mcps/supabase-postgrest-mcp-windsurf" target="_blank" rel="noopener noreferrer" style="display:inline-block;padding:6px 12px;background:#1a1f27;color:#93c5fd;border:1px solid #2d323a;border-radius:6px;font-size:12px;text-decoration:none;font-family:system-ui,sans-serif;">Listed on AI Stack MCP Directory</a>

About Supabase PostgREST MCP MCP Server

Quick overview of why teams use it, how it fits into AI workflows, and key constraints.

Supabase in AI Workflows Without Context Switching

AI assistants like Claude and Windsurf are becoming increasingly powerful at handling complex tasks, but they often require manual context switching between different dashboards, APIs, and scripts to access the necessary data and functionality. The Supabase PostgREST MCP server solves this problem by providing a standardized interface that allows these AI agents to directly query and mutate data within your Supabase projects, without needing to navigate through various UIs or make separate API calls.

By integrating the Supabase PostgREST MCP, AI assistants can now seamlessly pull the right information from your Postgres databases, manage tables and migrations, and execute custom SQL – all while staying within the context of their conversational workflow. This eliminates the need for developers to build custom integrations or write boilerplate code to connect their Supabase projects to their AI tools.

How Supabase PostgREST MCP Improves AI‑Assisted Workflows

The Supabase PostgREST MCP enables a wide range of AI-assisted workflows that were previously difficult or impossible, such as:

  • AI-Assisted Incident Response: The AI agent can quickly pull relevant logs, check the status of key services, and execute SQL queries to investigate and remediate issues, all without leaving the conversational interface.
  • Automated Monitoring and Reporting: The agent can regularly fetch metrics, generate summaries, and send notifications – freeing up developers to focus on high-impact work instead of repetitive reporting tasks.
  • Intelligent Data Exploration: Users can ask the agent clarifying questions, get visualizations, and uncover insights from their Supabase data, without needing to navigate between separate data exploration tools.

Architecture and Data Flow

The Supabase PostgREST MCP server acts as a proxy between the AI agent and your Supabase project's PostgREST API. When the agent calls an MCP tool, the server translates that request into the appropriate API call, handles authentication and authorization, and returns the response back to the agent. This allows the agent to seamlessly interact with your Supabase data and services without needing to manage low-level API details or credentials.

The MCP server supports both stdio and Server-Sent Events (SSE) transport protocols, giving AI tools flexibility in how they communicate with the server. Credentials are securely passed from the agent to the server, which then impersonates the user and executes the requested actions on their behalf, enforcing the same permission boundaries that apply to regular API access.

When Supabase PostgREST MCP Is Most Useful

  • Incident investigation and remediation
  • Automated monitoring and reporting
  • Intelligent data exploration and visualization
  • Database schema management and migrations
  • Edge function deployment and testing
  • Integrating Supabase data and actions into conversational AI workflows

Limitations and Operational Constraints

To use the Supabase PostgREST MCP server, you'll need a Supabase account and a valid API key with the appropriate permissions. The server is subject to the same rate limits as the Supabase API, so high-volume usage may require adjustments to your plan.

  • Requires a Supabase account and API key
  • Subject to Supabase API rate limits
  • Supports limited subset of tools in self-hosted or CLI environments
  • Requires network connectivity between the agent and the MCP server
  • Supported agent tooling may have compatibility requirements or restrictions

Example Configurations

For stdio Server (Supabase PostgREST MCP Example):
https://github.com/supabase-community/supabase-mcp
For SSE Server:
URL: http://example.com:8080/sse

Supabase PostgREST MCP Specific Instructions

1. npm i @supabase/mcp-server-postgrest
2. Add to Windsurf MCP config:
npx -y @supabase/mcp-server-postgrest --apiUrl <URL> --apiKey <KEY> --schema public
3. Query DB via MCP tools panel.

Usage Notes

Help other developers understand when this MCP works best and where to be careful.

No usage notes provided.

Community field notes and related MCPs load below.