MCP 工具參考
這是涵蓋官方和社群伺服器的 Shopify MCP 工具完整參考。工具按領域組織,方便您快速找到所需的操作。
並非每個工具都可在每個 MCP 伺服器中使用。伺服器欄位指出哪些伺服器提供各工具。詳情請參閱社群 MCP 伺服器。
- Dev = 官方 Shopify Dev MCP
- GeLi = shopify-mcp (GeLi2001)
- Ajackus = @ajackus/shopify-mcp-server
- Composio = Composio Shopify MCP
產品
get_products
擷取產品清單,可選擇性篩選。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
limit | number | 否 | 回傳的產品數量(預設:50,最大:250) |
title | string | 否 | 按產品標題篩選(部分比對) |
product_type | string | 否 | 按產品類型篩選 |
vendor | string | 否 | 按供應商名稱篩選 |
status | string | 否 | 按狀態篩選:active、draft、archived |
collection_id | string | 否 | 按商品系列成員資格篩選 |
created_at_min | string | 否 | ISO 8601 日期——此日期之後建立的產品 |
updated_at_min | string | 否 | ISO 8601 日期——此日期之後更新的產品 |
cursor | string | 否 | 下一頁的分頁游標 |
伺服器: GeLi、Ajackus、Composio
範例:
Get all active products from vendor "Nike" updated in the last 7 days
get_product
依 ID 擷取單一產品的完整詳細資訊。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
product_id | string | 是 | Shopify 產品 GID(例如 gid://shopify/Product/123456) |
fields | string[] | 否 | 要回傳的特定欄位 |
伺服器: GeLi、Ajackus、Composio
範例:
Get the full details for product gid://shopify/Product/8234567890
create_product
建立新產品,可選擇性包含變體和媒體。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
title | string | 是 | 產品標題 |
description | string | 否 | 產品描述(支援 HTML) |
product_type | string | 否 | 用於分類的產品類型 |
vendor | string | 否 | 供應商名稱 |
tags | string[] | 否 | 標籤陣列 |
status | string | 否 | active、draft 或 archived(預設:draft) |
variants | object[] | 否 | 變體物件陣列 |
variants[].title | string | 否 | 變體標題 |
variants[].price | string | 否 | 變體價格 |
variants[].sku | string | 否 | SKU 代碼 |
variants[].inventory_quantity | number | 否 | 初始庫存 |
variants[].option1 | string | 否 | 第一個選項值(例如「Small」) |
variants[].option2 | string | 否 | 第二個選項值(例如「Red」) |
variants[].option3 | string | 否 | 第三個選項值 |
options | object[] | 否 | 產品選項(例如尺寸、顏色) |
metafields | object[] | 否 | 產品 metafield |
images | object[] | 否 | 要附加的圖片 URL |
伺服器: GeLi、Ajackus、Composio
範例:
Create a new draft product:
- Title: "Organic Cotton T-Shirt"
- Type: "Apparel"
- Vendor: "EcoWear"
- Tags: ["organic", "cotton", "sustainable"]
- Options: Size (S, M, L, XL), Color (White, Black, Navy)
- Base price: $29.99
update_product
更新現有產品的欄位。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
product_id | string | 是 | Shopify 產品 GID |
title | string | 否 | 更新的標題 |
description | string | 否 | 更新的描述 |
product_type | string | 否 | 更新的產品類型 |
vendor | string | 否 | 更新的供應商 |
tags | string[] | 否 | 更新的標籤(取代現有的) |
status | string | 否 | 更新的狀態 |
metafields | object[] | 否 | 要設定或更新的 metafield |
伺服器: GeLi、Ajackus、Composio
delete_product
永久刪除產品。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
product_id | string | 是 | Shopify 產品 GID |
伺服器: GeLi、Composio
產品刪除是永久的且無法復原。AI 助理應在執行此工具前始終先確認。
search_products
在產品目錄中進行全文搜尋。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
query | string | 是 | 搜尋查詢(搜尋標題、描述、SKU、標籤) |
limit | number | 否 | 最大結果數(預設:25) |
伺服器: GeLi、Composio
manage_product_media
新增、移除或重新排序產品的圖片和影片。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
product_id | string | 是 | Shopify 產品 GID |
action | string | 是 | add、remove、reorder |
media_urls | string[] | 否 | 要新增的媒體 URL |
media_ids | string[] | 否 | 要移除或重新排序的媒體 GID |
伺服器: GeLi
manage_product_metafields
建立、更新或刪除產品 metafield。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
product_id | string | 是 | Shopify 產品 GID |
metafields | object[] | 是 | metafield 操作陣列 |
metafields[].namespace | string | 是 | Metafield 命名空間 |
metafields[].key | string | 是 | Metafield 鍵 |
metafields[].value | string | 是 | Metafield 值 |
metafields[].type | string | 是 | Metafield 類型(single_line_text_field、number_integer、json 等) |
伺服器: GeLi、Composio
變體
get_variants
列出產品的變體。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
product_id | string | 是 | Shopify 產品 GID |
伺服器: GeLi、Ajackus、Composio
update_variant
更新變體詳細資訊(價格、SKU、重量等)。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
variant_id | string | 是 | Shopify 變體 GID |
price | string | 否 | 新價格 |
compare_at_price | string | 否 | 原價(Compare-at 價格) |
sku | string | 否 | SKU 代碼 |
barcode | string | 否 | 條碼 |
weight | number | 否 | 重量值 |
weight_unit | string | 否 | kg、g、lb、oz |
requires_shipping | boolean | 否 | 變體是否需要出貨 |
taxable | boolean | 否 | 變體是否需要課稅 |
伺服器: GeLi、Ajackus、Composio
訂單
get_orders
擷取訂單並可篩選。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
limit | number | 否 | 訂單數量(預設:50) |
status | string | 否 | open、closed、cancelled、any |
financial_status | string | 否 | authorized、pending、paid、partially_paid、refunded、voided |
fulfillment_status | string | 否 | shipped、partial、unshipped、unfulfilled |
created_at_min | string | 否 | ISO 8601 日期 |
created_at_max | string | 否 | ISO 8601 日期 |
customer_id | string | 否 | 按顧客篩選 |
cursor | string | 否 | 分頁游標 |
伺服器: GeLi、Ajackus、Composio
範例:
Get all unfulfilled paid orders from the last 24 hours
get_order
擷取單一訂單的完整詳細資訊,包括明細項目、運送和付款。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
order_id | string | 是 | Shopify 訂單 GID |
伺服器: GeLi、Ajackus、Composio
create_draft_order
建立草稿訂單以供手動處理。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
line_items | object[] | 是 | 明細項目陣列 |
line_items[].variant_id | string | 是 | 變體 GID |
line_items[].quantity | number | 是 | 數量 |
customer | object | 否 | 顧客詳細資訊 |
shipping_address | object | 否 | 運送地址 |
billing_address | object | 否 | 帳單地址 |
note | string | 否 | 訂單備註 |
tags | string[] | 否 | 訂單標籤 |
discount | object | 否 | 訂單層級折扣 |
伺服器: GeLi、Composio
fulfill_order
為訂單建立出貨。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
order_id | string | 是 | Shopify 訂單 GID |
tracking_number | string | 否 | 物流追蹤號碼 |
tracking_company | string | 否 | 物流公司名稱 |
tracking_url | string | 否 | 追蹤 URL |
notify_customer | boolean | 否 | 傳送通知郵件(預設:true) |
line_items | object[] | 否 | 要出貨的特定明細項目(部分出貨) |
伺服器: GeLi、Ajackus、Composio
cancel_order
取消一個未結訂單。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
order_id | string | 是 | Shopify 訂單 GID |
reason | string | 否 | customer、fraud、inventory、declined、other |
refund | boolean | 否 | 是否發起退款 |
restock | boolean | 否 | 是否重新入庫 |
notify_customer | boolean | 否 | 傳送取消郵件 |
伺服器: GeLi、Composio
refund_order
為訂單建立退款。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
order_id | string | 是 | Shopify 訂單 GID |
refund_line_items | object[] | 否 | 要退款的特定項目 |
shipping_refund | object | 否 | 要退款的運費金額 |
note | string | 否 | 退款原因 |
notify_customer | boolean | 否 | 傳送退款通知 |
伺服器: GeLi、Composio
顧客
get_customers
擷取顧客並可篩選。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
limit | number | 否 | 顧客數量(預設:50) |
query | string | 否 | 搜尋查詢(姓名、電子郵件、電話) |
created_at_min | string | 否 | ISO 8601 日期 |
tags | string | 否 | 按標籤篩選 |
cursor | string | 否 | 分頁游標 |
伺服器: GeLi、Ajackus、Composio
get_customer
擷取單一顧客及其訂單歷史。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
customer_id | string | 是 | Shopify 顧客 GID |
伺服器: GeLi、Ajackus、Composio
create_customer
建立新的顧客記錄。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
first_name | string | 否 | 名字 |
last_name | string | 否 | 姓氏 |
email | string | 否 | 電子郵件地址 |
phone | string | 否 | 電話號碼 |
tags | string[] | 否 | 顧客標籤 |
note | string | 否 | 內部備註 |
addresses | object[] | 否 | 顧客地址 |
metafields | object[] | 否 | 顧客 metafield |
email_marketing_consent | boolean | 否 | 電子郵件行銷同意 |
sms_marketing_consent | boolean | 否 | 簡訊行銷同意 |
伺服器: GeLi、Ajackus、Composio
update_customer
更新顧客資訊。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
customer_id | string | 是 | Shopify 顧客 GID |
first_name | string | 否 | 更新的名字 |
last_name | string | 否 | 更新的姓氏 |
email | string | 否 | 更新的電子郵件 |
phone | string | 否 | 更新的電話 |
tags | string[] | 否 | 更新的標籤 |
note | string | 否 | 更新的備註 |
伺服器: GeLi、Ajackus、Composio
search_customers
依各種條件搜尋顧客。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
query | string | 是 | 搜尋詞 |
limit | number | 否 | 最大結果數 |
伺服器: GeLi、Composio
庫存
get_inventory_levels
取得各地點的庫存水準。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
inventory_item_id | string | 否 | 特定庫存項目 GID |
location_id | string | 否 | 特定地點 GID |
product_id | string | 否 | 取得某產品的所有庫存 |
伺服器: GeLi、Ajackus、Composio
範例:
Show me inventory levels for all variants of product gid://shopify/Product/123
across all warehouse locations
adjust_inventory
調整某地點的庫存數量。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
inventory_item_id | string | 是 | 庫存項目 GID |
location_id | string | 是 | 地點 GID |
adjustment | number | 是 | 數量變更(正數或負數) |
reason | string | 否 | 原因:correction、received、damaged、shrinkage、promotion |
伺服器: GeLi、Ajackus、Composio
庫存調整是相對的,不是絕對的。調整 -5 會從目前數量中移除 5 個單位。在進行大量調整之前,請先確認目前的庫存水準。
set_inventory
將庫存設定為特定數量(絕對值)。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
inventory_item_id | string | 是 | 庫存項目 GID |
location_id | string | 是 | 地點 GID |
quantity | number | 是 | 新數量 |
reason | string | 否 | 變更原因 |
伺服器: GeLi、Composio
get_locations
列出所有庫存地點。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
active | boolean | 否 | 篩選啟用/停用的地點 |
伺服器: GeLi、Ajackus、Composio
transfer_inventory
在地點之間轉移庫存。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
inventory_item_id | string | 是 | 庫存項目 GID |
from_location_id | string | 是 | 來源地點 GID |
to_location_id | string | 是 | 目的地點 GID |
quantity | number | 是 | 要轉移的數量 |
伺服器: GeLi
商品系列
get_collections
擷取商品系列(智慧型和自訂)。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
limit | number | 否 | 商品系列數量 |
type | string | 否 | smart、custom 或 all |
title | string | 否 | 按標題篩選 |
伺服器: GeLi、Composio
create_collection
建立新的商品系列。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
title | string | 是 | 商品系列標題 |
description | string | 否 | 商品系列描述(HTML) |
type | string | 是 | smart 或 custom |
rules | object[] | 否 | 智慧型商品系列規則(智慧型類型必填) |
rules[].column | string | 是 | 規則欄位:title、type、vendor、tag、price、weight、variant_title |
rules[].relation | string | 是 | equals、not_equals、greater_than、less_than、starts_with、ends_with、contains |
rules[].condition | string | 是 | 規則值 |
disjunctive | boolean | 否 | true = 任意規則符合,false = 所有規則符合 |
sort_order | string | 否 | alpha-asc、alpha-desc、best-selling、created、created-desc、manual、price-asc、price-desc |
image | string | 否 | 商品系列圖片 URL |
伺服器: GeLi、Composio
範例:
Create a smart collection called "Summer Sale" that includes all
products tagged "summer" with price less than $50, sorted by best-selling
add_products_to_collection
將產品新增到自訂商品系列。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
collection_id | string | 是 | 商品系列 GID |
product_ids | string[] | 是 | 要新增的產品 GID 陣列 |
伺服器: GeLi、Composio
remove_products_from_collection
從自訂商品系列移除產品。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
collection_id | string | 是 | 商品系列 GID |
product_ids | string[] | 是 | 要移除的產品 GID 陣列 |
伺服器: GeLi、Composio
折扣
get_discounts
列出啟用中和排定的折扣。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
limit | number | 否 | 折扣數量 |
type | string | 否 | code、automatic 或 all |
status | string | 否 | active、expired、scheduled |
伺服器: GeLi、Composio
create_discount_code
建立以代碼為基礎的折扣。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
title | string | 是 | 內部折扣標題 |
code | string | 是 | 顧客輸入的折扣代碼 |
type | string | 是 | percentage、fixed_amount、free_shipping |
value | number | 是 | 折扣值(百分比或金額) |
applies_to | string | 否 | all_products、specific_collections、specific_products |
collection_ids | string[] | 否 | 商品系列 GID(當 applies_to 為 specific_collections 時) |
product_ids | string[] | 否 | 產品 GID(當 applies_to 為 specific_products 時) |
minimum_requirement | object | 否 | 最低購買金額或數量 |
usage_limit | number | 否 | 此折扣可使用的總次數 |
once_per_customer | boolean | 否 | 限制每位顧客使用一次 |
starts_at | string | 否 | ISO 8601 開始日期 |
ends_at | string | 否 | ISO 8601 結束日期 |
伺服器: GeLi、Composio
範例:
Create a discount code "SPRING25" for 25% off all products in the
"Spring Collection", minimum purchase $50, limited to 500 uses,
valid March 1-31 2026
create_automatic_discount
建立在結帳時自動套用的折扣。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
title | string | 是 | 折扣標題(向顧客顯示) |
type | string | 是 | percentage、fixed_amount、buy_x_get_y、free_shipping |
value | number | 是 | 折扣值 |
minimum_requirement | object | 否 | 最低購買要求 |
starts_at | string | 是 | ISO 8601 開始日期 |
ends_at | string | 否 | ISO 8601 結束日期 |
伺服器: GeLi、Composio
delete_discount
刪除折扣。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
discount_id | string | 是 | 折扣 GID |
伺服器: GeLi、Composio
分析
get_shop_info
擷取商店資訊和設定。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
| (無) | 回傳完整商店詳細資訊 |
伺服器: GeLi、Ajackus、Composio
回傳:商店名稱、網域、電子郵件、貨幣、時區、方案、功能等。
get_order_count
取得訂單計數,可選擇性按日期篩選。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
status | string | 否 | open、closed、cancelled、any |
financial_status | string | 否 | 付款狀態篩選 |
fulfillment_status | string | 否 | 出貨狀態篩選 |
created_at_min | string | 否 | ISO 8601 日期 |
created_at_max | string | 否 | ISO 8601 日期 |
伺服器: GeLi、Composio
get_sales_report
為日期範圍生成銷售分析。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
start_date | string | 是 | ISO 8601 開始日期 |
end_date | string | 是 | ISO 8601 結束日期 |
group_by | string | 否 | day、week、month |
伺服器: Adzviser、ShopifyPy
get_top_products
依營收或數量取得最暢銷產品。
| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
start_date | string | 是 | ISO 8601 開始日期 |
end_date | string | 是 | ISO 8601 結束日期 |
limit | number | 否 | 產品數量(預設:10) |
sort_by | string | 否 | revenue 或 quantity |
伺服器: Adzviser、ShopifyPy
文件工具(官方 Dev MCP)
這些工具僅透過官方 Shopify Dev MCP 伺服器提供:
| 工具 | 說明 |
|---|---|
search_docs | 在所有 Shopify 開發者文件中進行全文搜尋 |
explore_api_schema | 瀏覽和探索 Shopify GraphQL API schema |
get_liquid_reference | 存取 Liquid 範本語言參考 |
get_function_reference | Shopify Functions API 參考和腳手架 |
validate_graphql | 根據 Shopify schema 驗證 GraphQL 查詢 |
詳細參數文件請參閱官方 MCP 伺服器頁面。
常見工具模式
批次操作
許多操作可以組合成批次工作流程:
1. Get all products tagged "clearance" → get_products with tag filter
2. For each product, reduce price by 50% → update_variant (loop)
3. Move products to "Sale" collection → add_products_to_collection
4. Create a "CLEARANCE50" discount code → create_discount_code
稽核工作流程
1. Get all products → get_products (paginated)
2. Check each for missing descriptions → filter in AI
3. Check inventory levels → get_inventory_levels
4. Flag products with zero stock → adjust_inventory or archive
客戶服務
1. Search customer by email → search_customers
2. Get their recent orders → get_orders with customer_id
3. Check order fulfillment status → get_order
4. Process refund if needed → refund_order
最強大的模式是將 Dev MCP(用於文件)與 Store MCP(用於即時資料)結合使用。讓 Claude 在文件中查找正確的 API 方法,然後在您的商店上執行——全部在一次對話中完成。