MCP Hub
Back to servers

SLAM Commerce MCP

Exposes Shopify store data from SLAM Gadget SQLite databases to AI tools through 60 specialized tools for products, orders, inventory, customers, and reporting. Provides read-only access with automatic schema validation and security protections.

glama
Updated
Apr 18, 2026

@slam-commerce/mcp

MCP server for SLAM Gadget — expose your Shopify SQLite database to AI tools.


Requirements

  • Node.js 20+
  • A SLAM Gadget .db file (schema version 3, downloaded from the Gadget dashboard)
  • SLAM_DB_PATH environment variable pointing to the absolute path of the file

Installation

Step 1 — Install globally (required for fast startup)

npm install -g @slam-commerce/mcp@2

Why global? Native modules like better-sqlite3 must compile once on your machine. Using npx causes a 10–30 second cold start on every session while npm reinstalls and recompiles. Global install runs that cost once.

On Windows, if the install fails with a node-gyp error, first run:

npm install -g node-gyp@latest
npm install -g @slam-commerce/mcp@2

Step 2 — Configure your MCP client

Claude Desktop — add to config:

{
  "mcpServers": {
    "slam": {
      "command": "slam-mcp",
      "env": {
        "SLAM_DB_PATH": "/absolute/path/to/store.db"
      }
    }
  }
}

Config file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Claude Code / Cursor — run once:

claude mcp add slam --scope user \
  -e "SLAM_DB_PATH=/absolute/path/to/store.db" \
  -- slam-mcp

Tools (60 total)

Meta (5 tools)

ToolDescription
slam_healthServer introspection: version, schema_version, freshness, row counts
slam_meta_statusSync status and row counts per entity table
slam_meta_storeStore metadata (domain, currency, timezone, plan)
slam_meta_schemaFull schema reference with relationships and SQL patterns (call this first before slam_run_query)
slam_metafields_queryQuery metafields by owner type and namespace

Products (5 tools)

ToolDescription
slam_products_listList products with optional filters (status, vendor, product_type, tag)
slam_products_getGet a single product by ID with variants, collections, metafields
slam_products_searchFull-text search products by title or description
slam_products_countCount products matching filters
slam_product_imagesList product images from the product_media table

Variants (4 tools)

ToolDescription
slam_variants_listList variants with optional product filter
slam_variants_getGet a single variant by ID
slam_variants_searchSearch variants by SKU, title, or barcode
slam_variant_optionsProduct options and values from the product_options table

Inventory (6 tools)

ToolDescription
slam_inventory_levelsInventory levels per variant per location (includes location_name)
slam_inventory_summaryStock summary across all variants
slam_inventory_alertsVariants at or below a stock threshold
slam_inventory_oversoldVariants with negative available stock
slam_inventory_by_locationInventory totals per location with location name
slam_dead_stockZero-sales variants with available stock

Collections (4 tools)

ToolDescription
slam_collections_listList collections with product count
slam_collections_getGet a collection with its products
slam_collections_for_productCollections that contain a specific product
slam_products_for_collectionProducts within a specific collection

Orders (10 tools)

ToolDescription
slam_orders_listList orders with optional status/date filters
slam_orders_getGet a single order with line items and discount codes
slam_orders_searchSearch orders by name, email, or note
slam_order_line_items_listLine items for a specific order
slam_discounts_summarySummary of discount codes used across orders
slam_discounts_activeActive discount campaigns from the discounts table
slam_fulfillment_trackingFulfillment status from the fulfillments table
slam_refunds_summaryRefunds and refund line items
slam_returns_summaryReturns by status and period
slam_draft_orders_listDraft orders pipeline

Customers (6 tools)

ToolDescription
slam_customers_listList customers with optional tag filter
slam_customers_getGet a single customer by ID
slam_customers_by_tagTag frequency analysis from the customer_tags table
slam_customers_searchSearch customers by email or name
slam_customers_topTop customers by spend or order count
slam_customer_addressesCustomer address records

Prices (2 tools)

ToolDescription
slam_prices_currentCurrent prices with compare_at for sale detection
slam_price_analysisPrice distribution and discount analysis

Conditions (6 tools)

ToolDescription
slam_conditions_contentContent/tag conditions for product filtering
slam_conditions_pricingPrice-based conditions
slam_conditions_identifiersID/SKU/barcode lookups
slam_conditions_inventoryInventory-based conditions
slam_conditions_ordersOrder history conditions
slam_conditions_customersCustomer conditions

Reporting (5 tools)

ToolDescription
slam_sales_summaryRevenue, order count, AOV summary
slam_sales_by_periodSales broken down by day/week/month
slam_products_topBest-selling products by revenue or units
slam_products_bought_togetherFrequently co-purchased products
slam_vendors_summaryVendor performance summary

Store-level (5 tools)

ToolDescription
slam_locations_listAll fulfilment locations with stock summary
slam_b2b_companies_listB2B company directory with contact count
slam_content_pagesPages and articles for content auditing
slam_gift_cards_summaryOutstanding gift card balance by currency
slam_selling_plans_listSubscription/selling plan groups

Snapshot (1 tool)

ToolDescription
slam_store_snapshotOne-call store health overview: sales totals, inventory counts, data condition issue counts, and sync freshness

Ad-hoc (1 tool)

ToolDescription
slam_run_queryExecute any read-only SELECT query against the database (call slam_meta_schema first to understand the schema)

Response envelope

Every tool response includes a _meta object:

{
  "_meta": {
    "domain": "products",
    "output_type": "list",
    "last_sync_at": "2024-01-15T08:30:00.000Z",
    "minutes_since_sync": 45,
    "freshness_tier": "stale",
    "returned": 25,
    "offset": 0,
    "has_more": true
  }
}

Freshness tiers

TierConditionMeaning
fresh< 15 minData is current
stale15–59 minMinor lag
very_stale1–24 hoursRe-sync recommended
outdated≥ 24 hoursData is old — re-sync now

Schema version

This package targets Gadget schema version 3. On startup the server reads _slam_meta.schema_version and writes a warning to stderr if the version does not match. Re-download your .db file from the Gadget dashboard if you see this warning.


Known gaps vs V3

The following tools from @slam-commerce/mcp@1.x were removed because the Gadget database does not have change-tracking tables:

Removed toolReason
slam_inventory_historyRequires inventory_snapshots table — not present in Gadget
slam_prices_historyRequires price_snapshots table — not present in Gadget
slam_changes_recentRequires change_log table — not present in Gadget
slam_changes_for_entityRequires change_log table — not present in Gadget

Security

All database connections open with PRAGMA query_only = 1. The slam_run_query tool additionally validates that the statement is a SELECT and checks the referenced tables against a known-good allowlist before execution.

Reviews

No reviews yet

Sign in to write a review