supabase-mcp

coleam00/supabase-mcp

3.9

supabase-mcp is hosted online, so all tools can be tested directly either in theInspector tabor in theOnline Client.

If you are the rightful owner of supabase-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

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.

Try supabase-mcp with chat:

Tools

Functions exposed to the LLM to take actions

read_table_rows

Read rows from a Supabase table with optional filtering, ordering, and limiting.

Use this tool to query data from a specific table in the Supabase database.
You can select specific columns, filter rows based on conditions, limit the number
of results, and order the results.

Args:
    ctx: The MCP context
    table_name: Name of the table to read from
    columns: Comma-separated list of columns to select (default: "*" for all columns)
    filters: Dictionary of column-value pairs to filter rows (default: None)
    limit: Maximum number of rows to return (default: None)
    order_by: Column to order results by (default: None)
    ascending: Whether to sort in ascending order (default: True)
    
Returns:
    List of dictionaries, each representing a row from the table
    
Example:
    To get all users: read_table_rows(table_name="users")
    To get specific columns: read_table_rows(table_name="users", columns="id,name,email")
    To filter rows: read_table_rows(table_name="users", filters={"is_active": True})
    To limit results: read_table_rows(table_name="users", limit=10)
    To order results: read_table_rows(table_name="users", order_by="created_at", ascending=False)

create_table_records

Create one or multiple records in a Supabase table.

Use this tool to insert new data into a specific table in the Supabase database.
You can insert a single record or multiple records at once.

Args:
    ctx: The MCP context
    table_name: Name of the table to insert records into
    records: A dictionary for a single record or a list of dictionaries for multiple records
    
Returns:
    Dictionary containing the created records and metadata
    
Example:
    To create a single record:
        create_table_records(
            table_name="users",
            records={"name": "John Doe", "email": "john@example.com"}
        )
        
    To create multiple records:
        create_table_records(
            table_name="users",
            records=[
                {"name": "John Doe", "email": "john@example.com"},
                {"name": "Jane Smith", "email": "jane@example.com"}
            ]
        )

update_table_records

Update records in a Supabase table that match the specified filters.

Use this tool to modify existing data in a specific table in the Supabase database.
You provide the new values and filter conditions to identify which records to update.

Args:
    ctx: The MCP context
    table_name: Name of the table to update records in
    updates: Dictionary of column-value pairs with the new values
    filters: Dictionary of column-value pairs to filter which rows to update
    
Returns:
    Dictionary containing the updated records and metadata
    
Example:
    To update all active users' status:
        update_table_records(
            table_name="users",
            updates={"status": "premium"},
            filters={"is_active": True}
        )

delete_table_records

Delete records from a Supabase table that match the specified filters.

Use this tool to remove data from a specific table in the Supabase database.
You provide filter conditions to identify which records to delete.

Args:
    ctx: The MCP context
    table_name: Name of the table to delete records from
    filters: Dictionary of column-value pairs to filter which rows to delete
    
Returns:
    Dictionary containing the deleted records and metadata
    
Example:
    To delete inactive users:
        delete_table_records(
            table_name="users",
            filters={"is_active": False}
        )

Prompts

Interactive templates invoked by user choice

No prompts

Resources

Contextual data attached and managed by the client

No resources