# io.github.48x-ai/marketbasketanalysis-mcp (npm · @marketbasketanalysis/mcp)

Co-purchase intelligence and merchant ops tools for AI shopping, ecommerce, and B2B agents

- Trust score: 59/100 (low)
- Registry status: active
- Liveness: live
- Owner verified: no
- Last scored: 2026-08-07

## Components

- npm · `@marketbasketanalysis/mcp`: 59/100 (this document), [markdown](https://verifymcp.io/servers/48x-ai-marketbasketanalysis-mcp/marketbasketanalysis-mcp.md), [page](https://verifymcp.io/servers/48x-ai-marketbasketanalysis-mcp/marketbasketanalysis-mcp)

## Channel facts

- Registry: `npm`
- Package: `@marketbasketanalysis/mcp`
- Version: `0.6.0`
- Transport: `stdio`

## Trust breakdown

How this component scores in each security and reliability category. Every signal is checked automatically from public evidence about the published package, including repeated runs of it in an isolated sandbox, and we only credit what we can confirm. Scores are 0–100 per category. Scoring method: https://verifymcp.io/docs/scoring (what has changed: https://verifymcp.io/docs/scoring/changelog)

Scored 2026-08-07.

- **Supply Chain Security**: 99/100
  - No malware found by supply-chain analysis.
  - No known CVEs affecting this package version or its production dependencies.
  - No install/post-install scripts declared.
  - 31 of 126 dependencies flagged as unhealthy.
- **Provenance & Transparency**: 6/100
  - Repository check failed: the declared repository URL returned HTTP 404.
  - Provenance check failed: no build-provenance attestation is published.
  - License check failed: the license (SEE LICENSE IN LICENSE) isn't a recognized OSI-approved license.
  - Actively maintained (last published 1 days ago).
  - Security-disclosure policy not yet verified: we couldn't inspect the source repository.
- **Schema Quality & AI Usability**: 67/100
  - AI-judged instruction clarity (excellent).
  - Context-footprint check failed: tool/resource definitions use about 3130 tokens (~164/item across 19 items; 19 tools + 0 resources), over budget; trim descriptions and params.
  - Usage-examples check failed: none of the tools include examples.
- **Stability & Change Management**: 0/100
  - Stability not yet verified: not enough scan history yet (needs a 30-day window).
- **Tool Coverage**: 100/100
  - 100% of tools have a non-trivial description (not blank, and not just the tool's name).
  - 100% of tool parameters carry a description.
- **Capabilities**: 100/100
  - Implements a supported MCP spec version (2025-11-25); the latest is 2026-07-28.

**Unverified: 1 category.** A category scored 0 because we could not verify it: a data source with nothing on this package, evidence we could not reach, or a check we could not run. We only credit what we can confirm.

## Install

### Claude

```bash
claude mcp add 48x-ai-marketbasketanalysis-mcp -- npx -y @marketbasketanalysis/mcp
```

### Codex

```bash
codex mcp add 48x-ai-marketbasketanalysis-mcp -- npx -y @marketbasketanalysis/mcp
```

### opencode

```json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "48x-ai-marketbasketanalysis-mcp": {
      "type": "local",
      "command": [
        "npx",
        "-y",
        "@marketbasketanalysis/mcp"
      ],
      "enabled": true
    }
  }
}
```

### OpenClaw

```bash
openclaw mcp add 48x-ai-marketbasketanalysis-mcp --command npx --arg -y --arg @marketbasketanalysis/mcp
```

### Hermes

```yaml
mcp_servers:
  48x-ai-marketbasketanalysis-mcp:
    command: "npx"
    args: ["-y", "@marketbasketanalysis/mcp"]
```

### Other

```json
{
  "mcpServers": {
    "48x-ai-marketbasketanalysis-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@marketbasketanalysis/mcp"
      ]
    }
  }
}
```

## Changelog

Every change recorded for this component, newest first. Days that predate change tracking, or that we cannot explain, say so: "we were watching and nothing happened" and "we were not watching" are different claims.

### 2026-08-07 (score 59, +15)

- [security improvement] Malware scan: unverified → pass
- [security improvement] Known CVEs: partial → pass
- [functional] Dependency health: partial → 0.89

### 2026-08-06 (score 44, +29)

- [security] Stability: Stability not yet verified: not enough scan history yet (needs a 30-day window).
- [functional improvement] Tool coverage: unverified → 100
- [functional improvement] MCP protocol: unverified → pass
- [functional] First check of Schema quality: fail
- [functional] First check of Schema quality: excellent
- [functional] First check of Tool coverage: 100
- [functional] First check of Schema quality: fail

### 2026-08-05 (score 15)

First indexed and scored.

## MCP tools (19)

### `get_recommendations` (~166 tokens)

For a given product, recommend the top complementary, frequently-bought-together products customers also bought, based on mined order-history association rules. This is the single-product cross-sell tool. Use this when the user asks 'what goes with X?', 'what should I bundle with X?', 'what do customers also buy with X?', 'recommend products to cross-sell with X', or similar single-product co-purchase questions. Works for Shopify, Magento, and WooCommerce merchants.

Input parameters:

- `limit` (integer): Maximum number of recommendations to return. Default 3, max 6.
- `product_id` (string, required): Product id, either the numeric storefront id (e.g. '8472918765') or the platform-specific GID/SKU. Both are accepted.

### `find_substitutes` (~207 tokens)

For a given product, recommend the top substitute items that could REPLACE it (not complement it). Substitutes are the inverse of cross-sell: this answers 'what to buy instead', not 'what to buy with'. Use this when the user asks 'what's a substitute for X?', 'X is out of stock, what's a good alternative?', 'recommend a replacement for Y', 'find an equivalent product', or when a procurement agent needs to swap an unavailable SKU. Returns a ranked list with a similarity score and a reason (context_similar / category_match / vendor_match). Works for Shopify, Magento, and WooCommerce merchants.

Input parameters:

- `limit` (integer): Maximum number of substitutes to return. Default 3, max 6.
- `product_id` (string, required): Product id, either the numeric storefront id (e.g. '8472918765') or the platform-specific GID/SKU. The id of the product the user wants to REPLACE.

### `get_rationale` (~127 tokens)

Fetch the one-sentence rationale for why product B is recommended alongside product A. Returns a short merchandiser-grade explanation ('these are commonly bought together by customers buying X') suitable for surfacing in a recommendation tile or chat reply. Use this after get_recommendations / get_bundle_for_cart when the agent or user asks 'why are these recommended together?' or 'explain this pairing'.

Input parameters:

- `product_id` (string, required): The base product id (the antecedent in the recommendation rule).
- `related_product_id` (string, required): The recommended product id (the consequent in the rule).

### `get_bundle_for_cart` (~160 tokens)

Given a list of products already in the cart, recommend products that frequently bundle with the cart to complete a high-confidence bundle. This is multi-item basket analysis for cart completion. Use when the user describes a multi-item cart and asks 'what else do I need?', 'what completes this set?', 'what's missing from this bundle?', 'recommend add-ons for this cart', or similar. Different from get_recommendations: this takes MULTIPLE products and returns items that pair with the cart as a whole, not single-item pairings.

Input parameters:

- `limit` (integer): Max suggestions to return. Default 3, max 6.
- `product_ids` (array, required): List of product ids currently in the cart (numeric or GID/SKU).

### `propose_subscription_bundle` (~343 tokens)

Propose a recurring subscription bundle for a customer based on their first-order items. Given 1-5 seed products the customer has bought, returns a recurring subscription bundle (3-6 items) of the seeds plus complementary products, with a predicted cadence (median days between reorders), a 0..1 confidence score, and a rough monthly_value when prices are known. Use this when a merchant agent asks 'what should they subscribe to?', 'build a monthly subscription bundle from this order', 'propose a subscription bundle', 'recommend a recurring replenishment bundle', or 'what's the right subscription frequency for this customer?'. If a customer_id is supplied the tool blends in the customer's per-SKU reorder cadence; without one it falls back to the seed catalog cohesion alone. Works for Shopify, Magento, and WooCommerce merchants.

Input parameters:

- `cadence_days` (integer): Optional target subscription frequency in days (e.g. 30 for monthly, 14 for biweekly). When supplied, the tool snaps the predicted cadence toward this target and weights candidates whose individual c…
- `customer_id` (string): Optional customer id (numeric storefront id or GID). When supplied, the tool pulls the customer's reorder-prediction history to anchor the cadence and confidence. Without this, the proposal uses seed…
- `kit_size` (integer): Target total items in the subscription bundle (seeds + complements). Default 4, clamped to [3, 6].
- `seed_product_ids` (array, required): Products the customer bought in their first order (1-5). The proposed subscription bundle will include these plus complementary items.

### `score_cross_sell` (~149 tokens)

Score the cross-sell strength (product affinity) between two specific products. Returns the confidence the merchant's real co-purchase data supports for the pair, or a clear 'no signal' result when there's no qualifying rule. Use this to validate a proposed pair before recommending it, or to answer 'is X a good cross-sell for Y?', 'how strong is the affinity between X and Y?', or 'how often are X and Y bought together?'.

Input parameters:

- `product_a` (string, required): The 'antecedent' product (the one the customer already has).
- `product_b` (string, required): The 'consequent' product (the one being evaluated as a cross-sell).

### `score_return_risk` (~242 tokens)

Predict return risk for a candidate bundle of 2-6 products. Returns the composite bundle return rate (max of items, since one returned item typically returns the whole bundle), each item's historical return rate, and a low/medium/high risk recommendation. Use this when the user asks 'will this bundle get returned?', 'predict return risk for these items', 'fashion bundle risk', 'is this set risky to ship together?', or when an agent is composing a bundle and wants to verify it won't tank the merchant's return KPIs. Backed by return-aware mining over the merchant's real order + refund history.

Input parameters:

- `product_ids` (array, required): Product ids for the candidate bundle. 2-6 items. Each id is either the numeric storefront id (e.g. '8472918765') or the platform-specific GID/SKU.
- `threshold` (number): Optional override for the 'high risk' cutoff. Defaults to 0.15 (15%). Items above this contribute to a stronger warning in the recommendation text. The low/medium/high classification itself uses fixe…

### `analyze_basket` (~126 tokens)

Run market-basket analysis on a proposed basket / bundle to score its cohesion. Given 2+ products, returns a cohesion score 0..1 representing how strongly they bind together (their affinity) in the merchant's order data. Use this to vet a proposed bundle BEFORE recommending it, so agents can avoid suggesting bundles that look plausible but have no statistical signal. Also useful for 'is this a good bundle?', 'analyze this basket', or 'do these products go together?' questions.

Input parameters:

- `product_ids` (array, required): The products in the proposed basket (2-6).

### `predict_reorder` (~253 tokens)

For a sales-rep or inventory / account-management agent: predict when a B2B customer / account is due to reorder. Returns predicted next-order dates for every SKU the customer has ordered >=2 times, with confidence based on the regularity of their cadence (reorder prediction / replenishment forecasting). Bucketed into 'overdue' / 'due_soon' / 'on_track' / 'not_predictable'. Use this when the agent asks 'what's Acme Corp due to reorder?', 'when will customer X need more of Y?', 'show me stockout risks for my B2B accounts', or for proactive replenishment workflows. Works on the Shopify, BigCommerce, WooCommerce, and Magento backends. Not available on OroCommerce.

Input parameters:

- `customer_id` (string, required): The customer id on the store's own platform. Shopify accepts either the numeric storefront id (e.g. '7654321') or the full GID (gid://shopify/Customer/7654321). BigCommerce, WooCommerce, and Magento…
- `product_id` (string): Optional: filter to a single product. Useful for 'when will customer X reorder product Y?'.

### `forecast_bundle` (~168 tokens)

For an inventory, purchasing, or merchant-ops agent: forecast weekly sales and recommend a buy quantity for a specific bundle over a configurable horizon. Uses additive Holt-Winters on the bundle's stored historical sales (demand forecasting). Use this when the agent asks 'how many of bundle X should I order?', 'what should I stock for the next N weeks?', 'what's the demand outlook for bundle Y?', or 'forecast the next 8 weeks for the camera bundle'.

Input parameters:

- `bundle_id` (string, required): Bundle identifier (the platform-specific bundle/kit id).
- `horizon_weeks` (integer): Forecast horizon in WEEKS. Default 8, range 1..52. The server converts this to days for the backend, so pass the number of weeks, not days.

### `get_weekly_plan` (~90 tokens)

Fetch the current weekly action plan for the merchant: a ranked list of typed actions (publish opportunity, retire stale bundle, reorder inventory, investigate drift, etc.) the merchant should take this week. Use this when a merchant asks 'what should I work on this week?', 'what's on my plate?', 'show me my weekly plan', or wants a summary of pending tasks before opening the admin.

### `execute_weekly_plan_action` (~110 tokens)

Execute a specific action from the merchant's weekly plan (publish bundle, run mining job, archive rule, etc.). Idempotent by action_id, safe to retry. Use this AFTER the merchant has confirmed which action from get_weekly_plan they want to run; do not call preemptively.

Input parameters:

- `action_id` (string, required): The id of the action to execute, from get_weekly_plan.
- `confirm` (boolean, required): Must be true to actually execute. Guard against accidental dispatch.

### `get_opportunities` (~123 tokens)

List the merchant's ranked bundle / cross-sell opportunities mined from order history, with support / confidence / lift / revenue-weighted score. Use this when a merchant asks 'what are my top opportunities?', 'show me the best bundles I haven't published yet', or 'what should I prioritize?'. Pair with triage_opportunity to act on a specific one.

Input parameters:

- `limit` (integer): Max opportunities to return. Default 10, max 50.
- `status` (string): Filter by opportunity status. Defaults to 'proposed' (untriaged).

### `explain_opportunity` (~158 tokens)

Explain ONE mined opportunity: return its support, confidence, lift, and order sample count plus a short plain-language narrative of why the pair is a good cross-sell. Use this when a merchant asks 'why is this a good cross-sell?', 'explain this opportunity', or 'why should I bundle these?' after seeing it in get_opportunities. Different from get_opportunities: that lists the ranked set, this drills into a single opportunity_id with the stats spelled out in a sentence. Different from get_rationale: rationale is a generic pair 'why', this is the specific mined opportunity's own numbers. BigCommerce only today.

Input parameters:

- `opportunity_id` (string, required): The id of the opportunity to explain, from get_opportunities.

### `triage_opportunity` (~121 tokens)

Pause, activate, or archive a specific opportunity from get_opportunities. State-mutating; guarded by confirm=true. Use this after the merchant has explicitly picked an opportunity to act on. Pass action='activate' to publish a proposed rule, 'pause' to temporarily hide an active one, 'archive' to permanently retire it.

Input parameters:

- `action` (string, required): What to do with this opportunity.
- `confirm` (boolean, required): Must be true to dispatch. Guard against accidental triage.
- `opportunity_id` (string, required): Opportunity id from get_opportunities.

### `get_drift_alerts` (~119 tokens)

For a merchant-ops or analytics agent: list active drift alerts, the recommendation rules whose confidence has materially changed (weakened, strengthened, disappeared, emerged) versus the prior mining job. Use this when a merchant asks 'what's changed?', 'is my model still accurate?', 'are any rules drifting?', or wants to investigate a SKU swap / seasonal shift.

Input parameters:

- `limit` (integer): Max alerts to return. Default 10, max 50.
- `severity` (string): Filter alerts by severity. Default 'all'.

### `explain_drift` (~162 tokens)

Explain ONE drift alert: return its prior and current confidence (plus support, lift, and order sample count when the rule is still live) and a short plain-language narrative of how the pair moved versus the prior mining run. Use this when a merchant asks 'why did this pair drift?', 'explain this alert', or 'what changed for these two products?' after seeing it in get_drift_alerts. Different from get_drift_alerts: that lists the feed, this drills into a single alert_id with the change spelled out in a sentence. Handles a disappeared pair gracefully (only the prior confidence is available). BigCommerce only today.

Input parameters:

- `alert_id` (string, required): The id of the drift alert to explain, from get_drift_alerts.

### `get_forecast_alerts` (~142 tokens)

For an inventory or merchant-ops agent: list forecast-based alerts, the bundles with stockout risk, demand drop, demand spike, or an unreliable forecast curve. Use this when a merchant asks 'what's at risk of stockout?', 'which bundles are losing demand?', 'do I need to reorder anything?', or 'what should I restock?'. Pair with forecast_bundle to drill into a specific bundle.

Input parameters:

- `kind` (string): Filter by alert kind. Default 'all'.
- `limit` (integer): Max alerts to return. Default 10, max 50.
- `severity` (string): Filter by severity. Default 'all'.

### `mine_hui_itemsets` (~164 tokens)

Run high-utility itemset (HUI) mining on a caller-supplied payload of orders + per-line unit_profit. Returns top-K itemsets ranked by aggregate utility (sum of profit across all occurrences). Use this when an agent needs to evaluate which item combinations drive the most profit (not just frequency) for a specific time window or product subset. Plus or Enterprise tier required on the merchant account.

Input parameters:

- `min_utility` (number): Minimum utility threshold; itemsets below this are dropped.
- `orders` (array, required): Order payload: each order has order_id + items[]. Each item has sku, quantity, unit_profit.
- `top_k` (integer): How many top-utility itemsets to return. Default 20, max 100.

## Diagnostics

Captured diagnostic sections: Provenance, Dependencies. The full working is on the page: https://verifymcp.io/servers/48x-ai-marketbasketanalysis-mcp/marketbasketanalysis-mcp#diagnostics

## Score history

- 2026-08-07: 59
- 2026-08-06: 44
- 2026-08-05: 15

## Links

- npm package: https://www.npmjs.com/package/@marketbasketanalysis/mcp
- Socket report: https://socket.dev/npm/package/@marketbasketanalysis/mcp
- Website: https://www.marketbasketanalysis.com/docs/mcp
- Changelog RSS feed: https://verifymcp.io/servers/48x-ai-marketbasketanalysis-mcp/marketbasketanalysis-mcp.xml
- Changelog JSON feed: https://verifymcp.io/servers/48x-ai-marketbasketanalysis-mcp/marketbasketanalysis-mcp.json
- HTML version of this page: https://verifymcp.io/servers/48x-ai-marketbasketanalysis-mcp/marketbasketanalysis-mcp
