Skip to main content
Glama
SLAM Commerce MCP

SLAM Commerce MCP

by valljo888ai

@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)


Related MCP server: shopify

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 — Point to your database

The server resolves the database path using the first of these that matches:

Priority

Mechanism

Best for

1

--db <path> CLI argument

Project-level .mcp.json with relative paths

2

SLAM_DB_PATH environment variable

Shared/global client configs

3

Auto-discover ./slam/data/*.db

Drop-in zero-config if your project follows the standard layout

Step 3 — Configure your MCP client

Claude Code — project .mcp.json (recommended, portable)

Place a .mcp.json in your project root. The --db path resolves relative to that directory:

{
  "mcpServers": {
    "slam": {
      "command": "slam-mcp",
      "args": ["--db", "./slam/data/your-store.db"]
    }
  }
}

Move or rename the project folder and it still works. If your project follows the standard SLAM Gadget layout (./slam/data/*.db), you can omit --db entirely and let auto-discovery find the file.

Claude Desktop — add to config:

{
  "mcpServers": {
    "slam": {
      "command": "slam-mcp",
      "args": ["--db", "/absolute/path/to/store.db"]
    }
  }
}

Config file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Cursor — add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "slam": {
      "command": "slam-mcp",
      "args": ["--db", "/absolute/path/to/store.db"]
    }
  }
}

Claude Code / Cursor (env var alternative) — 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)

Tool

Description

slam_health

Server introspection: version, schema_version, freshness, row counts

slam_meta_status

Sync status and row counts per entity table

slam_meta_store

Store metadata (domain, currency, timezone, plan)

slam_meta_schema

Full schema reference with relationships and SQL patterns (call this first before slam_run_query)

slam_metafields_query

Query metafields by owner type and namespace

Products (5 tools)

Tool

Description

slam_products_list

List products with optional filters (status, vendor, product_type, tag)

slam_products_get

Get a single product by ID with variants, collections, metafields

slam_products_search

Full-text search products by title or description

slam_products_count

Count products matching filters

slam_product_images

List product images from the product_media table

Variants (4 tools)

Tool

Description

slam_variants_list

List variants with optional product filter

slam_variants_get

Get a single variant by ID

slam_variants_search

Search variants by SKU, title, or barcode

slam_variant_options

Product options and values from the product_options table

Inventory (6 tools)

Tool

Description

slam_inventory_levels

Inventory levels per variant per location (includes location_name)

slam_inventory_summary

Stock summary across all variants

slam_inventory_alerts

Variants at or below a stock threshold

slam_inventory_oversold

Variants with negative available stock

slam_inventory_by_location

Inventory totals per location with location name

slam_dead_stock

Zero-sales variants with available stock

Collections (4 tools)

Tool

Description

slam_collections_list

List collections with product count

slam_collections_get

Get a collection with its products

slam_collections_for_product

Collections that contain a specific product

slam_products_for_collection

Products within a specific collection

Orders (10 tools)

Tool

Description

slam_orders_list

List orders with optional status/date filters

slam_orders_get

Get a single order with line items and discount codes

slam_orders_search

Search orders by name, email, or note

slam_order_line_items_list

Line items for a specific order

slam_discounts_summary

Summary of discount codes used across orders

slam_discounts_active

Active discount campaigns from the discounts table

slam_fulfillment_tracking

Fulfillment status from the fulfillments table

slam_refunds_summary

Refunds and refund line items

slam_returns_summary

Returns by status and period

slam_draft_orders_list

Draft orders pipeline

Customers (6 tools)

Tool

Description

slam_customers_list

List customers with optional tag filter

slam_customers_get

Get a single customer by ID

slam_customers_by_tag

Tag frequency analysis from the customer_tags table

slam_customers_search

Search customers by email or name

slam_customers_top

Top customers by spend or order count

slam_customer_addresses

Customer address records

Prices (2 tools)

Tool

Description

slam_prices_current

Current prices with compare_at for sale detection

slam_price_analysis

Price distribution and discount analysis

Conditions (6 tools)

Tool

Description

slam_conditions_content

Content/tag conditions for product filtering

slam_conditions_pricing

Price-based conditions

slam_conditions_identifiers

ID/SKU/barcode lookups

slam_conditions_inventory

Inventory-based conditions

slam_conditions_orders

Order history conditions

slam_conditions_customers

Customer conditions

Reporting (5 tools)

Tool

Description

slam_sales_summary

Revenue, order count, AOV summary

slam_sales_by_period

Sales broken down by day/week/month

slam_products_top

Best-selling products by revenue or units

slam_products_bought_together

Frequently co-purchased products

slam_vendors_summary

Vendor performance summary

Store-level (5 tools)

Tool

Description

slam_locations_list

All fulfilment locations with stock summary

slam_b2b_companies_list

B2B company directory with contact count

slam_content_pages

Pages and articles for content auditing

slam_gift_cards_summary

Outstanding gift card balance by currency

slam_selling_plans_list

Subscription/selling plan groups

Snapshot (1 tool)

Tool

Description

slam_store_snapshot

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

Ad-hoc (1 tool)

Tool

Description

slam_run_query

Execute 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

Tier

Condition

Meaning

fresh

< 15 min

Data is current

stale

15–59 min

Minor lag

very_stale

1–24 hours

Re-sync recommended

outdated

≥ 24 hours

Data 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 tool

Reason

slam_inventory_history

Requires inventory_snapshots table — not present in Gadget

slam_prices_history

Requires price_snapshots table — not present in Gadget

slam_changes_recent

Requires change_log table — not present in Gadget

slam_changes_for_entity

Requires 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.

Available Tools

60 tools
slam_b2b_companies_listB

Returns B2B companies with location and contact counts.

Inputs: limit, offset.

slam_collections_for_productC

Returns all collections that contain the specified product.

Inputs: product_id (required).

slam_collections_getB

Returns a single collection by ID, including all member products.

Inputs: id (required).

slam_collections_listB

Returns a paginated list of collections with product counts. Filterable by collection_type ('smart' or 'custom').

Inputs: collection_type, limit, offset, sort_by, +1 more.

slam_conditions_contentA

Runs content quality checks: products with empty descriptions, 'Copy of'/'Untitled' titles, or missing tags.

Inputs: no named parameters.

slam_conditions_customersA

Runs customer quality checks: missing email, duplicate emails, zero order count, and customers with orders but zero total spent.

Inputs: no named parameters.

slam_conditions_identifiersB

Runs identifier completeness checks: empty SKUs, empty barcodes, and duplicate product titles.

Inputs: no named parameters.

slam_conditions_inventoryB

Runs inventory status checks: out-of-stock variants, negative inventory, and untracked inventory items.

Inputs: no named parameters.

slam_conditions_ordersB

Runs order quality checks: orders with no line items, missing customer email, zero total price, and refunded-but-unfulfilled status.

Inputs: no named parameters.

slam_conditions_pricingB

Runs pricing anomaly checks: zero-price variants, inverted compare_at_price, and compare_at_price equal to price.

Inputs: no named parameters.

slam_content_pagesB

Returns pages and articles for content audit. Use content_type filter to restrict to 'page' or 'article'.

Inputs: content_type, limit, offset.

slam_customer_addressesC

Returns customer addresses from the customer_addresses table.

Inputs: customer_id, limit, offset.

slam_customers_by_tagC

Returns customer tag distribution from the customer_tags table. Shows which tags are most common and how many customers have each.

Inputs: limit, offset.

slam_customers_getA

Returns a single customer by ID, including recent orders (up to 10) and metafields.

Inputs: id (required).

slam_customers_listC

Returns a paginated list of customers with orders_count and total_spent. Optionally filter by tag.

Inputs: limit, offset, sort_by, sort_order, +1 more.

slam_customers_topA

Returns customers ranked by total spend, order count, or average order value. Use min_orders to filter to repeat buyers only.

Inputs: sort_by, sort_order, limit, offset, +1 more.

slam_dead_stockA

Returns variants that have available inventory but no recorded sales (order_count = 0). Useful for identifying stock to clearance or discontinue. Sorted by highest stock first.

Inputs: min_available, limit, offset.

slam_discounts_activeC

Returns active discount codes from the discounts table (not order_discount_codes). Shows current live promotions.

Inputs: limit, offset.

slam_discounts_summaryC

Returns discount code usage summary from order_discount_codes. Shows most-used codes, total discount amounts, and discount types.

Inputs: limit, offset.

slam_draft_orders_listC

Returns draft orders with line item counts. Draft orders are unpaid/pending orders not yet converted.

Inputs: status, limit, offset.

slam_fulfillment_trackingB

Returns fulfillment records from the fulfillments table. Filter by order or status.

Inputs: order_id, status, limit, offset.

slam_gift_cards_summaryB

Returns outstanding gift card balance summary grouped by currency.

Inputs: no named parameters.

slam_healthA

Introspect the SLAM MCP server: MCP protocol version, server version, SQLite version, database pathname, row counts per table, last sync timestamp, and store metadata. Use as the first call to verify the connection and detect version drift.

Inputs: include_row_counts.

slam_inventory_alertsA

Returns variants at or below a stock threshold — your reorder list. Uses multi-location inventory_levels aggregation via the variant_stock_health view. Sorted by lowest stock first.

Inputs: threshold, include_zero_only, limit, offset.

slam_inventory_by_locationB

Returns inventory stock totals aggregated by location (warehouse/store). Shows available, on_hand, reserved, and committed units per location.

Inputs: location_id.

slam_inventory_levelsB

Returns inventory levels joined with variant info (SKU, title) and location name. Filterable by product_id, SKU, or location_id.

Inputs: product_id, sku, location_id, limit, +1 more.

slam_inventory_oversoldA

Returns variants where total available stock is negative — meaning orders have exceeded inventory (overselling). Distinct from out-of-stock (zero stock). Sorted by most negative first.

Inputs: limit, offset.

slam_inventory_summaryB

Returns aggregated inventory statistics: total SKUs tracked, total units, units by location, out-of-stock count, and low stock count.

Inputs: no named parameters.

slam_locations_listB

Returns all fulfilment locations with stock totals. Uses the inventory_by_location view.

Inputs: no named parameters.

slam_metafields_queryA

Browse and filter metafields (custom fields) across products, variants, customers, orders, and collections. Filter by owner type, namespace, key, a specific entity ID, or a substring of the value. Returns owner label (product title, customer email, or variant title) alongside each metafield.

Inputs: owner_type, namespace, key, owner_id, +3 more.

slam_meta_schemaA

Returns the full database schema (tables + columns), logical relationships, TEMP view documentation with semantic descriptions and column type notes, and copy-paste SQL patterns for common cross-table queries. Call this before writing slam_run_query to understand the data model.

Inputs: no named parameters.

slam_meta_statusA

Returns sync metadata (last sync time, minutes since sync) and row counts for every entity table in the SLAM database.

Inputs: no named parameters.

slam_meta_storeB

Returns store information from the SLAM metadata table: shop domain, currency, timezone, and other store-level settings.

Inputs: no named parameters.

slam_order_line_items_listA

List individual order line items. Filter by product, variant, or specific order. Useful for cross-order product queries like 'show all orders containing variant X' or 'which orders had this product?'

Inputs: product_id, variant_id, order_id, limit, +1 more.

slam_orders_getA

Returns a single order by ID, including line items, discount codes, and customer info.

Inputs: id (required).

slam_orders_listB

Returns a paginated list of orders with customer name and line item count. Filterable by financial_status and fulfillment_status.

Inputs: financial_status, fulfillment_status, limit, offset, +2 more.

slam_price_analysisA

Returns variants with discount analysis from the price_comparison view. By default shows only items on sale (compare_at_price > price), sorted by biggest discount first.

Inputs: on_sale_only, min_discount_pct, limit, offset.

slam_prices_currentB

Returns current variant prices. Use below_compare to show only variants where price < compare_at_price (on sale). Filterable by product_id.

Inputs: product_id, below_compare, limit, offset.

slam_product_imagesB

Returns product images from the product_media table. Supports filtering by product_id.

Inputs: product_id, limit, offset.

slam_products_bought_togetherA

Returns product pairs ranked by co-purchase frequency — how often two products appear together in the same order. Use to discover bundle opportunities. Supply product_id to anchor on a specific product, or omit to see the top pairs across all orders.

Inputs: product_id, min_co_orders, limit.

slam_products_countB

Returns the total count of products, optionally filtered by status, vendor, or product_type.

Inputs: status, vendor, product_type.

slam_products_for_collectionA

Returns all products in a collection, each enriched with variant count and sales metrics (order_count, units_sold, total_revenue) from the product_sales view. Products with no sales show zeros.

Inputs: collection_id (required), sort_by, sort_order, limit, +1 more.

slam_products_getA

Returns a single product by ID, including all its variants, collection memberships, and metafields.

Inputs: id (required).

slam_products_listA

Returns a paginated list of products with variant counts. Supports filtering by status, vendor, and product_type. Use the data_quality parameter to filter to products with content gaps (e.g. 'no_description' returns only products with empty body_html).

Inputs: limit, offset, status, vendor, +4 more.

slam_products_topA

Returns products ranked by sales performance (revenue, units sold, or order count). Supports pagination, sort direction, and optional vendor/product_type filters. Uses the product_sales view which joins orders and line_items — only products with at least one order appear.

Inputs: sort_by, sort_order, limit, offset, +2 more.

slam_refunds_summaryC

Returns refund records joined with refund line items. Shows refund amounts, reasons, and order context.

Inputs: limit, offset.

slam_returns_summaryC

Returns return records from the returns table, joined with return line item counts.

Inputs: status, limit, offset.

slam_run_queryA

Executes a read-only SQL query against the SLAM database with validation, pagination, money column warnings, and fuzzy error suggestions. Only SELECT, PRAGMA, EXPLAIN, and WITH statements are allowed.

Inputs: sql (required), params, limit, offset.

slam_sales_by_periodA

Returns orders grouped by day, week, or month — a time-series view of sales performance. Each period includes order_count, total revenue, and average order value. Most recent periods first.

Inputs: period, limit, financial_status.

slam_sales_summaryA

Returns a store sales dashboard: total orders, total revenue, average order value, breakdown by financial and fulfillment status, and top 5 products by revenue. Optionally filter by financial_status.

Inputs: financial_status.

slam_selling_plans_listC

Returns subscription selling plan groups with plan and product counts.

Inputs: limit, offset.

slam_store_snapshotA

Returns a one-call store health snapshot: sales totals, inventory counts, data condition issue counts, and sync freshness. Answers 'what is the state of my store right now?' without requiring multiple tool calls.

Inputs: no named parameters.

slam_variant_optionsC

Returns product option names and values from the product_options table (option_values stored as JSON).

Inputs: product_id (required).

slam_variants_getB

Returns a single variant by ID, including parent product information, inventory items, and inventory levels.

Inputs: id (required).

slam_variants_listB

Returns a paginated list of variants. Optionally filter by product_id to see variants for a specific product.

Inputs: product_id, data_quality, limit, offset, +2 more.

slam_vendors_summaryB

Returns sales performance grouped by vendor — total revenue, units sold, order count, and product count per vendor. Sorted by revenue by default.

Inputs: sort_by, sort_order, limit.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 60 tools

    Disambiguation4/5

    Most tools have distinct purposes targeting specific resources like products, orders, or inventory, with clear naming that reduces overlap. However, some tools like 'slam_conditions_content' and 'slam_conditions_identifiers' both check product data quality, which could cause mild confusion for agents about which to use for specific checks.

    Naming Consistency5/5

    All tools follow a consistent 'slam_' prefix and snake_case pattern with clear verb_noun structures (e.g., 'slam_products_list', 'slam_customers_search'). This uniformity makes the tool set predictable and easy to navigate, with no deviations in naming conventions.

    Tool Count2/5

    With 60 tools, the count is excessive for a commerce analytics server, likely overwhelming agents and leading to redundancy. While the domain is broad, many tools could be consolidated (e.g., multiple condition checks or summary tools), making the set feel bloated and inefficient for typical use cases.

    Completeness5/5

    The tool set provides comprehensive coverage for e-commerce analytics, including CRUD-like operations for products, orders, customers, and inventory, along with advanced analytics, health checks, and data quality assessments. No obvious gaps exist; agents can perform end-to-end workflows without dead ends.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Provides AI assistants with real-time access to Shopify store analytics, sales data, and inventory through ShopifyQL and the Admin GraphQL API. It enables users to query store performance, customer metrics, and marketing insights using natural language.
      13
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI agents to read and write Shopify store data including products, orders, customers, inventory, and more via the Admin GraphQL API.
      28
      58 npm
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI agents to safely interact with a SQLite shop database through schema discovery, read-only SQL queries, and pre-built analytics reports like top customers, top products, and revenue summaries.
      6
      259 npm
      MIT
    • F
      license
      A
      quality
      C
      maintenance
      Enables AI agents to answer analytical questions about an online store's SQLite database through specialized read-only tools, without any risk of modifying the underlying data.
      8
      -