SLAM Commerce MCP

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.

Category
访问服务器

README

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

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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选