marketbasketanalysis-mcp

v0.7.1
io.github.48x-ai/marketbasketanalysis-mcp Checked 1 day ago Published 3 months ago

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

Values you need

VariableWhat it is
MBA_API_KEYrequired secret Per-store MBA API key (mba_live_...), minted in the merchant admin
MBA_API_BASEoptional Override for self-hosted WooCommerce/Magento backends; defaults to the MBA hosted backend
MBA_PLATFORMoptional Store platform (shopify, bigcommerce, woocommerce, magento, orocommerce); drives per-platform path mapping and tool gating

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add marketbasketanalysis-mcp -e 'MBA_API_KEY=<MBA_API_KEY>' -- npx -y @marketbasketanalysis/mcp@0.7.1
Add to claude_desktop_config.json
{
  "mcpServers": {
    "marketbasketanalysis-mcp": {
      "args": [
        "-y",
        "@marketbasketanalysis/mcp@0.7.1"
      ],
      "command": "npx",
      "env": {
        "MBA_API_KEY": "<MBA_API_KEY>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "marketbasketanalysis-mcp": {
      "args": [
        "-y",
        "@marketbasketanalysis/mcp@0.7.1"
      ],
      "command": "npx",
      "env": {
        "MBA_API_KEY": "<MBA_API_KEY>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "MBA_API_KEY",
      "id": "mba-api-key",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "marketbasketanalysis-mcp": {
      "args": [
        "-y",
        "@marketbasketanalysis/mcp@0.7.1"
      ],
      "command": "npx",
      "env": {
        "MBA_API_KEY": "${input:mba-api-key}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.marketbasketanalysis-mcp]
command = "npx"
args = ["-y", "@marketbasketanalysis/mcp@0.7.1"]
env = { "MBA_API_KEY" = "<MBA_API_KEY>" }

Remote (hosted)

Run in a terminal
claude mcp add --transport http marketbasketanalysis-mcp https://mcp.marketbasketanalysis.com/mcp --header 'Authorization: <Authorization>' --header 'X-MBA-Base: <X-MBA-Base>' --header 'X-MBA-Platform: <X-MBA-Platform>'
Add to Settings → Connectors → Add custom connector (or claude_desktop_config.json via mcp-remote)
{
  "mcpServers": {
    "marketbasketanalysis-mcp": {
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.marketbasketanalysis.com/mcp",
        "--header",
        "Authorization: <Authorization>",
        "--header",
        "X-MBA-Base: <X-MBA-Base>",
        "--header",
        "X-MBA-Platform: <X-MBA-Platform>"
      ],
      "command": "npx"
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "marketbasketanalysis-mcp": {
      "headers": {
        "Authorization": "<Authorization>",
        "X-MBA-Base": "<X-MBA-Base>",
        "X-MBA-Platform": "<X-MBA-Platform>"
      },
      "url": "https://mcp.marketbasketanalysis.com/mcp"
    }
  }
}
Add to .vscode/mcp.json
{
  "servers": {
    "marketbasketanalysis-mcp": {
      "headers": {
        "Authorization": "<Authorization>",
        "X-MBA-Base": "<X-MBA-Base>",
        "X-MBA-Platform": "<X-MBA-Platform>"
      },
      "type": "http",
      "url": "https://mcp.marketbasketanalysis.com/mcp"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.marketbasketanalysis-mcp]
command = "npx"
args = ["-y", "mcp-remote", "https://mcp.marketbasketanalysis.com/mcp", "--header", "Authorization: <Authorization>", "--header", "X-MBA-Base: <X-MBA-Base>", "--header", "X-MBA-Platform: <X-MBA-Platform>"]

For AI agents

  1. Ask the user for: MBA_API_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: get_recommendations, find_substitutes, get_rationale, get_bundle_for_cart, propose_subscription_bundle, score_cross_sell, score_return_risk, analyze_basket, ….
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json