SLAM Commerce MCP
The SLAM Commerce MCP server exposes a Shopify SQLite database (via SLAM Gadget) to AI tools, providing 60 read-only tools for comprehensive analysis of your Shopify store. Access is always read-only (PRAGMA query_only = 1).
Meta & Diagnostics
Check server health, sync status, and store metadata (domain, currency, timezone, plan)
Explore the full database schema, table relationships, and SQL patterns
Query custom metafields across products, variants, customers, orders, and collections
Products
List, search, filter, and count products by status, vendor, type, or tag
Retrieve a single product with variants, collections, and metafields
Browse product images
Variants & Inventory
List and search variants by SKU, barcode, or product; explore product options
View inventory levels per variant per location, summaries, low-stock alerts, oversold (negative stock), and dead stock
Collections
List/retrieve collections with product counts; find which collections a product belongs to; list products in a collection with sales metrics
Orders
List, search, and filter orders; inspect line items; analyze discount code usage
Track fulfillments, refunds, returns, and draft orders
Customers
List, search, and retrieve customers with spend/order history
Analyze customer tags, rank top customers by spend or order count, view addresses
Pricing
View current prices, identify on-sale items, and analyze discount percentages and price distribution
Data Quality Checks
Automated checks for content gaps, pricing anomalies, identifier completeness (SKUs, barcodes), inventory issues, and order/customer data integrity
Reporting & Analytics
Sales dashboard (revenue, AOV, top products), time-series sales by day/week/month
Best-selling products, frequently co-purchased pairs, and vendor performance summaries
Store-Level
Fulfillment locations, B2B companies, content pages, gift card balances, and selling plans
One-call store health snapshot (
slam_store_snapshot) covering sales, inventory, data issues, and sync freshness
Ad-hoc SQL
Execute any custom read-only SELECT query directly against the database (
slam_run_query)
Exposes Shopify store data from a SQLite database, providing tools for managing products, variants, inventory, collections, orders, customers, pricing, conditions, reporting, and store-level operations through AI tools.
Provides read-only access to a SQLite database containing Shopify store data, enabling query execution and data retrieval through specialized tools while maintaining security with query-only mode and SELECT validation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SLAM Commerce MCP show me our top 5 customers by spend this month"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@slam-commerce/mcp
MCP server for SLAM Gadget — expose your Shopify SQLite database to AI tools.
Requirements
Node.js 20+
A SLAM Gadget
.dbfile (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@2Why global? Native modules like
better-sqlite3must compile once on your machine. Usingnpxcauses 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@2Step 2 — Point to your database
The server resolves the database path using the first of these that matches:
Priority | Mechanism | Best for |
1 |
| Project-level |
2 |
| Shared/global client configs |
3 | Auto-discover | 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.jsonWindows:
%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-mcpTools (60 total)
Meta (5 tools)
Tool | Description |
| Server introspection: version, schema_version, freshness, row counts |
| Sync status and row counts per entity table |
| Store metadata (domain, currency, timezone, plan) |
| Full schema reference with relationships and SQL patterns (call this first before |
| Query metafields by owner type and namespace |
Products (5 tools)
Tool | Description |
| List products with optional filters (status, vendor, product_type, tag) |
| Get a single product by ID with variants, collections, metafields |
| Full-text search products by title or description |
| Count products matching filters |
| List product images from the product_media table |
Variants (4 tools)
Tool | Description |
| List variants with optional product filter |
| Get a single variant by ID |
| Search variants by SKU, title, or barcode |
| Product options and values from the product_options table |
Inventory (6 tools)
Tool | Description |
| Inventory levels per variant per location (includes location_name) |
| Stock summary across all variants |
| Variants at or below a stock threshold |
| Variants with negative available stock |
| Inventory totals per location with location name |
| Zero-sales variants with available stock |
Collections (4 tools)
Tool | Description |
| List collections with product count |
| Get a collection with its products |
| Collections that contain a specific product |
| Products within a specific collection |
Orders (10 tools)
Tool | Description |
| List orders with optional status/date filters |
| Get a single order with line items and discount codes |
| Search orders by name, email, or note |
| Line items for a specific order |
| Summary of discount codes used across orders |
| Active discount campaigns from the discounts table |
| Fulfillment status from the fulfillments table |
| Refunds and refund line items |
| Returns by status and period |
| Draft orders pipeline |
Customers (6 tools)
Tool | Description |
| List customers with optional tag filter |
| Get a single customer by ID |
| Tag frequency analysis from the customer_tags table |
| Search customers by email or name |
| Top customers by spend or order count |
| Customer address records |
Prices (2 tools)
Tool | Description |
| Current prices with compare_at for sale detection |
| Price distribution and discount analysis |
Conditions (6 tools)
Tool | Description |
| Content/tag conditions for product filtering |
| Price-based conditions |
| ID/SKU/barcode lookups |
| Inventory-based conditions |
| Order history conditions |
| Customer conditions |
Reporting (5 tools)
Tool | Description |
| Revenue, order count, AOV summary |
| Sales broken down by day/week/month |
| Best-selling products by revenue or units |
| Frequently co-purchased products |
| Vendor performance summary |
Store-level (5 tools)
Tool | Description |
| All fulfilment locations with stock summary |
| B2B company directory with contact count |
| Pages and articles for content auditing |
| Outstanding gift card balance by currency |
| Subscription/selling plan groups |
Snapshot (1 tool)
Tool | Description |
| One-call store health overview: sales totals, inventory counts, data condition issue counts, and sync freshness |
Ad-hoc (1 tool)
Tool | Description |
| Execute any read-only SELECT query against the database (call |
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 |
| < 15 min | Data is current |
| 15–59 min | Minor lag |
| 1–24 hours | Re-sync recommended |
| ≥ 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 |
| Requires |
| Requires |
| Requires |
| Requires |
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 toolsslam_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_searchA
Search customers by email address or name fragment. Matches against email, first_name, and last_name using a case-insensitive substring search.
Inputs: query (required), limit, offset.
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_orders_searchA
Search orders by customer email or name fragment, date range, or status. Use for support workflows like 'find all orders from jane@example.com' or 'show unfulfilled orders from last week'.
Inputs: query, date_from, date_to, financial_status, +3 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_searchA
Searches products by title, vendor, product_type, or tags using LIKE matching. Returns paginated results with variant counts.
Inputs: query (required), limit, offset.
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_variants_searchB
Look up variants by exact SKU or barcode. Returns variant details plus parent product info. Provide sku, barcode, or both.
Inputs: sku, barcode, limit, offset.
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
Scored across 60 tools
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.
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.
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.
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
Related MCP Connectors
Connect AI to store orders, products and inventory with scoped access and human approvals.
Shopify store analysis and product-catalog extraction as agent tools.
Amazon Ads, Seller Central, Vendor Central and AMC data for AI agents. Read-only by default.
200+ read/write tools for GA4, Search Console, Google Ads, Shopify, WooCommerce, Shopware & more.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides 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.13MIT
- AlicenseAqualityCmaintenanceEnables AI agents to read and write Shopify store data including products, orders, customers, inventory, and more via the Admin GraphQL API.2858 npmMIT
- AlicenseAqualityBmaintenanceEnables 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.6259 npmMIT
- FlicenseAqualityCmaintenanceEnables 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-