连接器指南阅读约 3 分钟23 个 MCP 工具7 种语言

SHOPLINE MCP 连接 Cursor:商品与库存

通过 Admin REST API 访问 SHOPLINE 商店 (myshopline.com):订单、履行和跟踪、交易和退款、产品和变体、客户、位置和库存水平。私有应用访问令牌。

HC作者:HelpCode 团队更新于 3 分钟阅读 在 GitHub 开源

无需信用卡 · 7 天试用 · 提供自托管方案

SHOPLINE

SHOPLINE

SHOPLINE stores (myshopline.com) through the Admin REST API: orders, fulfillments and tracking, transactions and refunds, products and variants, customers, locations and inventory levels. Private app access token.

个工具

23

区域

INTL

类别

电子商务

身份验证

Bearer Token

所需环境变量

SHOPLINE_HANDLESHOPLINE_ACCESS_TOKEN
在 Cloud 上一键安装

7 天免费试用 · 无需信用卡

  • 7 天免费试用
    无需信用卡
  • 符合 GDPR,SOC 2 就绪
    数据驻留欧盟,审计日志
  • 在 GitHub 开源
    开源 · AGPL-3.0
  • 支持 ChatGPT、Claude、Gemini
    任何兼容 MCP 的客户端

摘要

通过 Admin REST API 访问 SHOPLINE 商店 (myshopline.com):订单、履行和跟踪、交易和退款、产品和变体、客户、位置和库存水平。私有应用访问令牌。

引导式设置

2 分钟将 SHOPLINE 连接到 Cursor

开始 AnythingMCP Cloud 免费试用,在引导式设置中连接 SHOPLINE,再把你的 MCP URL 添加到 Cursor。无需代码,也无需自行运行服务器。

无需信用卡 · 7 天试用 · 提供自托管方案

试试这样问

SHOPLINE 的示例提示

点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。

SHOPLINE · 通过 MCP 实时
分享
Opus 4.7

Claude 是 AI,可能会出错。请核对回答。

💡 没有安装?直接使用 cloud.anythingmcp.com。 登录,点击 Connectors → SHOPLINE,粘贴你的凭据,生成一个 MCP API 密钥,完成。无需 Docker,无需 git clone,无需本地服务器。

SHOPLINE + Cursor

通过 Admin REST API 访问 SHOPLINE 商店 (myshopline.com):订单、履行和跟踪、交易和退款、产品和变体、客户、位置和库存水平。私有应用访问令牌。

前提条件

请查看连接器中包含的完整设置说明(在选择连接器时可在应用内商店中查看)。此连接器所需的环境变量为:

SHOPLINE_HANDLE, SHOPLINE_ACCESS_TOKEN

第一步 — 获取凭据

设置大约需要 5 分钟。

  1. 登录到 SHOPLINE 管理后台 https://admin.myshopline.com,打开 Apps,然后 Develop Apps(右上角),创建一个私有应用。
  2. 为其提供工具所需的访问范围:read_orders, write_orders, read_products, write_products, read_customers, read_inventory, write_inventory, read_location, read_assigned_fulfillment_orders 和 write_assigned_fulfillment_orders(仅读取范围对于读取工具来说就足够了)。
  3. 打开应用的 API 证书,将 访问令牌 复制到 SHOPLINE_ACCESS_TOKEN 中。私有应用令牌有效期为 3 年,可以在此处刷新;删除应用将撤销该令牌。
  4. 在 SHOPLINE_HANDLE 中输入商店句柄,即 <handle>.myshopline.com 的第一部分。

从哪里开始:使用 shopline_list_orders,status 为任意(当你查找已发货订单时使用 fulfillment_status),然后是 shopline_list_order_fulfillments。对于产品使用 shopline_list_products,shopline_get_product 和 shopline_list_product_variants。

订单:shopline_list_orders,shopline_count_orders,shopline_update_order(标签、联系人、备注、送货地址),shopline_list_order_transactions,shopline_list_order_refunds。id 是订单 ID;name 是客户看到的订单号(1001 及以上,可以有可选前缀)。取消和退款不包括在内,因为它们会退还资金。

发货:shopline_create_fulfillment 使用跟踪号码发货,shopline_list_order_fulfillments 列出发货,shopline_update_fulfillment_tracking 替换一个发货的跟踪列表(发送所有条目,其余条目将被清除)。

产品:shopline_list_products,shopline_get_product,shopline_count_products,shopline_update_product(状态为活动时发布,草稿时隐藏),shopline_list_product_variants,shopline_update_variant(价格、比较价格、SKU、条形码)。标签以列表形式输入,并以逗号分隔的字符串返回。每个变体最多有五个选项。

客户:shopline_list_customers,shopline_get_customer,shopline_search_customers,shopline_list_customer_orders。

库存:每个变体都有一个 inventory_item_id。shopline_list_locations,shopline_get_inventory_items,shopline_get_inventory_levels,然后是 shopline_set_inventory(绝对值)或 shopline_adjust_inventory(增量)。

分页:列表使用游标。当有下一页时,答案中包含 _pagination.nextUrl;传递其 page_info 值,保持相同的限制。最后一页缺少 _pagination。

ID 和格式:ID 是长数字字符串(26 位数字):始终将其作为文本传递。时间为 ISO 8601;价格为商店货币的十进制字符串。

速率限制:每个应用和商店每秒 4 个请求,突发可达 40 个排队;超过此限制,SHOPLINE 会返回 429 请求过多。答案限制为 8 MB,因此对于大商店,请使用 fields 和更小的限制。

第二步 — 安装适配器

curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d

第三步 — 在 Cursor 中添加连接器

你的服务器 URL: 在 AnythingMCP 中打开 MCP Servers → 此连接器所在的服务器,复制它的 URL(https://cloud.anythingmcp.com/mcp/…)。本指南中出现 YOUR_SERVER_ID 的地方都用它替换。

Cursor 从 ~/.cursor/mcp.json 读取 MCP 服务器。添加以下条目:

{
  "mcpServers": {
    "anythingmcp": {
      "url": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
      "headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
    }
  }
}
  1. 在 AnythingMCP 的 MCP Servers → 你的服务器 → API keys 中创建 MCP API 密钥,并用它替换 YOUR_MCP_API_KEY。
  2. 保存文件并重启 Cursor。
  3. 打开 Cursor → Settings → MCP,确认 anythingmcp 已列出并处于已连接状态。
  4. 开始对话 — 智能体现在可以调用 SHOPLINE 的工具。

可用工具

工具功能
shopline_list_orders列出订单:id,name(订单号,例如 1001),order_at,financial_status,fulfillment_status,status,currency,current_total_price…
shopline_count_orders计算符合过滤条件的订单(状态、支付、发货、日期):返回计数。只读
shopline_update_order更改订单的标签、买家电子邮件或电话、商家备注(note_attributes)或送货地址。仅发送给定字段;标签…
shopline_list_order_fulfillments列出订单的履行(发货):id,status,tracking_company,tracking_number,tracking_url,line_items 和 created_at
shopline_create_fulfillment发货订单(全部或给定的行项目),带有跟踪号码和承运人。notify_customer 发送发货电子邮件。返回…
shopline_update_fulfillment_tracking替换履行的跟踪信息。列表替换存储的内容:遗漏的跟踪条目将被移除
shopline_list_order_transactions列出订单的支付交易:id,kind(销售、退款等),status,amount,currency,gateway 和 processed_at。只读
shopline_list_order_refunds列出订单的退款:id,created_at,note,refund_line_items 和金额的交易。只读
shopline_list_products列出产品:id,title,handle,status(活动、草稿、归档),vendor,tags,product_category,created_at,updated_at,options 和…
shopline_get_product读取一个产品:title,body_html,status,vendor,tags,handle,options,images,media 和价格、sku、条形码、重量等变体
shopline_count_products计算符合过滤条件的产品(状态、集合、日期):返回计数。只读
shopline_update_product更改产品:title,subtitle,description(body_html),status(活动发布,草稿隐藏,归档归档),vendor,tags…
shopline_list_product_variants列出产品的变体:id,sku,barcode,price,compare_at_price,option1 到 option5,weight,inventory_quantity,inventory_policy…
shopline_update_variant更改变体:价格和比较价格(商店货币的十进制字符串),sku,barcode,weight 和 weight_unit…
shopline_list_customers列出客户:id,email,phone,first_name,last_name,state,tags,orders_count,total_spent,accepts_marketing,addresses 和…
shopline_get_customer读取一个客户:email,phone,names,state,tags,note,orders_count,total_spent,marketing consent 和地址
shopline_search_customers按名称、电子邮件、电话或地址文本(query_param)搜索客户,或按标签或 orders_count(query)等精确标准搜索。相同…
shopline_list_customer_orders列出一个客户的订单,字段与 shopline_list_orders 相同。每页最多 100 个
shopline_list_locations列出库存位置(仓库和商店):id,name,address,active 以及是否为默认位置
shopline_get_inventory_items读取库存项目(每个变体一个):id,sku,tracked,cost 和原产国。每个变体上都有 inventory_item_id
shopline_get_inventory_levels读取每个库存项目和位置的可用库存:inventory_item_id,location_id,available 和 updated_at
shopline_set_inventory将库存项目在某个位置的可用库存设置为绝对数字(替换当前数量)
shopline_adjust_inventory通过增量更改库存项目在某个位置的可用库存:正数增加,负数减少

示例提示

  • "这周有多少个 SHOPLINE 订单进来,多少个未履行?"
  • "将 DHL 跟踪 1234567890 添加到订单 #1052 的履行中。"
  • "哪些变体在我们的主要位置少于 5 个单位?"
  • "显示客户 Anna Berg 的所有订单。"
  • "上个月哪些订单被退款,退款金额是多少?"

常见问题

它覆盖哪个 SHOPLINE? myshopline.com 上的商店,通过 SHOPLINE Admin REST API。旧的 SHOPLINE 平台 shoplineapp.com 有不同的 API,不在覆盖范围内。

访问令牌来自哪里? SHOPLINE 管理后台,Apps,Develop Apps:创建一个具有工具所需范围的私有应用,并从其 API 证书中复制访问令牌。也输入商店句柄。

哪些工具安装时关闭? 没有。交易和退款为只读,所有写入(订单备注、履行、跟踪、产品和库存更改)在运行之前都会显示给你。

Cursor 免费套餐支持自定义 MCP 服务器吗? 支持 — Hobby、Pro 和 Business 套餐均可使用 MCP。

下一步

这份指南对你有帮助吗?

2 分钟将 SHOPLINE 连接到 Cursor

开始 AnythingMCP Cloud 免费试用,在引导式设置中连接 SHOPLINE,再把你的 MCP URL 添加到 Cursor。无需代码,也无需自行运行服务器。

相关指南