Skip to main content

Shopify 分析 MCP

商店操作 MCP 伺服器讓您管理商品和訂單。分析 MCP 伺服器更進一步 -- 它們提供銷售報告、流量資料、行銷績效和跨平台商業智慧的存取。 無需在 Shopify Analytics、Google Analytics 和廣告平台儀表板之間切換,您可以透過 MCP 以對話方式查詢所有資料。

分析 MCP 全景

多個 MCP 伺服器提供與 Shopify 商家和開發人員相關的分析功能:

ServerFocusData SourcesTransport
Adzviser MCPMarketing & sales analyticsShopify, Google Ads, Meta Ads, GA4stdio
CData Code AssistDatabase-style queryingShopify + 200 connectorsstdio
Composio Tool RouterMulti-platform orchestrationShopify + 100+ integrationsstdio/HTTP
Custom MCPYour specific needsWhatever you buildAny

Adzviser MCP 用於 Shopify 分析

Adzviser 提供一個 MCP 伺服器,連接到 Shopify 的分析以及行銷平台,讓您透過自然語言查詢獲得商店績效的統一檢視。

Adzviser 提供什麼

  • 銷售分析:按時間段的收入、訂單、平均訂單價值、轉換率
  • 產品績效:暢銷品、滯銷品、按產品/商品系列的收入
  • 行銷歸因:Google Ads、Meta Ads、TikTok Ads 的廣告支出與收入對比
  • 顧客分析:新客與回頭客、終身價值估算、地理分佈
  • 流量分析:工作階段、頁面瀏覽量、跳出率、流量來源(透過 GA4 整合)

設定

Install Adzviser MCP
claude mcp add adzviser -- npx -- -y @adzviser/mcp-server

安裝後,您需要使用 Adzviser 帳戶進行驗證,該帳戶處理到各種資料來源(Shopify、Google Ads 等)的 OAuth 連線。

Claude Desktop configuration
{
"mcpServers": {
"adzviser": {
"command": "npx",
"args": ["-y", "@adzviser/mcp-server"],
"env": {
"ADZVISER_API_KEY": "your-api-key"
}
}
}
}

範例查詢

連接後,您可以用自然語言提問分析問題:

Sales performance
> What was our total revenue, order count, and average order value
for the last 30 days? Compare it to the previous 30-day period.
Product analysis
> Which 10 products generated the most revenue this month?
Include units sold and average selling price for each.
Marketing ROI
> Compare our Google Ads and Meta Ads performance for Q1.
Show spend, revenue attributed, ROAS, and cost per acquisition
for each platform.
Customer insights
> What percentage of our revenue comes from returning customers
vs first-time buyers? Show the trend over the last 6 months.
資料新鮮度

透過 MCP 取得的分析資料通常每隔幾小時更新一次,而非即時。對於即時訂單通知或庫存警報,請直接使用 Shopify webhooks。MCP 分析最適合用於報告、趨勢分析和策略決策。

建構報告

您可以要求 Claude Code 使用分析資料編譯結構化報告:

Weekly report generation
> Generate a weekly performance report covering:
1. Revenue and order summary (vs last week and vs same week last year)
2. Top 5 products by revenue
3. Marketing spend and ROAS by channel
4. Customer acquisition cost trend
5. Inventory alerts (products with < 2 weeks of stock)

Format it as a Markdown document I can share with the team.

CData Code Assist MCP

CData 提供不同的分析方法——它不使用預建儀表板,而是讓您對 Shopify 資料(以及 200 多個其他資料來源)進行類似 SQL 的查詢。

CData 提供什麼

CData Code Assist MCP 將 Shopify 視為可查詢的資料庫。您可以使用熟悉的類 SQL 語法對產品、訂單、顧客和其他 Shopify 資源執行結構化查詢。

設定

Install CData Code Assist
claude mcp add cdata -- npx -- -y @cdata/code-assist-mcp

設定需要連線到您的 CData Cloud 實例:

CData configuration
{
"mcpServers": {
"cdata": {
"command": "npx",
"args": ["-y", "@cdata/code-assist-mcp"],
"env": {
"CDATA_INSTANCE_URL": "https://your-instance.cdata.com",
"CDATA_AUTH_TOKEN": "your-auth-token"
}
}
}
}

使用案例

當您需要超越簡單報告查詢的複雜資料分析時,CData 表現出色:

Cohort analysis
> Query our Shopify order data to build a monthly cohort analysis.
Group customers by their first order month, then show retention
(repeat purchase rate) for each subsequent month.
Cross-platform join
> Join our Shopify order data with our Google Analytics session
data to calculate true conversion rate by traffic source,
accounting for multi-session purchase journeys.
Inventory forecasting data
> Pull the last 12 months of daily sales velocity for our top
50 products. I want to calculate reorder points based on
average daily sales and lead time.
何時使用 CData vs Adzviser

Adzviser 更適合標準行銷和銷售報告——它提供針對常見商家問題最佳化的預建分析。CData 更適合自訂分析、跨平台資料關聯,以及當您需要以標準報告不支援的方式查詢資料時。許多團隊兩者都使用。

Composio 工具路由器

Composio 採取更廣泛的方法——它是一個工具路由層,將 AI 代理連接到 100 多個平台,包括 Shopify、Slack、Google Sheets、電子郵件和 CRM。

Composio 提供什麼

Composio 不是 Shopify 專用的,而是讓您建構多平台分析工作流程:

  • 提取 Shopify 銷售資料將摘要推送到 Slack
  • 查詢訂單資料用結果更新 Google Sheet
  • 監控庫存水準在專案管理工具中建立任務
  • 將多個 Shopify 商店的資料聚合為統一檢視

設定

Install Composio MCP
claude mcp add composio -- npx -- -y composio-mcp
Composio configuration
{
"mcpServers": {
"composio": {
"command": "npx",
"args": ["-y", "composio-mcp"],
"env": {
"COMPOSIO_API_KEY": "your-composio-key"
}
}
}
}

多平台工作流程範例

Sales to Slack
> Pull today's Shopify sales total, top 3 selling products,
and any orders over $500. Format this as a daily digest
and post it to our #sales-updates Slack channel.
Inventory to Sheets
> Check inventory levels for all products. Export any products
with less than 20 units in stock to our "Reorder Alerts"
Google Sheet, including product name, SKU, current stock,
and 30-day average sales velocity.
Multi-store aggregation
> I manage 3 Shopify stores (US, UK, EU). Pull this week's
revenue from each store, convert to USD, and create a
comparison table showing performance by region.
Composio 適用範圍

Composio 功能強大但範圍廣泛。對於 Shopify 專用分析,專用伺服器(Adzviser、CData)提供更深入的功能。當您的工作流程本質上跨越多個平台時,Composio 是最佳選擇。

使用 MCP 資料建構自訂分析儀表板

對於成熟的 Shopify 企業來說,最強大的方法是將 MCP 資料存取與自訂儀表板結合。

架構模式

Custom analytics architecture
1. Claude Code (with MCP servers) queries data from multiple sources
2. Data is processed and structured into a standardized format
3. Results are written to a local database or JSON files
4. A frontend dashboard (React, Next.js, or even simple HTML) visualizes the data

使用 Claude Code 實作

Build a dashboard data pipeline
> Create a data pipeline script that:
1. Uses the Shopify MCP to pull the last 30 days of orders
2. Calculates daily revenue, order count, and AOV
3. Groups products by collection and calculates revenue per collection
4. Computes customer segmentation (new vs returning)
5. Writes all results to JSON files in data/analytics/
6. Create a simple React dashboard component that reads and
visualizes these JSON files using Recharts

排程資料刷新

對於生產環境儀表板,將 MCP 資料收集與排程任務結合:

scripts/refresh-analytics.ts
import { exec } from 'child_process';

// Run via cron: 0 */4 * * * (every 4 hours)
// This script asks Claude Code to refresh analytics data
// using MCP servers and write updated JSON files

async function refreshAnalytics() {
// Fetch order data via Shopify Store MCP
const orders = await fetchRecentOrders(30); // last 30 days

// Calculate metrics
const dailyRevenue = aggregateByDay(orders);
const topProducts = rankByRevenue(orders);
const customerSegments = segmentCustomers(orders);

// Write to data files for dashboard consumption
await writeJSON('data/daily-revenue.json', dailyRevenue);
await writeJSON('data/top-products.json', topProducts);
await writeJSON('data/customer-segments.json', customerSegments);

console.log(`Analytics refreshed: ${orders.length} orders processed`);
}
從簡單開始,逐步擴展

不要試圖在第一天就建構全面的分析平台。從單一指標(每日收入)開始,驗證資料的準確性,然後逐步新增更多指標。每個 MCP 查詢都會消耗 token 和時間——漸進式地建構。

選擇正確的分析 MCP

ScenarioRecommended Approach
Quick sales checkShopify Store MCP (direct order queries)
Marketing ROI reportsAdzviser MCP
Custom data analysisCData Code Assist MCP
Multi-platform workflowsComposio Tool Router
Production dashboardCustom MCP + data pipeline
One-time deep analysisClaude Code + Store MCP (manual session)

限制和注意事項

Token 成本

處理大型資料集的分析查詢會消耗大量 token。擷取 1,000 筆訂單並進行分析的查詢可能花費 $1-3 的 API token。對於頻繁的分析,請考慮:

  • 快取結果以避免冗餘擷取
  • 在伺服器端預先聚合資料
  • 使用 Shopify 內建的分析工具處理標準指標

資料準確性

MCP 分析查詢 Shopify 的 API,提供準確的交易資料。然而:

  • 收入數字可能因時間和時區差異而與 Shopify 儀表板不同
  • 流量資料需要單獨的 GA4 或類似整合
  • 跨行銷渠道的歸因本質上是近似的
  • 務必將重要的財務數據與 Shopify 的官方報告進行交叉參照

速率限制

大量的分析查詢可能會達到 Shopify 的 API 速率限制。Admin API 大約允許每秒 40 個 REST 請求或每秒 2,000 個 GraphQL 成本點數。請相應地規劃批次資料擷取:

Rate-limit-aware query
> Fetch all orders from last quarter, but pace the API calls
to stay under 50% of the rate limit. I don't need real-time
speed -- accuracy and completeness matter more.

下一步

涵蓋分析後,您現在擁有完整的 MCP 工具包:開發知識(Dev MCP)、商店操作(Store MCP)和商業智慧(Analytics MCP)。最後一個部分是建構您自己的自訂 MCP 伺服器。前往建構自訂 MCP 伺服器了解如何操作。