Provides tools for interacting with Supabase databases, enabling read, create, update, and delete operations on table records with support for filtering, pagination, and column selection.
Supabase MCP Server
A Model Context Protocol (MCP) server that provides tools for interacting with a Supabase database. This server enables AI assistants to perform database operations through a standardized interface.
NOTE: This Supabase MCP server was created as a demonstration of my AI IDE coding workflow. It is still a work in progress which I will expand on in future videos on my channel.
Features
Read Table Rows: Query data from Supabase tables with optional filtering, pagination, and column selection
Create Table Records: Insert new records into Supabase tables
Update Table Records: Modify existing records in Supabase tables based on filters
Delete Table Records: Remove records from Supabase tables based on filters
Prerequisites
Docker or Docker Desktop
Supabase account and project
Installation
Clone the repository:
git clone https://github.com/coleam00/supabase-mcp.git cd supabase-mcp
Docker Setup
Build the Docker image:
docker build -t mcp/supabase .
Usage
Running as an MCP Server with Docker
The Supabase MCP server can be integrated with AI assistants using the Model Context Protocol.
Include the below configuration in your MCP config (in Claude Desktop, Windsurf, etc.)
Be sure to build the container with the installation steps first!
Replace
YOUR-SUPABASE-URLandYOUR-SUPABASE-SERVICE-ROLE-KEYwith your actual Supabase credentials.The AI assistant can now access the Supabase database through the MCP server using the provided tools.
For more information on the Model Context Protocol, visit modelcontextprotocol.io.
Available Tools
Read Table Rows
Example:
Create Table Records
Example:
Update Table Records
Example:
Delete Table Records
Example:
Development
Project Structure
Running Tests
Model Context Protocol Integration
The Supabase MCP server implements the Model Context Protocol, which allows AI assistants to interact with Supabase databases in a standardized way.
How It Works
The MCP server exposes tools for database operations (read, create, update, delete)
AI assistants connect to the MCP server using the stdio transport
The AI assistant can invoke the tools to perform database operations
The MCP server handles the communication with Supabase and returns the results
MCP Configuration
The example_mcp_config.json file shows how to configure an AI assistant to use the Supabase MCP server:
This configuration tells the AI assistant:
To use Docker to run the MCP server
To pass the Supabase credentials as environment variables
To use the
mcp/supabaseDocker image
Using with AI Assistants
AI assistants that support the Model Context Protocol can use this server to:
Query data from Supabase tables
Insert new records into tables
Update existing records
Delete records
The assistant will have access to the tools documented in the "Available Tools" section above.
Environment Variables
Variable | Description |
| URL of your Supabase project |
| Service role key for Supabase authentication |
License
This project is licensed under the MIT License - see the LICENSE file for details.