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

# Connect the Supabase MCP server

> Connect Supabase's remote MCP server to Spojit with OAuth or a personal access token, scoped to one project and read-only mode for safety.

Supabase hosts a remote MCP server for managing projects: querying and changing the database, reading configuration, working with edge functions, and searching the docs. Connect it to Spojit to run reporting queries on a schedule or inspect a project from an agent.

<Note>
  Spojit connects to this server through a [custom MCP server](/connectors/remote-mcp-servers/custom) connection, so you add it with **Add custom server** rather than from the connector catalog. Supabase maintains it and decides which tools it offers; see [Supabase's MCP documentation](https://supabase.com/docs/guides/getting-started/mcp) for the current list.
</Note>

<Warning>
  Supabase recommends MCP as a development tool. Avoid production data where you can; when you must connect to production, scope the connection to one project and turn on read-only mode.
</Warning>

## Before you start

* A Supabase account with access to the project. Find the project ref in your project URL (`https://supabase.com/dashboard/project/<project_ref>`).

## Server URL

Start from the base URL and add query parameters:

```
https://mcp.supabase.com/mcp?project_ref=<project_ref>&read_only=true
```

| Parameter           | Effect                                                                                                |
| ------------------- | ----------------------------------------------------------------------------------------------------- |
| `project_ref=<id>`  | Limits the connection to one project. Without it, the server can reach every project in your account. |
| `read_only=true`    | Runs SQL as a read-only Postgres user and disables tools that change data.                            |
| `features=<groups>` | Enables only the listed tool groups, for example `features=database,docs`.                            |

## Connect in Spojit

<Steps>
  <Step title="Add a custom server">
    Go to **Connections** and click **Add custom server**. Enter a **Name** such as `Supabase (read-only)` and paste the **Server URL** with your parameters.
  </Step>

  <Step title="Keep Auto authentication">
    Leave **Authentication** on **Auto**, choose a visibility, and click **Save & connect**.
  </Step>

  <Step title="Approve access in Supabase">
    Supabase opens its authorization page. Sign in and approve. Spojit marks the connection **Connected** and refreshes the token automatically.
  </Step>
</Steps>

### Alternative: a personal access token

For unattended workflows, Supabase accepts a personal access token created in the access tokens section of your Supabase dashboard. In Spojit choose **Token**, paste the token, keep **Header name** `Authorization` and **Prefix** `Bearer`, and click **Add**.

## Use it in a workflow

Add a **Connector** node, pick your Supabase server under **Custom Servers**, and choose **Agent Mode** or **Direct Mode**. See [Use a custom server in a workflow](/connectors/remote-mcp-servers/custom#use-a-custom-server-in-a-workflow).

## Troubleshooting

<AccordionGroup>
  <Accordion title="Write tools are missing">
    The URL includes `read_only=true`. Add a separate connection without it if a workflow really needs to change data.
  </Accordion>

  <Accordion title="Tools ask which project to use">
    Add `project_ref=<id>` to the URL so the connection targets one project.
  </Accordion>
</AccordionGroup>

## Learn more

* [Supabase MCP server](https://supabase.com/docs/guides/getting-started/mcp)

<Snippet file="start-free.mdx" />
