Labsco
petrmasa logo

key-drivers-mcp

from petrmasa

MCP server for key driver and feature importance analysis based on rule mining

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup

key-drivers-mcp

MCP server for key driver and feature importance analysis. Load any CSV dataset and ask what drives an outcome โ€” survival, credit default, diagnosis, income โ€” and get a ranked breakdown with sub-driver analysis showing not just which factors matter, but how they combine to amplify or completely reverse each other.

Powered by araxai (CleverMiner association rule analysis).

Tools

ToolPurpose
load_datasetLoad a CSV file into session memory
list_datasetsList all loaded datasets
find_driversFind key drivers of a target outcome
explain_segmentDriver analysis conditioned on a segment variable (CLARA)

Examples

Titanic โ€” what drove survival?

"What are the key drivers to survive in titanic.csv?"

Baseline survival rate: 38.4%

DriverSurvival ratevs Baseline
Sex: female74.2%1.9ร— higher
Sex: male18.9%2.0ร— lower
Low fare โ‰ค ยฃ10.5020.9%1.8ร— lower
Deck D75.8%2.0ร— higher

Sub-drivers are returned automatically. Within male passengers, 1st class men recovered to 36.9% โ€” nearly double the male average. Within low-fare passengers, women still survived at 60.8% while men reached only 10.7%.


Titanic โ€” drill-down from global to a specific segment

"And within women in 3rd class, what helped survival?"

The global result shows sex as the top driver (women 74.2%, men 18.9%). Sub-drivers within women immediately reveal that 3rd class women dropped to 50% โ€” a coin flip, far below the female average. That triggers a follow-up with filters={"sex": "female", "pclass": "3"}:

144 women in 3rd class โ€” segment baseline: 50%

DriverSurvival ratevs Segment baseline
Embarked at Queenstown72.7%1.5ร— higher
Fare ยฃ6.75โ€“ยฃ7.7772.4%1.4ร— higher
Embarked at Southampton37.5%1.3ร— lower

Queenstown passengers (mostly Irish emigrants boarding late in small groups) survived at nearly twice the rate of Southampton passengers โ€” a pattern completely invisible in the global analysis. Each drill-down level answers a narrower question using the previous result as the starting point.


German Credit โ€” how factors combine and reverse each other

"What are the key drivers for good credit?"

Baseline: 70% good credit rating

An overdrawn checking account drops approval to 50.7% โ€” but the sub-driver analysis shows the outcome depends sharply on what else is true:

ProfileGood credit ratevs Baseline
Overdrawn checking account50.7%1.4ร— lower
Overdrawn + loan duration > 24 months34.4%2.0ร— lower
Overdrawn + critical credit history73.1%back to baseline
Long loan duration > 30 months52.0%1.3ร— lower
Long loan + no property38.9%1.8ร— lower
Long loan + no checking account79.3%1.1ร— higher

The same risk factor (overdrawn account) leads to very different outcomes depending on credit history. Borrowers with no checking account are actually safer on long loans โ€” likely self-employed or asset-wealthy.


Diabetes โ€” combinations push risk above 80%

"What are the key drivers for testing positive for diabetes?"

Baseline: 34.9% positive

DriverProbabilityvs Baseline
Glucose > 147 mg/dL74.3%2.1ร— higher
Glucose > 147 + age 27โ€“3388.5%2.5ร— higher
Glucose > 147 + BMI 33.7โ€“37.884.2%2.4ร— higher
Glucose > 147 + many pregnancies (>7)85.7%2.5ร— higher
Glucose โ‰ค 109 mg/dL14.0%2.5ร— lower
Age โ‰ค 2313.3%2.6ร— lower

High glucose is already a strong signal (74%), but combining it with age 27โ€“33, elevated BMI, or high pregnancy count pushes risk above 84%. The tool surfaces these compound profiles in a single call.


Income โ€” education can completely override marital status

"What drives income above $50K for women specifically?"

Using filters={"sex": "Female"} โ€” women's baseline: 10.9% (vs 23.9% overall):

Profile>50K ratevs Women's baseline
Doctorate56.6%5.2ร— higher
Prof-school47.7%4.4ร— higher
Doctorate + married88.0%8.1ร— higher
Prof-school + married84.2%7.7ร— higher
Prof-school + never-married35.7%3.3ร— higher
Own-child relationship1.2%9.0ร— lower

Never-married women with a doctorate still reach 35.7% โ€” three times the women's baseline โ€” showing that education fully overrides the marital status penalty. The same inversion appears in the overall dataset: never-married alone โ†’ 4.5%, but never-married + Doctorate โ†’ 44.3%, almost twice the global baseline.


How it works

araxai uses association rule analysis (CleverMiner) to find statistically significant rules that explain why a target class occurs. Each driver rule reports:

  • probability โ€” how often the target class occurs in that segment
  • vs_global_baseline โ€” lift relative to the whole dataset
  • vs_parent_segment โ€” lift relative to the parent rule (for sub-drivers)
  • strength โ€” +/- signs indicating rule reliability

Numeric columns are automatically binned into quantiles. The server enriches every top-level driver with a sub-analysis, so compound profiles like "overdrawn + long loan" or "high glucose + age 27โ€“33" are returned in a single call.