key-drivers-mcp
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).
Configuration
Add this to your MCP client config (e.g. Claude Code .mcp.json). No installation needed — uvx fetches and runs the package automatically.
{
"mcpServers": {
"key-drivers": {
"type": "stdio",
"command": "uvx",
"args": ["key-drivers-mcp"]
}
}
}No
uv? Install it withpip install uv, or usepipx install key-drivers-mcpand set"command": "key-drivers-mcp"instead.
Related MCP server: Maasy MCP
Tools
Tool | Purpose |
| Load a CSV file into session memory |
| List all loaded datasets |
| Find key drivers of a target outcome |
| Driver 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%
Driver | Survival rate | vs Baseline |
Sex: female | 74.2% | 1.9× higher |
Sex: male | 18.9% | 2.0× lower |
Low fare ≤ £10.50 | 20.9% | 1.8× lower |
Deck D | 75.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%
Driver | Survival rate | vs Segment baseline |
Embarked at Queenstown | 72.7% | 1.5× higher |
Fare £6.75–£7.77 | 72.4% | 1.4× higher |
Embarked at Southampton | 37.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:
Profile | Good credit rate | vs Baseline |
Overdrawn checking account | 50.7% | 1.4× lower |
Overdrawn + loan duration > 24 months | 34.4% | 2.0× lower |
Overdrawn + critical credit history | 73.1% | back to baseline |
Long loan duration > 30 months | 52.0% | 1.3× lower |
Long loan + no property | 38.9% | 1.8× lower |
Long loan + no checking account | 79.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
Driver | Probability | vs Baseline |
Glucose > 147 mg/dL | 74.3% | 2.1× higher |
Glucose > 147 + age 27–33 | 88.5% | 2.5× higher |
Glucose > 147 + BMI 33.7–37.8 | 84.2% | 2.4× higher |
Glucose > 147 + many pregnancies (>7) | 85.7% | 2.5× higher |
Glucose ≤ 109 mg/dL | 14.0% | 2.5× lower |
Age ≤ 23 | 13.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 rate | vs Women's baseline |
Doctorate | 56.6% | 5.2× higher |
Prof-school | 47.7% | 4.4× higher |
Doctorate + married | 88.0% | 8.1× higher |
Prof-school + married | 84.2% | 7.7× higher |
Prof-school + never-married | 35.7% | 3.3× higher |
Own-child relationship | 1.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.
Requirements
Python 3.11+
araxai >= 0.3.0mcp[cli] >= 1.0.0
Available Tools
4 toolsexplain_segmentA
Find drivers of a target outcome within a specific segment (CLARA method). Call this ONCE — like find_drivers, it returns a complete multi-level nested JSON in a single response. Do NOT call it multiple times to refine results.
Use this for local/conditional analysis: "within 1st class passengers, what drives survival?" The condition_variables define which variables describe the segment — araxai will find what values of those variables define the strongest sub-segments, then find drivers within them.
Use find_drivers first for the global picture; use explain_segment only when you need to drill into a specific slice of the data.
Args: dataset_name: Name of a dataset loaded with load_dataset target: Column name of the outcome variable target_class: The specific outcome value to explain condition_variables: Columns that define the segment to focus on (e.g. ["Journey_Type"]) attributes: Optional subset of columns to use as candidate drivers. Exclude columns that are direct encodings of the target, same as for find_drivers. min_base: Minimum records a rule must cover
| Name | Required | Description | Default |
|---|---|---|---|
| dataset_name | Yes | ||
| target | Yes | ||
| target_class | Yes | ||
| condition_variables | Yes | ||
| attributes | No | ||
| min_base | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It states returns complete JSON in single response and warns against multiple calls. However, it does not explicitly mention whether the tool modifies data or has side effects, though implied read-only.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with core purpose first, then usage notes, then parameter descriptions. Slightly verbose but every sentence adds value; could be trimmed slightly without loss.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 6 parameters (4 required), output schema exists, no nested objects, the description covers all aspects: purpose, usage, parameters, and expected output format (multi-level nested JSON). Complete for a complex analysis tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, but the description explains all parameters: dataset_name, target, target_class, condition_variables, attributes, min_base. Provides guidance like excluding direct encodings of target for attributes, and explains condition_variables purpose.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool finds drivers of a target outcome within a specific segment using the CLARA method, with a specific verb-resource combination. It distinguishes from sibling tool find_drivers by noting use for local/conditional analysis.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly says to use find_drivers first for global picture and explain_segment only for drilling into a slice. Also warns to call it once and not multiple times, providing clear when-to-use and when-not-to-use guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
find_driversA
Find the key drivers and influencers of a target outcome in a loaded dataset. Call this ONCE — it returns a complete, multi-level nested JSON in a single response. Do NOT call it multiple times to "refine" results; use the parameters below to get it right on the first call.
The response contains a "drivers" list. Every top-level single-variable driver is
guaranteed to have a "sub_drivers" list — if araxai did not produce one naturally,
the server automatically runs a sub-analysis by filtering to that segment.
Sub_drivers may themselves contain further "sub_drivers" up to max_depth levels.
Always read the full nested structure before deciding whether more analysis is needed.
Only call again with filters when the user asks about a specific sub-segment
(e.g. "within women in 3rd class") that is not already covered by sub_drivers.
IMPORTANT — avoid trivial drivers:
Before calling, check load_dataset output for columns that are direct encodings or
recodings of the target (e.g. a numeric "survived=1" column when target is "alive=yes",
or redundant label columns like "who"/"adult_male" that restate "sex"). Exclude these
via the attributes parameter, otherwise they will dominate the results trivially.
Lift > 1 means the feature increases the probability of the target class. Lift < 1 means it decreases it. Strength shows +/- signs: more signs = stronger.
Args: dataset_name: Name of a dataset loaded with load_dataset target: Column name of the outcome variable to explain (e.g. "Severity") target_class: The specific outcome value to find drivers for (e.g. "Fatal") attributes: Explicit list of candidate driver columns. Use this to EXCLUDE columns that are redundant with or direct encodings of the target. If omitted, all non-target columns are used. filters: Optional dict of column→value pairs to restrict analysis to a specific segment before running (e.g. {"sex": "female", "pclass": "3"}). Use this when the user asks about a specific sub-group. Filtered columns are automatically excluded from driver candidates (they are constant). Values must match the raw dataset values before encoding. min_base: Minimum number of records a rule must cover (default 20) max_depth: Levels of nested sub-driver drill-down, 1–3 (default 2). Use 2 for standard analysis. Only increase to 3 when the user explicitly asks to drill deeper into a specific segment (e.g. "tell me more about women in 1st class"). The response already contains all levels nested under "sub_drivers" keys — do NOT call find_drivers again just to get deeper results. Only call again if a specific segment is entirely absent. auto_boundaries: If True, automatically tunes the lift threshold to return 2–10 drivers regardless of their absolute lift value
| Name | Required | Description | Default |
|---|---|---|---|
| dataset_name | Yes | ||
| target | Yes | ||
| target_class | Yes | ||
| attributes | No | ||
| filters | No | ||
| min_base | No | ||
| max_depth | No | ||
| auto_boundaries | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Despite no annotations, the description fully discloses behavioral traits: it returns a complete nested JSON, automatically runs sub-analysis if needed, explains lift values (Lift > 1 / < 1, strength signs), and details how parameters like max_depth and auto_boundaries affect results. No contradictions with annotations as none exist.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with clear sections (purpose, usage admonition, response explanation, important note, lift interpretation, Args) and is front-loaded with critical usage guidance. However, it is somewhat verbose; some details could be condensed without losing value, earning a 4 instead of 5.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description fully covers the tool's behavior given its complexity (8 parameters, nested response). It explains the return structure (drivers list with sub_drivers), lift interpretation, and parameter effects. An output schema exists, so omitting return field details is acceptable. The description is sufficient for correct usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage, the description adds extensive meaning: each parameter (dataset_name, target, target_class, attributes, filters, min_base, max_depth, auto_boundaries) is explained with purpose, defaults, and usage examples. For instance, attributes is described as a way to exclude redundant columns, and filters includes instructions on value matching.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Find the key drivers and influencers of a target outcome in a loaded dataset.' It specifies the verb ('find'), resource ('drivers and influencers'), and distinguishes from siblings by emphasizing that it returns complete nested JSON in one call, contrasting with potential iterative approaches.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides explicit guidance: 'Call this ONCE' and 'Do NOT call it multiple times to refine results.' It instructs when to call again with filters (only for specific sub-segments not already covered) and warns about avoiding trivial drivers by checking load_dataset output. This clearly differentiates usage from alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_datasetsA
List all currently loaded datasets with their names, row counts, and column names. Use this to remind yourself what data is available without reloading.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must indicate behavioral traits. It states 'list all currently loaded datasets' and 'without reloading', implying a read-only, non-destructive operation with minimal impact. It does not mention authentication or side effects, but none are expected for a list operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise: two sentences that state the action and the usage context. No filler or repetition. Every sentence adds value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has no parameters and an output schema exists (though not shown), the description is sufficient. It specifies the return values (names, row counts, column names). It could mention if there are limits or pagination, but for a simple list, this is adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and schema description coverage is 100%. The description adds no parameter info since none exist, which is appropriate. Baseline for 0 parameters is 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists currently loaded datasets and specifies the returned information (names, row counts, column names). It distinguishes from sibling tools like load_dataset, which loads data, and explain_segment, which analyzes segments.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description includes a usage hint: 'Use this to remind yourself what data is available without reloading.' This implies the tool is for quick lookup, avoiding reloading. However, it does not explicitly state when not to use it or compare to alternatives like load_dataset.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
load_datasetA
Load a CSV or ZIP-compressed CSV file into memory under a given name. Call this ONCE before find_drivers or explain_segment — you do not need to reload the same file again within the same session.
Returns column names, row count, and for categorical columns their distinct values. Use this metadata to:
Identify the target variable and target class for find_drivers.
Spot columns that are direct encodings or duplicates of the target (e.g. a numeric "survived" column when the target is "alive") — pass those in the
attributesexclusion list so find_drivers does not pick them as trivial drivers.
Args: name: Short label to refer to this dataset in later calls (e.g. "accidents") path: Absolute or relative path to a CSV or ZIP-compressed CSV file separator: Column delimiter — use "\t" for tab-separated files, default is "," encoding: File encoding, default "utf-8" (use "cp1250" for Windows Eastern European files)
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| path | Yes | ||
| separator | No | , | |
| encoding | No | utf-8 |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It discloses return values (column names, row count, distinct values for categorical columns) and hints at in-memory loading. It does not fully detail side effects or error conditions, but for a load function, this is adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured: first paragraph for purpose and usage, second for return and metadata application, third for parameters. Every sentence is informative and earns its place, with no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (loading datasets), the description covers the essential: input parameters, usage sequence, and output metadata. It integrates with sibling tools (find_drivers, explain_segment) and provides actionable guidance. Output schema exists, but description still explains return values, making it complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so description compensates by explaining each parameter: name as a short label, path as absolute/relative path, separator with default and tab example, encoding with utf-8 default and cp1250 for Windows. This adds significant meaning beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'load', resource 'CSV or ZIP-compressed CSV file', and the purpose 'into memory under a given name'. It also distinguishes itself from siblings by indicating it should be called ONCE before find_drivers or explain_segment.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly states when to call ('ONCE before find_drivers or explain_segment') and that reloading the same file is unnecessary. Provides guidance on using returned metadata for find_drivers, including identifying target variables and exclusion lists.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v0.1.0- First observed
explain_segment - First observed
find_drivers - First observed
list_datasets - First observed
load_dataset
TDQS
Scored across 4 tools
Each tool has a distinct purpose: load_dataset loads data, list_datasets lists loaded data, find_drivers performs global driver analysis, explain_segment drills into a specific segment. Descriptions clearly differentiate when to use each.
All tool names follow a consistent verb_noun pattern with snake_case (load_dataset, list_datasets, find_drivers, explain_segment), making them predictable and easy to understand.
With 4 tools, the server is well-scoped for its purpose of driver analysis. The number is within the ideal range for clarity without being overly minimal or bloated.
The core workflow is covered: load data, list available datasets, find global drivers, and drill into segments. A minor gap is the lack of a tool to remove datasets, but this can be worked around by not relying on persistent state beyond the session.
Maintenance
Related MCP Connectors
MCP Server for an Agent Task Marketplace
MCP server for static security analysis of Android source code
MCP server for Product Management
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server for analyzing TikTok data for insight extraction5MIT
- AlicenseBqualityDmaintenanceMCP server for Maasy AI Marketing Copilot2165 npmMIT
- AlicenseNot gradedqualityFmaintenanceMCP server for PubMed search and literature summarization52MIT
- AlicenseNot gradedqualityBmaintenance基于FastMCP和scikit-learn构建的机器学习MCP服务器,提供30个工具覆盖分类、回归、聚类、降维、模型评估和数据预处理。MIT