Day 15 — ML Engineering
Your best customers don't leave without warning. You're just not listening.
An ML-powered MCP server that computes churn risk scores from usage patterns, billing signals, and support history. It doesn't just tell you who's at risk — it tells you why and what to do about it.
Example Queries
Tools
| Tool | What It Does |
|---|---|
| customer_overview | Search customers by name, company, plan, status, or industry. Returns profile info with current churn risk score. |
| churn_risk_score | Detailed churn risk breakdown for a customer — usage, billing, support, and engagement signal scores with contributing factors. |
| at_risk_cohort | List all customers sorted by churn risk. Filter by risk level or minimum score. Shows revenue at risk. |
| usage_trends | Weekly usage patterns — logins, API calls, features used, active users, session time. Shows trend direction. |
| intervention_recommendations | Recommended actions for at-risk customers based on their churn risk factors. Prioritized by impact with assigned owners. |
| pipeline_summary | Executive dashboard — risk distribution, revenue at risk, average scores by plan, and recent churn. |
The Model
Each customer gets a 0–100 churn risk score computed from four weighted signal categories:
Login decline, API usage drop, low feature adoption
Failed payments, downgrades, cancellation requests, discount asks
Ticket volume, low satisfaction scores, escalations, open issues
Days since last login, account age, activity recency
0–24 Low • 25–44 Medium • 45–69 High • 70–100 Critical
Why This Build
Churn is the silent killer of SaaS companies. By the time a customer asks to cancel, the relationship has been deteriorating for weeks or months. The signals were there — declining logins, failed payments, frustrated support tickets — but nobody connected the dots.
Most companies track these metrics in separate dashboards. Usage in one tool, billing in another, support in a third. The insight lives in the intersection, but nobody has time to cross-reference three systems for every customer.
This pipeline does the cross-referencing automatically. It scores every customer across four signal categories, ranks them by risk, and recommends specific interventions with assigned owners. Ask “who's about to churn?” and get an answer with revenue impact — not a Jira ticket to investigate later. First ML Engineering build of the challenge.
Demo Data
15
Customers
108
Usage Snapshots
25
Billing Events
21
Support Tickets
5
Risk Profiles
8
Weeks of Data
15 SaaS customers across starter, pro, and enterprise plans with 8 weeks of usage snapshots. Includes healthy accounts, declining users, billing risk, support-heavy accounts, critical churn candidates, and two recently churned customers for comparison. Edge cases: cliff-drop usage, serial payment failures, and a customer who already requested cancellation.
Setup
cd day15-churn-prediction
npm install && npm run seed && npm run buildThen add the config to Claude Desktop and restart.
If your customer success team is firefighting cancellations instead of preventing them, let's build something smarter.