MCP Supabase Server for AI Agent with RAG & Multi-Tenant CRUD
Supabase AI Agent with RAG & Multi-Tenant CRUD
Version: 1.0.0
n8n Version: 1.88.0+
Author: Koresolucoes
License: MIT
Description
A stateful AI agent workflow powered by Supabase and Retrieval-Augmented Generation (RAG). Enables persistent memory, dynamic CRUD operations, and multi-tenant data isolation for AI-driven applications like customer support, task orchestration, and knowledge management.
Key Features:
🧠 RAG Integration: Leverages OpenAI embeddings and Supabase vector search for context-aware responses.
🗃️ Full CRUD: Manage agent_messages, agent_tasks, agent_status, and agent_knowledge in real time.
📤 Multi-Tenant Ready: Supports per-user/organization data isolation via dynamic table names and webhooks.
🔒 Secure: Role-based access control via Supabase Row Level Security (RLS).
Use Cases
Customer Support Chatbots: Persist conversation history and resolve queries using institutional knowledge.
Automated Task Management: Track and update task statuses dynamically.
Knowledge Repositories: Store and retrieve domain-specific information for AI agents.
Instructions
-
Import Template
Go to n8n > Templates > Import from File and upload this workflow. -
Configure Credentials
Add your Supabase and OpenAI API keys under Settings > Credentials. -
Set Up Multi-Tenancy (Optional)
Dynamic Webhook Path**:
Replace the default webhook path with /mcp/tool/supabase/:userId to enable per-user routing.
Table Names**:
Use a Set Node to dynamically generate table names (e.g., agent_messages_{{userId}}). -
Activate & Test
Enable the workflow and send test requests to the webhook URL.
Tags
AI Agent RAG Supabase CRUD Multi-Tenant OpenAI Automation
Screenshots
License
This template is licensed under the MIT License.
Related Templates
Use OpenRouter in n8n versions <1.78
What it is: In version 1.78, n8n introduced a dedicated node to use the OpenRouter service, which lets you to use a lot...
Task Deadline Reminders with Google Sheets, ChatGPT, and Gmail
Intro This template is for project managers, team leads, or anyone who wants to automatically remind teammates of tasks ...
🤖 Build Resilient AI Workflows with Automatic GPT and Gemini Failover Chain
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. How it works This...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments