> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modulex.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Supabase Integration for AI Agents & Workflows

> Open-source Firebase alternative providing a Postgres database, authentication, instant APIs, and realtime subscriptions

{/* Self-hosted logo — build-time vendored from modulex.json / Iconify (see scripts/lib/logo.js). */}

<img src="https://mintcdn.com/modulexaillc/df8MOr-hXotYLTh5/logos/supabase.svg?fit=max&auto=format&n=df8MOr-hXotYLTh5&q=85&s=36909190c26ab142309a1d7d48c00c57" alt="Supabase logo" width="72" height="72" data-path="logos/supabase.svg" />

## Overview

Add **Supabase** to any ModuleX agent or workflow. Open-source Firebase alternative providing a Postgres database, authentication, instant APIs, and realtime subscriptions via the Supabase PostgREST API (`https://<subdomain>.supabase.co/rest/v1/`).

<Info>
  **Categories**: Databases · Database · Backend · Developer Tools & Infrastructure · **Auth**: Supabase Service Key · **Actions**: 8
</Info>

## Authentication

### Supabase Service Key

Authenticate using your Supabase project subdomain and service role key

<Steps>
  <Step title="Step 1">
    Go to [https://app.supabase.com](https://app.supabase.com) and open your project
  </Step>

  <Step title="Step 2">
    Navigate to Project Settings > API
  </Step>

  <Step title="Step 3">
    Copy your Project URL subdomain (the part before .supabase.co)
  </Step>

  <Step title="Step 4">
    Copy the service\_role key (NOT the anon key)
  </Step>

  <Step title="Step 5">
    Paste both values below
  </Step>
</Steps>

#### Required Credentials

| Field             | Description                                                                        | Required | Format                                    |
| ----------------- | ---------------------------------------------------------------------------------- | -------- | ----------------------------------------- |
| Project Subdomain | Your Supabase project subdomain (the part before .supabase.co in your project URL) | Yes      | `abcdefghijklmnopqrst`                    |
| Service Role Key  | Your Supabase service\_role key from Project Settings > API                        | Yes      | `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...` |

## Available Actions

<AccordionGroup>
  <Accordion title="select_row — Select row(s) from a Supabase database table with optional filtering and ordering">
    ### Parameters

    <ResponseField name="table" type="string" required>
      Name of the table to query
    </ResponseField>

    <ResponseField name="column" type="string">
      Column name to filter by (required if filter and value are provided)
    </ResponseField>

    <ResponseField name="filter" type="string">
      Filter operator: eq, neq, gt, gte, lt, lte, like, ilike
    </ResponseField>

    <ResponseField name="value" type="string">
      Value to filter the column by
    </ResponseField>

    <ResponseField name="order_by" type="string" required>
      Column name to order results by
    </ResponseField>

    <ResponseField name="sort_order" type="string">
      Sort direction: ascending or descending (Default: `ascending`)
    </ResponseField>

    <ResponseField name="max" type="integer">
      Maximum number of rows to return (Default: `20`)
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "data": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "title": "Data",
          "type": "array"
        },
        "count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Count"
        },
        "status": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Status"
        },
        "status_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Status Text"
        }
      },
      "required": [
        "success"
      ],
      "title": "SelectRowOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="insert_row — Insert a new row into a Supabase database table">
    ### Parameters

    <ResponseField name="table" type="string" required>
      Name of the table to insert into
    </ResponseField>

    <ResponseField name="data" type="object" required>
      Column names and values as key/value pairs for the new row
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "data": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "title": "Data",
          "type": "array"
        },
        "status": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Status"
        },
        "status_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Status Text"
        }
      },
      "required": [
        "success"
      ],
      "title": "InsertRowOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="update_row — Update row(s) in a Supabase database table matching a column value">
    ### Parameters

    <ResponseField name="table" type="string" required>
      Name of the table to update
    </ResponseField>

    <ResponseField name="column" type="string" required>
      Column name to match rows for update
    </ResponseField>

    <ResponseField name="value" type="string" required>
      Value to match in the specified column
    </ResponseField>

    <ResponseField name="data" type="object" required>
      Column names and new values as key/value pairs
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "data": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "title": "Data",
          "type": "array"
        },
        "status": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Status"
        },
        "status_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Status Text"
        }
      },
      "required": [
        "success"
      ],
      "title": "UpdateRowOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="upsert_row — Insert a row or update it if it already exists in a Supabase database table">
    ### Parameters

    <ResponseField name="table" type="string" required>
      Name of the table to upsert into
    </ResponseField>

    <ResponseField name="data" type="object" required>
      Column names and values as key/value pairs
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "data": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "title": "Data",
          "type": "array"
        },
        "status": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Status"
        },
        "status_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Status Text"
        }
      },
      "required": [
        "success"
      ],
      "title": "UpsertRowOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="delete_row — Delete row(s) from a Supabase database table matching a column value">
    ### Parameters

    <ResponseField name="table" type="string" required>
      Name of the table to delete from
    </ResponseField>

    <ResponseField name="column" type="string" required>
      Column name to match rows for deletion
    </ResponseField>

    <ResponseField name="value" type="string" required>
      Value to match in the specified column
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "data": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "title": "Data",
          "type": "array"
        },
        "status": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Status"
        },
        "status_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Status Text"
        }
      },
      "required": [
        "success"
      ],
      "title": "DeleteRowOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="batch_insert_rows — Insert multiple rows into a Supabase database table at once">
    ### Parameters

    <ResponseField name="table" type="string" required>
      Name of the table to insert rows into
    </ResponseField>

    <ResponseField name="data" type="array" required>
      Array of objects, each representing a row with column names and values as key/value pairs
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "data": {
          "items": {
            "additionalProperties": true,
            "type": "object"
          },
          "title": "Data",
          "type": "array"
        },
        "status": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Status"
        },
        "status_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Status Text"
        }
      },
      "required": [
        "success"
      ],
      "title": "BatchInsertRowsOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="remote_procedure_call — Call a Postgres function (RPC) in a Supabase database">
    ### Parameters

    <ResponseField name="function_name" type="string" required>
      Name of the Postgres function to call
    </ResponseField>

    <ResponseField name="args" type="object">
      Arguments to pass to the function as key/value pairs
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "data": {
          "default": null,
          "title": "Data"
        },
        "status": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Status"
        },
        "status_text": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Status Text"
        }
      },
      "required": [
        "success"
      ],
      "title": "RemoteProcedureCallOutput",
      "type": "object"
    }
    ```
  </Accordion>

  <Accordion title="count_rows — Count rows in a Supabase database table with optional filtering">
    ### Parameters

    <ResponseField name="table" type="string" required>
      Name of the table to count rows from
    </ResponseField>

    <ResponseField name="column" type="string">
      Column name to filter by (optional)
    </ResponseField>

    <ResponseField name="filter" type="string">
      Filter operator: eq, neq, gt, gte, lt, lte, like, ilike
    </ResponseField>

    <ResponseField name="value" type="string">
      Value to filter the column by
    </ResponseField>

    ### Response

    ```json theme={null}
    {
      "additionalProperties": false,
      "properties": {
        "success": {
          "title": "Success",
          "type": "boolean"
        },
        "error": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Error"
        },
        "count": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Count"
        }
      },
      "required": [
        "success"
      ],
      "title": "CountRowsOutput",
      "type": "object"
    }
    ```
  </Accordion>
</AccordionGroup>

## Limits & Quotas

* **Free tier**: 500 MB database, 2 GB bandwidth, 50 MB file storage.
* **Pro tier**: 8 GB database, 250 GB bandwidth, 100 GB file storage.
* **Rate limits**: Supabase does not publish hard API rate limits; PostgREST is limited by connection pool size (default: 60 connections on free tier, higher on paid plans).
* **Error model**: non-2xx responses and timeouts are caught and returned as `success=False` + `error` rather than raising.

## Related integrations

<CardGroup cols={3}>
  <Card title="MySQL" href="/integrations/tools/mysql" />

  <Card title="PostgreSQL" href="/integrations/tools/postgresql" />

  <Card title="Snowflake" href="/integrations/tools/snowflake" />
</CardGroup>

## Links

* [Supabase](https://supabase.com)
