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[]产品 metafields
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[]要设置或更新的 metafields

服务器: 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

创建、更新或删除产品 metafields。

参数类型必填描述
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原价
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[]客户 metafields
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[]智能产品系列规则(smart 类型必填)
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 架构
get_liquid_reference访问 Liquid 模板语言参考
get_function_referenceShopify Functions API 参考和脚手架
validate_graphql根据 Shopify 架构验证 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 方法,然后在你的商店上执行——全部在一次对话中完成。