HomeBack to recipes
RecipesMonitoringDatabase Change Alerts

TL;DR

Database Change Alerts is a monitoring workflow that chains Slack + Supabase to automate a common task. Get a Slack alert whenever a critical Supabase table row is created, updated, or deleted — ideal for audit trails. Once configured, it saves ~3 hours/week, plus massive reduction in forensic investigation time when incidents occur and runs through Claude Code, Cursor, Windsurf or any MCP-compatible AI agent.

💬🟢
MonitoringBeginner

Database Change Alerts

Get a Slack alert whenever a critical Supabase table row is created, updated, or deleted — ideal for audit trails.

5 min setup, real-time audit trail2 MCPs requiredSaves ~3 hours/week, plus massive reduction in forensic investigation time when incidents occur

How it works

💬Slack
🟢Supabase
Automated
1Enable Supabase realtime for target table2Subscribe to INSERT / UPDATE / DELETE events3Format change summary (old → new)+2 more steps
Hostable — runs in your browser2/2 MCPs hosted

Run with MCPizy

New

Execute this recipe in your browser — no local install, no Claude Code. Streams results live.

Whitelisted MCPs: perplexity, notion, anthropic, openai, tavily, firecrawl, coingecko, stripe, slack, github, gitlab, linear, resend, sendgrid, elevenlabs, shopify, sentry, posthog, supabase-mcp, context7, deepwiki~4k tokens  ·  ~$0.012 est.

Why this combo?

Supabase Realtime fires on every row change with full before/after values; Slack delivers those changes to whoever needs to know instantly. For compliance-sensitive tables like billing, permissions, or user accounts, this combo creates a real-time audit trail that lives in your team chat.

Without this workflow

Critical row changed. Nobody noticed. Discovered in a quarterly audit. No record of who changed it or when.

With MCPizy

Every critical change posts to #db-alerts with old and new values. Complete audit trail in Slack history.

Business value

Concrete ROI — not marketing fluff.

Time saved

~3 hours/week, plus massive reduction in forensic investigation time when incidents occur

  • Cuts incident forensics from 4+ hours to 10 minutes — Slack history is the audit log, fully searchable
  • De-risks insider threat: every admin action on billing/permissions is visible to the team in real-time
  • Simplifies SOC2/GDPR compliance — demonstrable audit trail without buying a $20k/year audit tool
  • Catches buggy deploys that silently corrupt data — team sees anomalous UPDATE patterns within minutes

Workflow steps

  1. 1
    Enable Supabase realtime for target table
  2. 2
    Subscribe to INSERT / UPDATE / DELETE events
  3. 3
    Format change summary (old → new)
  4. 4
    Post to #db-alerts Slack channel
  5. 5
    Throttle to prevent alert storms

Use cases

  • Alert when user role or permissions change in the database
  • Monitor billing table for unexpected changes or deletions
  • Track configuration table changes that affect production behavior
  • Compliance audit trail for GDPR-sensitive tables

MCPs required

💬

Slack

Slack 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 database-audit agent. Subscribes to Supabase Realtime for critical tables.

For each event on tables in audit-tables.yaml (billing, user_roles, api_keys, settings):
1. Format an audit message:
   - :pencil2: UPDATE on ${table} (id=${id}) by ${actor}
   - Changed: field1: old → new, field2: old → new (diff)
   - Context: updated_at, updated_by, request_id
2. Call slack.send_message(channel="#db-alerts", blocks=[...]) with a structured block:
   - header: action emoji + table
   - section: actor + changed fields as key:value pairs
   - actions: [View record in admin] [View user]
3. Throttle: if >10 events/min on same table, batch into one digest message

For DELETEs on billing/user_roles, also mention @oncall in the message.

Trigger & credentials

How this workflow fires and what env vars you need.

.env.example
Event-drivenTrigger
Supabase Realtime: postgres_changes on audit tables (INSERT, UPDATE, DELETE)
💬Slack· 2 vars
SLACK_BOT_TOKENGet key

Slack bot OAuth token with chat:write

e.g. xoxb-...

SLACK_DB_ALERTS_CHANNEL

Target channel for DB audit events

e.g. #db-alerts

🟢Supabase· 2 vars
SUPABASE_URLGet key

Project URL

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

SUPABASE_SERVICE_ROLE_KEYGet key

Service role key

e.g. eyJhbGci...

One-command deploy

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

$ mcpizy recipe install slack-supabase-db-alerts

✓ Installs all 2 MCP servers
✓ Writes prompt to ~/.mcpizy/prompts/slack-supabase-db-alerts.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)

5 min setup, real-time audit trail
$ mcpizy install slack && mcpizy install supabase

More Monitoring recipes

🐛💬

Error Alerting Pipeline

Sentry new issues are de-duplicated, enriched with commit info, and routed to the right Slack channel based on project.

🐘📊

Database Monitoring Dashboard

Stream Postgres metrics — query latency, lock waits, vacuum stats — into Grafana for a live operations dashboard.

📊💬

Alert Routing from Grafana

Grafana alerts are enriched with runbook links and routed to the correct Slack channel based on severity and team labels.

🟡📊

Analytics Dashboard

Connect ClickHouse to Grafana to build real-time analytics dashboards over billions of events with sub-second query times.

Frequently asked questions

What is this workflow?

Database Change Alerts is a monitoring automation that uses Slack + Supabase together via the Model Context Protocol. Get a Slack alert whenever a critical Supabase table row is created, updated, or deleted — ideal for audit trails.

How long does setup take?

Setup takes around 5 min setup, real-time audit trail. You install the required MCP servers with `mcpizy install slack && 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 ~3 hours/week, plus massive reduction in forensic investigation time when incidents occur. The concrete business value: Cuts incident forensics from 4+ hours to 10 minutes — Slack history is the audit log, fully searchable; De-risks insider threat: every admin action on billing/permissions is visible to the team in real-time.

Which MCP servers do I need for this?

You need 2 MCP servers: Slack (mcpizy install slack), 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 5 min setup.

$ mcpizy install slack && mcpizy install supabase

💬Install Slack🟢Install Supabase

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