Skip to main content

MCP 工具參考

這是涵蓋官方和社群伺服器的 Shopify MCP 工具完整參考。工具按領域組織,方便您快速找到所需的操作。

工具可用性

並非每個工具都可在每個 MCP 伺服器中使用。伺服器欄位指出哪些伺服器提供各工具。詳情請參閱社群 MCP 伺服器

  • Dev = 官方 Shopify Dev MCP
  • GeLi = shopify-mcp (GeLi2001)
  • Ajackus = @ajackus/shopify-mcp-server
  • Composio = Composio Shopify MCP

產品

get_products

擷取產品清單,可選擇性篩選。

參數類型必填說明
limitnumber回傳的產品數量(預設:50,最大:250)
titlestring按產品標題篩選(部分比對)
product_typestring按產品類型篩選
vendorstring按供應商名稱篩選
statusstring按狀態篩選:activedraftarchived
collection_idstring按商品系列成員資格篩選
created_at_minstringISO 8601 日期——此日期之後建立的產品
updated_at_minstringISO 8601 日期——此日期之後更新的產品
cursorstring下一頁的分頁游標

伺服器: GeLi、Ajackus、Composio

範例:

Get all active products from vendor "Nike" updated in the last 7 days

get_product

依 ID 擷取單一產品的完整詳細資訊。

參數類型必填說明
product_idstringShopify 產品 GID(例如 gid://shopify/Product/123456
fieldsstring[]要回傳的特定欄位

伺服器: GeLi、Ajackus、Composio

範例:

Get the full details for product gid://shopify/Product/8234567890

create_product

建立新產品,可選擇性包含變體和媒體。

參數類型必填說明
titlestring產品標題
descriptionstring產品描述(支援 HTML)
product_typestring用於分類的產品類型
vendorstring供應商名稱
tagsstring[]標籤陣列
statusstringactivedraftarchived(預設:draft
variantsobject[]變體物件陣列
variants[].titlestring變體標題
variants[].pricestring變體價格
variants[].skustringSKU 代碼
variants[].inventory_quantitynumber初始庫存
variants[].option1string第一個選項值(例如「Small」)
variants[].option2string第二個選項值(例如「Red」)
variants[].option3string第三個選項值
optionsobject[]產品選項(例如尺寸、顏色)
metafieldsobject[]產品 metafield
imagesobject[]要附加的圖片 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_idstringShopify 產品 GID
titlestring更新的標題
descriptionstring更新的描述
product_typestring更新的產品類型
vendorstring更新的供應商
tagsstring[]更新的標籤(取代現有的)
statusstring更新的狀態
metafieldsobject[]要設定或更新的 metafield

伺服器: GeLi、Ajackus、Composio


delete_product

永久刪除產品。

參數類型必填說明
product_idstringShopify 產品 GID

伺服器: GeLi、Composio

破壞性操作

產品刪除是永久的且無法復原。AI 助理應在執行此工具前始終先確認。


search_products

在產品目錄中進行全文搜尋。

參數類型必填說明
querystring搜尋查詢(搜尋標題、描述、SKU、標籤)
limitnumber最大結果數(預設:25)

伺服器: GeLi、Composio


manage_product_media

新增、移除或重新排序產品的圖片和影片。

參數類型必填說明
product_idstringShopify 產品 GID
actionstringaddremovereorder
media_urlsstring[]要新增的媒體 URL
media_idsstring[]要移除或重新排序的媒體 GID

伺服器: GeLi


manage_product_metafields

建立、更新或刪除產品 metafield。

參數類型必填說明
product_idstringShopify 產品 GID
metafieldsobject[]metafield 操作陣列
metafields[].namespacestringMetafield 命名空間
metafields[].keystringMetafield 鍵
metafields[].valuestringMetafield 值
metafields[].typestringMetafield 類型(single_line_text_fieldnumber_integerjson 等)

伺服器: GeLi、Composio


變體

get_variants

列出產品的變體。

參數類型必填說明
product_idstringShopify 產品 GID

伺服器: GeLi、Ajackus、Composio


update_variant

更新變體詳細資訊(價格、SKU、重量等)。

參數類型必填說明
variant_idstringShopify 變體 GID
pricestring新價格
compare_at_pricestring原價(Compare-at 價格)
skustringSKU 代碼
barcodestring條碼
weightnumber重量值
weight_unitstringkgglboz
requires_shippingboolean變體是否需要出貨
taxableboolean變體是否需要課稅

伺服器: GeLi、Ajackus、Composio


訂單

get_orders

擷取訂單並可篩選。

參數類型必填說明
limitnumber訂單數量(預設:50)
statusstringopenclosedcancelledany
financial_statusstringauthorizedpendingpaidpartially_paidrefundedvoided
fulfillment_statusstringshippedpartialunshippedunfulfilled
created_at_minstringISO 8601 日期
created_at_maxstringISO 8601 日期
customer_idstring按顧客篩選
cursorstring分頁游標

伺服器: GeLi、Ajackus、Composio

範例:

Get all unfulfilled paid orders from the last 24 hours

get_order

擷取單一訂單的完整詳細資訊,包括明細項目、運送和付款。

參數類型必填說明
order_idstringShopify 訂單 GID

伺服器: GeLi、Ajackus、Composio


create_draft_order

建立草稿訂單以供手動處理。

參數類型必填說明
line_itemsobject[]明細項目陣列
line_items[].variant_idstring變體 GID
line_items[].quantitynumber數量
customerobject顧客詳細資訊
shipping_addressobject運送地址
billing_addressobject帳單地址
notestring訂單備註
tagsstring[]訂單標籤
discountobject訂單層級折扣

伺服器: GeLi、Composio


fulfill_order

為訂單建立出貨。

參數類型必填說明
order_idstringShopify 訂單 GID
tracking_numberstring物流追蹤號碼
tracking_companystring物流公司名稱
tracking_urlstring追蹤 URL
notify_customerboolean傳送通知郵件(預設:true)
line_itemsobject[]要出貨的特定明細項目(部分出貨)

伺服器: GeLi、Ajackus、Composio


cancel_order

取消一個未結訂單。

參數類型必填說明
order_idstringShopify 訂單 GID
reasonstringcustomerfraudinventorydeclinedother
refundboolean是否發起退款
restockboolean是否重新入庫
notify_customerboolean傳送取消郵件

伺服器: GeLi、Composio


refund_order

為訂單建立退款。

參數類型必填說明
order_idstringShopify 訂單 GID
refund_line_itemsobject[]要退款的特定項目
shipping_refundobject要退款的運費金額
notestring退款原因
notify_customerboolean傳送退款通知

伺服器: GeLi、Composio


顧客

get_customers

擷取顧客並可篩選。

參數類型必填說明
limitnumber顧客數量(預設:50)
querystring搜尋查詢(姓名、電子郵件、電話)
created_at_minstringISO 8601 日期
tagsstring按標籤篩選
cursorstring分頁游標

伺服器: GeLi、Ajackus、Composio


get_customer

擷取單一顧客及其訂單歷史。

參數類型必填說明
customer_idstringShopify 顧客 GID

伺服器: GeLi、Ajackus、Composio


create_customer

建立新的顧客記錄。

參數類型必填說明
first_namestring名字
last_namestring姓氏
emailstring電子郵件地址
phonestring電話號碼
tagsstring[]顧客標籤
notestring內部備註
addressesobject[]顧客地址
metafieldsobject[]顧客 metafield
email_marketing_consentboolean電子郵件行銷同意
sms_marketing_consentboolean簡訊行銷同意

伺服器: GeLi、Ajackus、Composio


update_customer

更新顧客資訊。

參數類型必填說明
customer_idstringShopify 顧客 GID
first_namestring更新的名字
last_namestring更新的姓氏
emailstring更新的電子郵件
phonestring更新的電話
tagsstring[]更新的標籤
notestring更新的備註

伺服器: GeLi、Ajackus、Composio


search_customers

依各種條件搜尋顧客。

參數類型必填說明
querystring搜尋詞
limitnumber最大結果數

伺服器: GeLi、Composio


庫存

get_inventory_levels

取得各地點的庫存水準。

參數類型必填說明
inventory_item_idstring特定庫存項目 GID
location_idstring特定地點 GID
product_idstring取得某產品的所有庫存

伺服器: GeLi、Ajackus、Composio

範例:

Show me inventory levels for all variants of product gid://shopify/Product/123
across all warehouse locations

adjust_inventory

調整某地點的庫存數量。

參數類型必填說明
inventory_item_idstring庫存項目 GID
location_idstring地點 GID
adjustmentnumber數量變更(正數或負數)
reasonstring原因:correctionreceiveddamagedshrinkagepromotion

伺服器: GeLi、Ajackus、Composio

庫存調整

庫存調整是相對的,不是絕對的。調整 -5 會從目前數量中移除 5 個單位。在進行大量調整之前,請先確認目前的庫存水準。


set_inventory

將庫存設定為特定數量(絕對值)。

參數類型必填說明
inventory_item_idstring庫存項目 GID
location_idstring地點 GID
quantitynumber新數量
reasonstring變更原因

伺服器: GeLi、Composio


get_locations

列出所有庫存地點。

參數類型必填說明
activeboolean篩選啟用/停用的地點

伺服器: GeLi、Ajackus、Composio


transfer_inventory

在地點之間轉移庫存。

參數類型必填說明
inventory_item_idstring庫存項目 GID
from_location_idstring來源地點 GID
to_location_idstring目的地點 GID
quantitynumber要轉移的數量

伺服器: GeLi


商品系列

get_collections

擷取商品系列(智慧型和自訂)。

參數類型必填說明
limitnumber商品系列數量
typestringsmartcustomall
titlestring按標題篩選

伺服器: GeLi、Composio


create_collection

建立新的商品系列。

參數類型必填說明
titlestring商品系列標題
descriptionstring商品系列描述(HTML)
typestringsmartcustom
rulesobject[]智慧型商品系列規則(智慧型類型必填)
rules[].columnstring規則欄位:titletypevendortagpriceweightvariant_title
rules[].relationstringequalsnot_equalsgreater_thanless_thanstarts_withends_withcontains
rules[].conditionstring規則值
disjunctivebooleantrue = 任意規則符合,false = 所有規則符合
sort_orderstringalpha-ascalpha-descbest-sellingcreatedcreated-descmanualprice-ascprice-desc
imagestring商品系列圖片 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_idstring商品系列 GID
product_idsstring[]要新增的產品 GID 陣列

伺服器: GeLi、Composio


remove_products_from_collection

從自訂商品系列移除產品。

參數類型必填說明
collection_idstring商品系列 GID
product_idsstring[]要移除的產品 GID 陣列

伺服器: GeLi、Composio


折扣

get_discounts

列出啟用中和排定的折扣。

參數類型必填說明
limitnumber折扣數量
typestringcodeautomaticall
statusstringactiveexpiredscheduled

伺服器: GeLi、Composio


create_discount_code

建立以代碼為基礎的折扣。

參數類型必填說明
titlestring內部折扣標題
codestring顧客輸入的折扣代碼
typestringpercentagefixed_amountfree_shipping
valuenumber折扣值(百分比或金額)
applies_tostringall_productsspecific_collectionsspecific_products
collection_idsstring[]商品系列 GID(當 applies_to 為 specific_collections 時)
product_idsstring[]產品 GID(當 applies_to 為 specific_products 時)
minimum_requirementobject最低購買金額或數量
usage_limitnumber此折扣可使用的總次數
once_per_customerboolean限制每位顧客使用一次
starts_atstringISO 8601 開始日期
ends_atstringISO 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

建立在結帳時自動套用的折扣。

參數類型必填說明
titlestring折扣標題(向顧客顯示)
typestringpercentagefixed_amountbuy_x_get_yfree_shipping
valuenumber折扣值
minimum_requirementobject最低購買要求
starts_atstringISO 8601 開始日期
ends_atstringISO 8601 結束日期

伺服器: GeLi、Composio


delete_discount

刪除折扣。

參數類型必填說明
discount_idstring折扣 GID

伺服器: GeLi、Composio


分析

get_shop_info

擷取商店資訊和設定。

參數類型必填說明
(無)回傳完整商店詳細資訊

伺服器: GeLi、Ajackus、Composio

回傳:商店名稱、網域、電子郵件、貨幣、時區、方案、功能等。


get_order_count

取得訂單計數,可選擇性按日期篩選。

參數類型必填說明
statusstringopenclosedcancelledany
financial_statusstring付款狀態篩選
fulfillment_statusstring出貨狀態篩選
created_at_minstringISO 8601 日期
created_at_maxstringISO 8601 日期

伺服器: GeLi、Composio


get_sales_report

為日期範圍生成銷售分析。

參數類型必填說明
start_datestringISO 8601 開始日期
end_datestringISO 8601 結束日期
group_bystringdayweekmonth

伺服器: Adzviser、ShopifyPy


get_top_products

依營收或數量取得最暢銷產品。

參數類型必填說明
start_datestringISO 8601 開始日期
end_datestringISO 8601 結束日期
limitnumber產品數量(預設:10)
sort_bystringrevenuequantity

伺服器: Adzviser、ShopifyPy


文件工具(官方 Dev MCP)

這些工具僅透過官方 Shopify Dev MCP 伺服器提供:

工具說明
search_docs在所有 Shopify 開發者文件中進行全文搜尋
explore_api_schema瀏覽和探索 Shopify GraphQL API schema
get_liquid_reference存取 Liquid 範本語言參考
get_function_referenceShopify 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

最強大的模式是將 Dev MCP(用於文件)與 Store MCP(用於即時資料)結合使用。讓 Claude 在文件中查找正確的 API 方法,然後在您的商店上執行——全部在一次對話中完成。