Back to all days

Day 13 — Auth & Security

Auth & RLS Starter Kit

Audit your auth setup before it becomes a breach. Inspect roles, permissions, RLS policies, and MFA compliance — all through natural language.

An MCP server that models real-world auth configurations across three different project types. Explore role hierarchies, Row Level Security expressions, user access matrices, and run security audits that catch what you missed.

Example Queries

“Show me the auth config for the HealthVault project”
“What permissions does the doctor role have in HealthVault?”
“Are there any tables missing RLS policies in ShopFront?”
“Look up sarah@taskflow.io — what's her role and MFA status?”
“Run a security audit on the TaskFlow SaaS project”
“Show me all failed login attempts across TaskFlow”

Tools

6 MCP Tools

ToolWhat It Does
project_configView project auth configuration — providers, MFA settings, session lifetimes, roles overview, and user/policy counts
role_permissionsExplore role hierarchies and their permissions — grouped by resource with conditions and priority levels
rls_inspectorInspect Row Level Security policies — USING/CHECK expressions, coverage analysis, and unprotected operations
user_accessLook up a user's effective permissions, role, MFA compliance, and recent auth activity
security_auditRun a full security audit — MFA gaps, suspicious logins, overly permissive roles, session risks, and RLS coverage
auth_eventsView auth event logs — sign-ins, failures, role changes, MFA events, and suspicious activity with IP tracking

Demo Projects

3 Auth Configurations

TaskFlow SaaS

Project Management

MFA ON
4roles
5users
6RLS policies

Audit: C (70)

2 users missing MFA, DELETE policies absent

HealthVault Portal

HIPAA Healthcare

MFA ON
4roles
6users
6RLS policies

Audit: B (80)

Conditional permissions, own-record-only access

ShopFront Marketplace

Multi-Vendor E-Commerce

MFA OFF
3roles
5users
7RLS policies

Audit: C (65)

No MFA, missing DELETE/UPDATE RLS policies

Why This Build

Why Auth & RLS?

Auth and Row Level Security are the most silently dangerous parts of any app. Misconfigured RLS policies don't throw errors — they just quietly expose data. A missing DELETE policy means anyone can wipe records. A role with too many permissions becomes a breach waiting to happen.

The problem isn't that teams don't care about security. It's that auditing auth config requires digging through Supabase dashboards, cross-referencing role tables, and mentally tracing policy expressions. Nobody does that regularly.

This server makes auth auditing conversational. Ask “who doesn't have MFA?” or “which tables are missing DELETE policies?” and get instant, actionable answers. Three real project types — SaaS, healthcare, and marketplace — show how auth patterns differ by domain.

Demo Data

What's Inside

3

Projects

11

Roles

43

Permissions

19

RLS Policies

16

Users

17

Auth Events

3 projects spanning SaaS, healthcare (HIPAA), and multi-vendor marketplace. Each has domain-specific roles with hierarchical priorities, granular permissions with conditions, real RLS USING/CHECK expressions, users with MFA enrollment status, and auth event logs including suspicious login attempts.

Setup

Try It Locally

cd day13-auth-rls-kit
npm install && npm run seed && npm run build

Then add the config to Claude Desktop and restart.

Need to audit your auth before it bites you?

If your RLS policies haven't been reviewed since launch and your MFA adoption is “optional,” let's talk.