shopify-mcp

shopify-mcp

Okay, here's a translation of "for Shopify API interaction including product, customer, order" into Chinese, along with some nuances and options depending on the specific context: **Option 1 (Most General):** * **中文:** 用于 Shopify API 交互,包括产品、客户和订单。 * **Pinyin:** Yòng yú Shopify API jiāohù, bāokuò chǎnpǐn, kèhù hé dìngdān. * **Explanation:** This is a straightforward and common translation. It's suitable for general documentation or explanations. **Option 2 (More Emphasis on "Handling" or "Working With"):** * **中文:** 用于 Shopify API 交互,处理产品、客户和订单。 * **Pinyin:** Yòng yú Shopify API jiāohù, chǔlǐ chǎnpǐn, kèhù hé dìngdān. * **Explanation:** The word "处理 (chǔlǐ)" means "to handle," "to process," or "to deal with." This option is better if you want to emphasize the actions you're taking with the data. **Option 3 (More Technical, Emphasizing Data Manipulation):** * **中文:** 用于 Shopify API 交互,涉及产品、客户和订单的数据操作。 * **Pinyin:** Yòng yú Shopify API jiāohù, shèjí chǎnpǐn, kèhù hé dìngdān de shùjù cāozuò. * **Explanation:** This is a more technical translation. "涉及 (shèjí)" means "involving" or "relating to," and "数据操作 (shùjù cāozuò)" means "data manipulation." This is suitable for technical documentation or code comments. **Option 4 (More Specific to Development):** * **中文:** 用于 Shopify API 交互,开发产品、客户和订单相关功能。 * **Pinyin:** Yòng yú Shopify API jiāohù, kāifā chǎnpǐn, kèhù hé dìngdān xiāngguān gōngnéng. * **Explanation:** This option is suitable if you are talking about developing features related to product, customer and order. "开发 (kāifā)" means "to develop", and "相关功能 (xiāngguān gōngnéng)" means "related features". **Key Vocabulary:** * **Shopify API:** Shopify API (No translation needed, commonly used as is) * **交互 (jiāohù):** Interaction * **产品 (chǎnpǐn):** Product * **客户 (kèhù):** Customer * **订单 (dìngdān):** Order * **用于 (yòng yú):** Used for * **包括 (bāokuò):** Including * **处理 (chǔlǐ):** To handle, to process, to deal with * **涉及 (shèjí):** Involving, relating to * **数据操作 (shùjù cāozuò):** Data manipulation * **开发 (kāifā):** To develop * **相关功能 (xiāngguān gōngnéng):** Related features **Which option is best?** The best option depends on the context. If you're writing general documentation, Option 1 is a good choice. If you're describing the actions you're taking, Option 2 is better. If you're writing technical documentation, Option 3 might be more appropriate. If you are talking about development, Option 4 is a good choice. I hope this helps! Let me know if you have any other questions.

Category
访问服务器

Tools

get-products

get-product-by-id

get-customers

get-orders

update-order

README

Shopify MCP 服务器

(如果您喜欢,请留下一个星星!)

用于 Shopify API 的 MCP 服务器,可以通过 GraphQL API 与商店数据进行交互。此服务器提供用于管理产品、客户、订单等的工具。

<a href="https://glama.ai/mcp/servers/@GeLi2001/shopify-mcp"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@GeLi2001/shopify-mcp/badge" alt="Shopify MCP server" /> </a>

功能

  • 产品管理: 搜索和检索产品信息
  • 客户管理: 加载客户数据和管理客户标签
  • 订单管理: 高级订单查询和过滤
  • GraphQL 集成: 与 Shopify 的 GraphQL Admin API 直接集成
  • 全面的错误处理: 针对 API 和身份验证问题的清晰错误消息

前提条件

  1. Node.js (版本 16 或更高)
  2. Shopify 自定义应用访问令牌 (请参阅下面的设置说明)

设置

Shopify 访问令牌

要使用此 MCP 服务器,您需要在 Shopify 商店中创建一个自定义应用:

  1. 在 Shopify 管理后台中,转到 设置 > 应用和销售渠道
  2. 点击 开发应用 (您可能需要先启用开发者预览)
  3. 点击 创建应用
  4. 为您的应用设置一个名称 (例如,"Shopify MCP Server")
  5. 点击 配置 Admin API 范围
  6. 选择以下范围:
    • read_products, write_products
    • read_customers, write_customers
    • read_orders, write_orders
  7. 点击 保存
  8. 点击 安装应用
  9. 点击 安装 以授予应用访问您的商店数据的权限
  10. 安装完成后,您将看到您的 Admin API 访问令牌
  11. 复制此令牌 - 您将需要它进行配置

与 Claude Desktop 一起使用

将其添加到您的 claude_desktop_config.json

{
  "mcpServers": {
    "shopify": {
      "command": "npx",
      "args": [
        "shopify-mcp",
        "--accessToken",
        "<YOUR_ACCESS_TOKEN>",
        "--domain",
        "<YOUR_SHOP>.myshopify.com"
      ]
    }
  }
}

Claude Desktop 配置文件位置:

  • MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%/Claude/claude_desktop_config.json

替代方案:使用环境变量在本地运行

如果您更喜欢使用环境变量而不是命令行参数:

  1. 创建一个包含您的 Shopify 凭据的 .env 文件:

    SHOPIFY_ACCESS_TOKEN=your_access_token
    MYSHOPIFY_DOMAIN=your-store.myshopify.com
    
  2. 使用 npx 运行服务器:

    npx shopify-mcp-server
    

直接安装 (可选)

如果您想全局安装该软件包:

npm install -g shopify-mcp-server

然后运行它:

shopify-mcp-server --accessToken=<YOUR_ACCESS_TOKEN> --domain=<YOUR_SHOP>.myshopify.com

可用工具

产品管理

  1. get-products

    • 获取所有产品或按标题搜索
    • 输入:
      • searchTitle (可选字符串): 按标题过滤产品
      • limit (数字): 要返回的最大产品数量
  2. get-product-by-id

    • 按 ID 获取特定产品
    • 输入:
      • productId (字符串): 要检索的产品的 ID

客户管理

  1. get-customers

    • 获取客户或按姓名/电子邮件搜索
    • 输入:
      • searchQuery (可选字符串): 按姓名或电子邮件过滤客户
      • limit (可选数字, 默认: 10): 要返回的最大客户数量
  2. update-customer

    • 更新客户的信息
    • 输入:
      • id (字符串, 必需): Shopify 客户 ID (仅限数字 ID, 例如 "6276879810626")
      • firstName (字符串, 可选): 客户的名字
      • lastName (字符串, 可选): 客户的姓氏
      • email (字符串, 可选): 客户的电子邮件地址
      • phone (字符串, 可选): 客户的电话号码
      • tags (字符串数组, 可选): 要应用于客户的标签
      • note (字符串, 可选): 关于客户的备注
      • taxExempt (布尔值, 可选): 客户是否免税
      • metafields (对象数组, 可选): 用于存储其他数据的客户元字段
  3. get-customer-orders

    • 获取特定客户的订单
    • 输入:
      • customerId (字符串, 必需): Shopify 客户 ID (仅限数字 ID, 例如 "6276879810626")
      • limit (可选数字, 默认: 10): 要返回的最大订单数量

订单管理

  1. get-orders

    • 获取订单,并可选择过滤
    • 输入:
      • status (可选字符串): 按订单状态过滤
      • limit (可选数字, 默认: 10): 要返回的最大订单数量
  2. update-order

    • 使用新信息更新现有订单
    • 输入:
      • id (字符串, 必需): Shopify 订单 ID
      • tags (字符串数组, 可选): 订单的新标签
      • email (字符串, 可选): 更新客户电子邮件
      • note (字符串, 可选): 订单备注
      • customAttributes (对象数组, 可选): 订单的自定义属性
      • metafields (对象数组, 可选): 订单元字段
      • shippingAddress (对象, 可选): 运送地址信息

调试

如果遇到问题,请检查 Claude Desktop 的 MCP 日志:

tail -n 20 -f ~/Library/Logs/Claude/mcp*.log

许可证

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选