Meelu

Segment your customers with RFM and clustering

Stop treating a thousand customers as one audience. Find the groups that are actually in the data.

RFM sorts customers by how recently and often they buy and how much they spend. Clustering finds groups you did not think to look for. Both are built in.

Run this with your AI assistant

meelu-analytics-mcp is a free, open source MCP server that runs on your machine. One command installs it and configures your assistant.

The problem

Why this is hard to answer today

One message to your whole customer list is written for an average customer who does not exist, and it underperforms for everybody.

  • Segmenting by hand means picking thresholds you invented and defending them later.
  • The obvious cut — big spenders versus small — misses that someone who spent a lot two years ago is a different problem from someone spending steadily now.
  • Groups you did not think to look for stay invisible, which is precisely what makes them worth finding.

The solution

What the engine does instead

Two approaches, both built in. RFM when you want the standard, interpretable framework. Clustering when you want to find out what is actually there.

  • RFM segments — recency, frequency and monetary value — computed from raw transactions.
  • Clustering that finds natural groups without you choosing the boundaries.
  • Each group described so you can tell what makes it distinct, rather than being handed “cluster 3”.
  • Market basket analysis alongside, for what tends to get bought together.

Built on Clustering & dimensionality reduction, one of nine tool categories in the server.

How it works

Step by step

  1. Step 1

    Export transactions or customers

    Transaction-level rows are ideal — recency and frequency can be derived from them. A per-customer summary works too if that is what you have.

    orders.csv
    order_id,customer_id,order_date,amount,items
    ORD_9001,CUST_001,2026-08-14,240.00,3
    ORD_9002,CUST_002,2025-02-03,89.50,1
    ORD_9003,CUST_001,2026-09-02,410.00,5
  2. Step 2

    Install the MCP server

    Install meelu-analytics-mcp once, then restart your assistant. The install page has the one command and the README covers the rest.

  3. Step 3

    Ask for segments

    Ask for both cuts. They answer different questions and disagreeing with each other is informative.

    In your assistant
    Using meelu, load ~/Downloads/orders.csv and segment my
    customers with RFM. Then separately, find any natural
    groups in the data and describe what makes each distinct.
    Do the two ways of cutting it agree?

Example output

What comes back

Shape of an answer — illustrative numbers, real structure.

RFM segments (1,847 customers)

  Segment           n     Recency  Freq   Value
  Champions       164     12 days   18   $4,200
  Loyal           291     31 days    9   $1,850
  At risk         203    118 days   11   $2,400
  Hibernating     512    241 days    3     $290
  New             677     19 days    1     $140

Clustering found 3 natural groups, which cut differently:
  the largest splits "Hibernating" into people who bought
  once and left, and people who bought steadily for a
  year then stopped. Same RFM label, different problem.

Trust: high — 1,847 customers, 9,340 orders.
  • Where RFM and clustering disagree is usually the interesting part. A single label covering two different stories is a segment worth splitting.
  • “At risk” is the segment with money on the table — customers who buy often and spent well, who have gone quiet recently.

In practice

Who asks this

Ecommerce operator

One newsletter to the whole list, and open rates falling.

Send the win-back to hibernating customers and the new-arrival message to champions, rather than one message that suits neither.

B2B marketer

You need account tiers for a named-account programme.

Let the clustering propose the tiers from the data instead of arguing about thresholds in a meeting.

Anyone with a product catalogue

You want to know what sells alongside what.

Market basket analysis is in the same toolset, so the bundle question and the segment question get answered in one session.

FAQ

Common questions

What is customer segmentation?

Customer segmentation is dividing your customers into groups that behave alike, so you can treat each group differently. Useful segments share something that changes what you should do: how much they spend, how often they buy, what they use the product for, or how likely they are to leave. A segmentation that produces groups you would market to identically has not earned its keep.

What is RFM segmentation?

RFM scores every customer on three things — how recently they bought, how often they buy, and how much they have spent — then groups them by the combination. Each dimension is usually cut into quintiles, giving scores from 1 to 5, and the combinations form named groups such as champions, loyal customers, at risk and hibernating. It is decades old, needs only three columns, and stays interpretable in a way that clustering output often does not.

What are the main types of customer segmentation?

Four are in common use. Demographic and firmographic, based on who the customer is. Geographic, based on where they are. Behavioural, based on what they do — purchases, usage, engagement. And needs-based, grouped by the job they are trying to get done. Behavioural segmentation usually predicts the most, because what people do beats what they look like on paper.

How many customer segments should you have?

Few enough that each one gets a different action. Three to seven works for most businesses; beyond that the groups stop being distinguishable and nobody remembers them. The right test is not statistical neatness but whether you would send a different message, offer a different price or build a different feature for each group.

RFM or clustering — which is better?

Use both and compare them. RFM gives named groups everyone in the room understands immediately and can act on the same day. Clustering finds structure you did not specify, including groups that cut across the RFM labels. Where the two disagree is usually where the interesting customers are.

Keep going

Related use cases

Try customer segmentation on your own data

Install meelu-analytics-mcp once and every use case on this site is available to your assistant — it is one server with forty-five tools, not six separate products.

Meelu Analytics MCP is part of Meelu, a desktop app in development where an AI marketing agent runs your marketing on your own machine. Join the waitlist