GS

geli2001/shopify-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

239 stars 122 forks 质量 73 趋势 18MIT

用于Shopify api的MCP服务器,可用于Claude和Cursor等MCP主机

概览

Shopify API 的 MCP 服务器,支持通过 GraphQL API 与商店数据的交互。该服务器提供管理产品、客户、订单等的工具。 - : 产品、变体和选项的完整 CRUD(8 个工具)- : 完整的 CRUD、合并和地址管理(8 个工具) - : 智能查找、取消、关闭/打开、标记为已付款、履行、退款(10 个工具) - : 获取、设置和删除任意资源的元字段(3 个工具) - : 在各地点设置绝对库存数量(1 个工具) - : 在任何可标记资源上添加/移除标签(1 个工具) - : 所有列表查询的基于光标的分页和排序键 - : 所有列表端点的直通 Shopify 查询语法 - : 直接集成 Shopify 的 GraphQL 管理 API(2026-01) - : API 和认证问题的清晰错误信息 1. Node.js(版本18或更高) 2.

概述(AI 翻译)

(如果你愿意,请留下一颗星!)

Shopify API 的 MCP 服务器,支持通过 GraphQL API 与商店数据的交互。该服务器提供管理产品、客户、订单等的工具。

** 📦 包名:shopify-mcp** ** 🚀 命令:shopify-mcp (非 shopify-mcp-server)**

特色

  • 产品管理:产品、变体和选项的完整CRUD(8个工具)
  • 客户管理:完整的CRUD、合并和地址管理(8个工具)
  • 订单管理:智能查询、取消、关闭/打开、标记为已付款、履行、退款(10个工具)
  • 元字段管理:获取、设置和删除任意资源的元字段(3个工具)
  • 库存管理:在各地点设定绝对库存数量(1个工具)
  • 标签管理:添加/移除任何可标记资源的标签(1个工具)
  • 分页与排序:所有列表查询均基于光标的分页和排序键
  • 高级筛选:所有列表端点的直通Shopify查询语法
  • GraphQL 集成:直接集成 Shopify 的 GraphQL 管理 API(2026-01)
  • 全面错误处理:针对API和认证问题提供清晰的错误信息

先修条件

  1. 节点。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Shopify MCP Server

(please leave a star if you like!)

MCP Server for Shopify API, enabling interaction with store data through GraphQL API. This server provides tools for managing products, customers, orders, and more.

📦 Package Name: shopify-mcp 🚀 Command: shopify-mcp (NOT shopify-mcp-server)

Features

  • Product Management: Full CRUD for products, variants, and options (8 tools)
  • Customer Management: Full CRUD, merge, and address management (8 tools)
  • Order Management: Smart lookup, cancel, close/open, mark as paid, fulfillment, refunds (10 tools)
  • Metafield Management: Get, set, and delete metafields on any resource (3 tools)
  • Inventory Management: Set absolute inventory quantities at locations (1 tool)
  • Tag Management: Add/remove tags on any taggable resource (1 tool)
  • Pagination & Sorting: Cursor-based pagination and sort keys on all list queries
  • Advanced Filtering: Pass-through Shopify query syntax for all list endpoints
  • GraphQL Integration: Direct integration with Shopify’s GraphQL Admin API (2026-01)
  • Comprehensive Error Handling: Clear error messages for API and authentication issues

Prerequisites

  1. Node.js (version 18 or higher)
  2. A Shopify store with a custom app (see setup instructions below)

Setup

Authentication

This server supports two authentication methods:

Option 1: Client Credentials (Dev Dashboard apps, January 2026+)

As of January 1, 2026, new Shopify apps are created in the Dev Dashboard and use OAuth client credentials instead of static access tokens.

  1. From your Shopify admin, go to Settings > Apps and sales channels
  2. Click Develop apps > Build app in dev dashboard
  3. Create a new app and configure Admin API scopes:
    • read_products, write_products
    • read_customers, write_customers
    • read_orders, write_orders
  4. Install the app on your store
  5. Copy your Client ID and Client Secret from the app’s API credentials

The server will automatically exchange these for an access token and refresh it before it expires (tokens are valid for ~24 hours).

Option 2: Static Access Token (legacy apps)

If you have an existing custom app with a static shpat_ access token, you can still use it directly.

Usage with Claude Desktop

Client Credentials (recommended):

{
  "mcpServers": {
    "shopify": {
      "command": "npx",
      "args": [
        "shopify-mcp",
        "--clientId",
        "",
        "--clientSecret",
        "",
        "--domain",
        ".myshopify.com"
      ]
    }
  }
}

Static Access Token (legacy):

{
  "mcpServers": {
    "shopify": {
      "command": "npx",
      "args": [
在 GitHub 查看完整 README

安装

npx shopify-mcp --clientId <YOUR_CLIENT_ID> --clientSecret <YOUR_CLIENT_SECRET> --domain <YOUR_SHOP>.myshopify.com
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "shopify": { "command": "npx", "args": [ "shopify-mcp", "--clientId", "<YOUR_CLIENT_ID>", "--clientSecret", "<YOUR_CLIENT_SECRET>", "--domain", "<YOUR_SHOP>.myshopify.com" ] } } }