# MCP Supabase server for AI agent with RAG: n8n workflow

> Started by an event in a connected app, and works across Supabase vectors. It puts OpenAI behind a retrieval step, so answers are drawn from documents you...

Source: https://millionrounds.com/workflow/mcp-supabase-server-for-ai-agent-with-rag (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [AI assistants](https://millionrounds.com/workflows?category=AI+assistants#library)

# MCP Supabase server for AI agent with RAG

Started by an event in a connected app, and works across Supabase vectors. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 23 steps: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fmcp-supabase-server-for-ai-agent-with-rag)

**23 steps** Large: read it before trusting it with anything live

**0** Branches: places the flow splits

**0** Loops or waits

**1** Service it connects to

## The flow

Starts it 1 Model 2 Service 20

The steps in the order they run, from what starts it.

- 1 **Embeddings OpenAI** Embeddings Open Ai *Model*
- 2 **DELETE_ROW_INSCRICOES_CURSOS** Supabase Tool *Service*
- 3 **GET_ROW_AGENT_MESSAGE** Supabase Tool *Service*
- 4 **CREATE_ROW_AGENT_MESSAGE** Supabase Tool *Service*
- 5 **DELETE_ROW_AGENT_MESSAGE** Supabase Tool *Service*
- 6 **UPDATE_ROW_AGENT_MESSAGE** Supabase Tool *Service*
- 7 **GET_MANY_ROW_AGENT_MESSAGE** Supabase Tool *Service*
- 8 **CREATE_ROW_AGENT_TASKS** Supabase Tool *Service*
- 9 **GET_ROW_AGENT_TASKS** Supabase Tool *Service*
- 10 **DELETE_ROW_AGENT_TASKS** Supabase Tool *Service*
- 11 **UPDATE_ROW_AGENT_TASKS** Supabase Tool *Service*
- 12 **GET_MANY_ROW_AGENT_TASKS** Supabase Tool *Service*
- 13 **CREATE_ROW_AGENT_STATUS** Supabase Tool *Service*
- 14 **GET_ROW_AGENT_STATUS** Supabase Tool *Service*
- 15 **DELETE_ROW_AGENT_STATUS** Supabase Tool *Service*
- 16 **UPDATE_ROW_AGENT_STATUS** Supabase Tool *Service*
- 17 **GET_MANY_ROW_AGENT_STATUS** Supabase Tool *Service*
- 18 **CREATE_ROW_AGENT_KNOWLEDGE** Supabase Tool *Service*
- 19 **GET_ROW_AGENT_KNOWLEDGE** Supabase Tool *Service*
- 20 **UPDATE_ROW_INSCRICOES_AGENT_KNOWLEDGE** Supabase Tool *Service*
- 21 **GET_MANY_ROW_AGENT_KNOWLEDGE** Supabase Tool *Service*
- 22 **RAG** Vector Store Supabase *Model*
- 23 **MCP_SUPABASE** Mcp trigger *Starts it*

## How it's built

- **Starts on:** An event in a connected app
- **Steps:** 23
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Supabase vectors
- **Model:** OpenAI
- **Retrieval:** Answers are drawn from documents you supply, not from the model alone

## Questions

What does it need to run?

An n8n account, plus your own Supabase vectors account, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an event in a connected app.

Does it use AI?

Yes. It calls OpenAI. Its answers draw on documents you give it, not on the model alone. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 23 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 23 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fmcp-supabase-server-for-ai-agent-with-rag)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Supabase vectors](https://millionrounds.com/workflows?service=Supabase+vectors#library)

## Workflows like it

Also ai assistants, with the same services where possible, closest in size first.

- [**Build a product catalog chatbot with Mistral and Google Drive** 23 steps · calls a model · Google Drive, Supabase vectors](https://millionrounds.com/workflow/build-a-product-catalog-chatbot-with-mistral-and-google-driv)
- [**Ultimate RAG system (Query data and tables) with Claude** 21 steps · calls a model · Pinecone, Supabase vectors](https://millionrounds.com/workflow/ultimate-rag-system-query-data-and-tables-with-claude)
- [**Index and update web knowledge base with Jina and Gemini** 20 steps · calls a model · Supabase vectors, n8n data table](https://millionrounds.com/workflow/index-and-update-web-knowledge-base-with-jina-and-gemini)
- [**AI voice & text note-taking with LINE Messaging** 27 steps · calls a model · Gmail, Supabase vectors](https://millionrounds.com/workflow/ai-voice-and-text-note-taking-with-line-messaging)
- [**Build an advanced multi-query RAG system with Supabase** 18 steps · calls a model · Supabase vectors](https://millionrounds.com/workflow/build-an-advanced-multi-query-rag-system-with-supabase)
- [**Build a Placetel RAG voice assistant with Google Drive** 16 steps · calls a model · Google Drive, Supabase vectors](https://millionrounds.com/workflow/build-a-placetel-rag-voice-assistant-with-google-drive)
