HomeBack to recipes
RecipesDataFull-Text Search Sync

TL;DR

Full-Text Search Sync is a data workflow that chains Meilisearch + Supabase to automate a common task. Keep Meilisearch in sync with your Supabase tables. Inserts, updates, and deletes are reflected in the search index in real time. Once configured, it saves ~6 hours/week of re-index ops, plus elimination of nightly batch jobs and their failures and runs through Claude Code, Cursor, Windsurf or any MCP-compatible AI agent.

🔎🟢
DataIntermediate

Full-Text Search Sync

Keep Meilisearch in sync with your Supabase tables. Inserts, updates, and deletes are reflected in the search index in real time.

15 min setup, real-time search sync2 MCPs requiredSaves ~6 hours/week of re-index ops, plus elimination of nightly batch jobs and their failures

How it works

🔎Meilisearch
🟢Supabase
Automated
1Listen to Supabase realtime channel for table2On INSERT: add document to Meilisearch index3On UPDATE: update matching document+2 more steps

Partial support — 1 of 2 MCPs hostable

Hosted execution needs every MCP on the whitelist. Use the local CLI for this recipe until the missing MCPs are added.

Not yet hostable:

🔎Meilisearch
mcpizy recipe install meilisearch-supabase-fulltext-sync

Why this combo?

Supabase is your source of truth for structured data; Meilisearch provides the typo-tolerant, millisecond full-text search your users expect. Connecting them via Realtime means your search index is always accurate — no batch re-indexing jobs, no stale results.

Without this workflow

Run a nightly re-index job. Search results are up to 24 hours stale. Users search for something you added this morning and find nothing.

With MCPizy

Every Supabase change syncs to Meilisearch within seconds. Search always reflects the current state of your data.

Business value

Concrete ROI — not marketing fluff.

Time saved

~6 hours/week of re-index ops, plus elimination of nightly batch jobs and their failures

  • Removes 'why can't I find what I just posted?' bug reports — search trust stays high, retention improves
  • E-commerce: new inventory is searchable instantly — captures impulse purchases that stale indexes lose
  • Zero-downtime search: no nightly re-index outage window, ops team gets their evenings back
  • Replaces Algolia at 10-20% of the cost for teams already on Supabase — saves $500-5000/month at scale

Workflow steps

  1. 1
    Listen to Supabase realtime channel for table
  2. 2
    On INSERT: add document to Meilisearch index
  3. 3
    On UPDATE: update matching document
  4. 4
    On DELETE: remove document from index
  5. 5
    Log sync events and handle failures with retry

Use cases

  • Keep an e-commerce product search index fresh as inventory changes
  • Real-time search over user-generated content as it's posted
  • Sync document edits to search index so the latest version is always findable
  • Remove deleted records from search immediately without a re-index

MCPs required

🔎

Meilisearch

Meilisearch MCP Server

View
🟢

Supabase

Supabase MCP Server

View

Agent prompt (copy into Claude Code)

This prompt is the workflow. Paste into Claude Code, Cursor, or Windsurf.

You are a search-index sync agent. Subscribes to Supabase Realtime for configured tables.

Setup: read sync-config.yaml (table → meilisearch_index → transform_fn).

On each realtime event:
1. INSERT: transform row → meilisearch.add_documents(index, [doc]) with primary_key
2. UPDATE: meilisearch.update_documents(index, [doc]) — partial update of changed fields only
3. DELETE: meilisearch.delete_document(index, primary_key)

If Meilisearch returns 4xx/5xx:
- Buffer failed ops to Supabase table sync_queue with retry_after timestamp
- Retry every 60s with exponential backoff (max 10 retries)

Weekly reconciliation: call supabase.execute_sql to get row counts per table, compare with meilisearch.get_stats(index). If drift > 0.5%, trigger full re-index.

Trigger & credentials

How this workflow fires and what env vars you need.

.env.example
Event-drivenTrigger
Supabase Realtime: postgres_changes on configured tables (INSERT, UPDATE, DELETE)
🔎Meilisearch· 2 vars
MEILISEARCH_HOST

Meilisearch server URL

e.g. https://ms-xyz.meilisearch.io

MEILISEARCH_API_KEYGet key

Admin API key

e.g. masterKey...

🟢Supabase· 2 vars
SUPABASE_URLGet key

Project URL

e.g. https://abcd.supabase.co

SUPABASE_SERVICE_ROLE_KEYGet key

Service role key for realtime subscriptions

e.g. eyJhbGci...

One-command deploy

Install everything — MCPs, prompt, env template — in a single call.

$ mcpizy recipe install meilisearch-supabase-fulltext-sync

✓ Installs all 2 MCP servers
✓ Writes prompt to ~/.mcpizy/prompts/meilisearch-supabase-fulltext-sync.md
✓ Generates .env.example in current directory
✓ Ready to paste into Claude Code

Requires mcpizy CLI v1.1+ — install via npm i -g mcpizy.

Quick install (MCPs only)

15 min setup, real-time search sync
$ mcpizy install meilisearch && mcpizy install supabase

More Data recipes

🔥🟢

Web Scraping to Database

Schedule a Firecrawl scrape of any website and store the structured results directly in a Supabase table for analysis.

🔍🟢

Search Results Indexing

Run Tavily searches on scheduled topics and index the results in Supabase for trend analysis and content research.

🔴🟢

Cache Invalidation Pipeline

When a Supabase row changes, the corresponding Redis cache key is automatically invalidated to keep your API fresh.

🕸️🐙

Knowledge Graph from Code

Parse your GitHub repos and build a Neo4j knowledge graph of files, functions, imports, and authors for code intelligence.

Frequently asked questions

What is this workflow?

Full-Text Search Sync is a data automation that uses Meilisearch + Supabase together via the Model Context Protocol. Keep Meilisearch in sync with your Supabase tables. Inserts, updates, and deletes are reflected in the search index in real time.

How long does setup take?

Setup takes around 15 min setup, real-time search sync. You install the required MCP servers with `mcpizy install meilisearch && mcpizy install supabase`, connect your accounts, and the workflow is ready to run.

How much time does this workflow save?

Once running, this workflow saves ~6 hours/week of re-index ops, plus elimination of nightly batch jobs and their failures. The concrete business value: Removes 'why can't I find what I just posted?' bug reports — search trust stays high, retention improves; E-commerce: new inventory is searchable instantly — captures impulse purchases that stale indexes lose.

Which MCP servers do I need for this?

You need 2 MCP servers: Meilisearch (mcpizy install meilisearch), Supabase (mcpizy install supabase). All are installable in one command via the MCPizy CLI and configured in your `.claude.json` or `.cursor/mcp.json`.

Does this work with Claude Code, Cursor, and Windsurf?

Yes. The workflow runs with any MCP-compatible AI agent — Claude Code, Claude Desktop, Cursor, Windsurf, VS Code with Copilot, and custom agents built on the MCP SDK. The MCP servers are identical across clients; only the config file path (`.claude.json` vs `.cursor/mcp.json`) changes.

Start building this workflow

Install the required MCPs from the marketplace and automate this in 15 min setup.

$ mcpizy install meilisearch && mcpizy install supabase

🔎Install Meilisearch🟢Install Supabase

Free to install. Connect your accounts and this workflow runs itself.