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[] | 否 | 产品 metafields |
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[] | 否 | 要设置或更新的 metafields |
服务器: 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
创建、更新或删除产品 metafields。
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
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 | 否 | 原价 |
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[] | 否 | 客户 metafields |
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[] | 否 | 智能产品系列规则(smart 类型必填) |
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 架构 |
get_liquid_reference | 访问 Liquid 模板语言参考 |
get_function_reference | Shopify 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(用于实时数据)组合使用。让 Claude 先在文档中查找正确的 API 方法,然后在你的商店上执行——全部在一次对话中完成。