shopify-mcp

MCPAI代理

提供方 Cesarjoquin · 包名 shopify-mcp

AI代理 stdio · 本地进程 未标注 社区 / 第三方 Claude DesktopCursorClineClaude Code
查看接入方式

shopify mcp server for Claude Desktop, Claude Code, or any MCP-compatible client to manage products, customers, orders, inventory, and metafields through a typed tool interface of shopify mcp

一句话选型结论

按资料字段整理

shopify-mcp 属于AI代理类 MCP 服务器,stdio · 本地进程,鉴权方式未标注,可直接接入 Claude Desktop、Cursor、Cline 等,有可直接执行的安装命令。接入前先确认权限范围;涉及写入、删除或付款的操作,建议先在测试环境验证。

分类AI代理 传输方式stdio · 本地进程 鉴权未标注 部署方式本地部署
GitHub 星标 139 仓库热度,无公开仓库时显示未标注
工具数 未标注 暴露给模型的工具数量
资源 / 提示词 0 / 0 资源与提示词模板数量
维护方 社区 / 第三方 核验等级 仅资料核对

工具与能力

AI代理
数量来自来源目录的标注,具体工具清单以官方文档为准
工具数量未标注暴露给模型可调用的工具个数
资源数量0可读取的资源条目
提示词数量0内置提示词模板数量

能力标签

claude-desktop mcp mcp-tool shopify shopify-mcp

支持客户端

适用场景

claude-desktopmcpmcp-tool

安装与配置

stdio · 本地进程 未标注
客户端在本机拉起子进程,数据不出本机
cargo install shopify-mcp

这条命令只是入口,具体启动参数请按官方文档补齐,不要直接照搬到别的服务器。

  1. 1
    准备运行环境

    stdio 服务在本地起进程,需要先装好 Cross-platform,再按安装命令拉取依赖。

  2. 2
    安装服务

    复制上面的安装命令执行;命令里带占位符的位置,换成自己的密钥或路径。

  3. 3
    写入客户端配置

    在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4
    验证是否可用

    连接成功后随便调一个只读工具,确认能返回结果,再接入正式流程。

典型使用场景

3 类
按分类与标签整理的常见用法,具体以官方文档为准
给代理接外部能力

让代理在任务中途调用搜索、数据库等真实工具。

多步任务编排

把一串操作拆成步骤,由代理按顺序执行。

自动化重复流程

把固定流程交给代理跑,减少手工操作。

选择建议

选之前先看这几条
按条目字段给出的判断,不替你决定用不用

值得选的地方

  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已适配 Claude Desktop、Cursor、Cline,换客户端不用重新研究配置。

先想清楚的地方

  • stdio 方式要求本地装好运行时(如 Node.js),换机器要重新装一遍。
  • 资料没标注工具数量,实际能力要装好后确认。
  • 版本更新与行为细节以官方仓库为准。

更适合

  • 需要在AI代理场景里让模型直接调用外部能力的人。
  • 已经在用 Claude Desktop、Cursor 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地或自有环境跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

6 个同类
同分类里挑最接近的几条,字段以各自详情页为准
MCP 服务器工具数传输方式部署方式安装命令最后核验
shopify-mcp当前 未标注 stdio · 本地进程 本地部署 有 2026-08-23
Filesystem 560c4363 13 未标注 本地部署 无 2026-05-17
Server Everything (everything) 11 stdio · 本地进程 本地部署 有 2026-05-17
Time 7365cb6d 2 SSE · 服务端推送 远程部署 有 2026-05-18
Everything Claude Code 未标注 stdio · 本地进程 本地部署 有 2026-05-17
Openmemory 557e1585 未标注 stdio · 本地进程 本地部署 有 2026-05-17

服务器档案

AI代理
字段来自项目仓库与公开索引,中文说明由本站标注
提供方Cesarjoquin上游标注的维护方 Cesarjoquin
分类AI代理本站按上游分类展示
连接方式stdio · 本地进程客户端在本机拉起子进程,数据不出本机
鉴权方式未标注远程服务建议用最小权限凭据
维护方社区 / 第三方核验等级 仅资料核对
包名 / 运行时shopify-mcp · Cross-platform本地安装时用到的包标识与运行时
部署类型本地部署上游给出的部署形态
最近核验2026-08-23上游最后核验时间

详细介绍

8.6 KB
来自项目仓库与上游目录的原文,未做删改

Shopify MCP Server

A production-oriented Model Context Protocol server that exposes the Shopify Admin GraphQL API to AI assistants. Connect Claude Desktop, Claude Code, or any MCP-compatible client to manage products, customers, orders, inventory, and metafields through a typed tool interface.


Table of Contents

  • Overview
  • Architecture
  • Features
  • Requirements
  • Installation
  • Configuration
  • Development
  • Testing
  • Project Structure
  • Troubleshooting
  • Contributing
  • FAQ
  • License

Overview

This server translates MCP tool calls into Shopify Admin GraphQL operations. It supports static access tokens and OAuth client-credentials (Dev Dashboard apps), optional Redis-backed token persistence, structured JSON logging, and graceful shutdown.```mermaid
flowchart LR
Client[MCP Client] -->|stdio JSON-RPC| Server[MCP Server]
Server --> Tools[Tool Registry]
Tools --> GraphQL[Shopify Admin GraphQL]
Server --> Auth[OAuth Token Manager]
Auth --> Redis[(Redis Cache)]
Auth --> GraphQL


---

## Architecture

### Runtime layers

| Layer | Responsibility |
|-------|----------------|
| `src/index.ts` | Process entry, error boundary |
| `src/server/` | Bootstrap, MCP wiring, shutdown hooks |
| `src/config/` | Environment and CLI configuration |
| `src/lib/` | Auth, logging, Redis, shared utilities |
| `src/tools/` | 40 MCP tools (products, orders, customers, …) |

### Request workflow```mermaid
sequenceDiagram
  participant C as MCP Client
  participant M as McpServer
  participant T as Tool
  participant S as Shopify API

  C->>M: tools/call
  M->>T: execute(args)
  T->>T: Zod schema validation
  T->>S: GraphQL request
  S-->>T: Response
  T-->>M: Formatted JSON
  M-->>C: MCP content block

Authentication flow```mermaid

sequenceDiagram
participant S as Server
participant R as Redis
participant SH as Shopify OAuth

S->>R: Check cached token
alt Valid cache hit
R-->>S: access_token
else Cache miss
S->>SH: client_credentials grant
SH-->>S: access_token + expires_in
S->>R: Store token with TTL
end
Note over S: Auto-refresh 5 min before expiry


---

## Features

| Category | Capabilities |
|----------|-------------|
| **Products** | CRUD, variants, options, collections |
| **Customers** | CRUD, merge, address management |
| **Orders** | Query, cancel, fulfill, refund, draft orders |
| **Metafields** | Read, write, delete on any resource |
| **Inventory** | Set quantities, read levels and items |
| **Discovery** | Shop info, locations, markets, price lists |
| **Platform** | Redis token cache, structured logging, graceful shutdown, strict TypeScript |

All list tools support cursor pagination, sorting, and Shopify search syntax filtering.

---

## Requirements

- **Node.js** 18 or later
- **Shopify store** with a custom app and Admin API scopes
- **Redis** (optional) for OAuth token persistence across restarts

### Required Admin API scopes

`read_products`, `write_products`, `read_customers`, `write_customers`, `read_orders`, `write_orders` (plus scopes for inventory/metafields as needed).

---

## Installation

### Run with npx (recommended)```bash
npx shopify-mcp \
  --clientId YOUR_CLIENT_ID \
  --clientSecret YOUR_CLIENT_SECRET \
  --domain your-store.myshopify.com

Install from source```bash

git clone https://github.com/GeLi2001/shopify-mcp.git
cd shopify-mcp
npm install
npm run build
npm start


### Claude Desktop

Add to `claude_desktop_config.json`:```json
{
  "mcpServers": {
    "shopify": {
      "command": "npx",
      "args": [
        "shopify-mcp",
        "--clientId", "<CLIENT_ID>",
        "--clientSecret", "<CLIENT_SECRET>",
        "--domain", "<store>.myshopify.com"
      ]
    }
  }
}

Config locations:
- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
- Windows: %APPDATA%/Claude/claude_desktop_config.json


Configuration

Copy .env.example to .env and fill in values:```bash
cp .env.example .env


### Environment variables

| Variable | Required | Description |
|----------|----------|-------------|
| `MYSHOPIFY_DOMAIN` | Yes | Store domain, e.g. `store.myshopify.com` |
| `SHOPIFY_ACCESS_TOKEN` | Option A | Static `shpat_` token (legacy apps) |
| `SHOPIFY_CLIENT_ID` | Option B | Dev Dashboard client ID |
| `SHOPIFY_CLIENT_SECRET` | Option B | Dev Dashboard client secret |
| `SHOPIFY_API_VERSION` | No | API version (default: `2026-01`) |
| `LOG_LEVEL` | No | `debug`, `info`, `warn`, `error` |
| `REDIS_ENABLED` | No | Enable Redis persistence (`true`/`false`) |
| `REDIS_URL` | If Redis | Connection URL, e.g. `redis://127.0.0.1:6379` |
| `REDIS_KEY_PREFIX` | No | Key namespace prefix (default: `shopify-mcp:`) |
| `REDIS_MAX_RETRIES` | No | Max command retries (default: `10`) |
| `REDIS_CONNECT_TIMEOUT_MS` | No | Connect timeout in ms (default: `10000`) |

CLI flags (`--accessToken`, `--clientId`, `--clientSecret`, `--domain`, `--apiVersion`) override environment variables.

---

## Development```bash
# Install dependencies
npm install

# Run in development (TypeScript directly)
npm run dev

# Full validation pipeline
npm run validate

# GraphQL schema validation
npm run validate:graphql

Scripts

Script Purpose
npm run build Compile TypeScript to dist/
npm run typecheck Type-check source and tests
npm run lint ESLint
npm test Jest unit tests
npm run validate typecheck + lint + test + build

Testing

Tests live in tests/ and cover configuration parsing, logging, error utilities, and Redis token caching.```bash
npm test


Tests use mocked Redis clients — no running Redis instance required for the test suite.

---

## Project Structure```
shopify-mcp/
├── docs/
│   └── AUDIT.md           # Internal architecture audit
├── src/
│   ├── config/            # Environment loading (Zod-validated)
│   ├── lib/               # Auth, logging, Redis, tool factory
│   │   └── redis/         # Connection manager + token cache
│   ├── server/            # Bootstrap, MCP server, shutdown
│   ├── tools/             # MCP tool implementations
│   └── index.ts           # Entry point
├── tests/                 # Unit tests
├── .env.example           # Configuration template
├── .github/workflows/     # CI (build, lint, test, typecheck)
└── package.json

Design decisions:
- Tools use a createTool() factory to eliminate duplicated GraphQL client wiring.
- Configuration is centralized in src/config/env.ts with Zod validation.
- OAuth tokens optionally persist in Redis so restarts do not force re-authentication.
- Logs are structured JSON on stderr (safe for stdio MCP transport).


Troubleshooting

Authentication errors```

Authentication credentials are required


Provide either `SHOPIFY_ACCESS_TOKEN` or both `SHOPIFY_CLIENT_ID` and `SHOPIFY_CLIENT_SECRET`.

### Wrong package installed

If you see errors referencing a different package name, verify you are running `shopify-mcp` (this package), not a similarly named alternative.

### MCP connection issues

Check Claude Desktop MCP logs:```bash
# macOS
tail -f ~/Library/Logs/Claude/mcp*.log

Ensure the server starts without errors:```bash
SHOPIFY_ACCESS_TOKEN=shpat_xxx MYSHOPIFY_DOMAIN=store.myshopify.com npm start


### Redis connection failures

If `REDIS_ENABLED=true` but Redis is unreachable, the server exits at startup. Either start Redis locally or set `REDIS_ENABLED=false`.```bash
docker run -d -p 6379:6379 redis:7-alpine

GraphQL userErrors

Shopify returns field-level errors in mutation responses. The server surfaces these as Failed to : field: message.


Contributing

  1. Fork the repository and create a feature branch.
  2. Run npm run validate before opening a pull request.
  3. Keep commits focused and write clear commit messages.
  4. Add tests for new library or configuration behavior.
  5. Do not commit secrets, .env, or package-lock.json.

FAQ

Does this replace the Shopify Admin UI?
No. It provides programmatic access for AI assistants via MCP.

Can I use a static access token?
Yes. Set SHOPIFY_ACCESS_TOKEN for legacy custom apps with shpat_ tokens.

Is Redis required?
No. Redis is optional and only caches OAuth tokens for client-credentials auth.

How many tools are available?
40 tools covering products, customers, orders, metafields, inventory, and store discovery.

Which API version is used?
Default 2026-01. Override with SHOPIFY_API_VERSION or --apiVersion.

Why JSON logs on stderr?
MCP uses stdout for the protocol. Logs must go to stderr to avoid corrupting the transport.


License

MIT — see LICENSE.

常见问题

8 问
答案由本站依据条目字段整理,不引用上游原文
shopify-mcp 怎么安装?

在客户端按下面的安装命令接入:cargo install shopify-mcp。对应的包名是 shopify-mcp。装完在客户端配置里引用同一个包或端点。

shopify-mcp 怎么在 Claude Desktop、Cursor、Cline 里配置?

它的传输方式是stdio · 本地进程,在客户端的 MCP 配置里填好启动命令和参数,保存后完全退出客户端再打开,配置才会生效。

shopify-mcp 收费吗?

本站不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

shopify-mcp 需要 API Key 吗?

资料没有标注鉴权方式,是否需要密钥取决于服务本身,接入前按官方文档确认。

shopify-mcp 支持哪些客户端?

资料标注支持 Claude Desktop、Cursor、Cline、Claude Code;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

shopify-mcp 能提供哪些能力?

资料显示能力标签包括 claude-desktop、mcp、mcp-tool、shopify、shopify-mcp。具体工具清单以官方文档为准。

shopify-mcp 需要什么运行环境?

运行时为 Cross-platform;属于本地进程,需要在本机装好运行环境。

shopify-mcp 是本地还是远程?

它是本地进程(stdio),由客户端在本机拉起。传输方式为stdio · 本地进程。

热门专题

按标签挑服务器
全部专题 →

服务器信息以作者仓库与官方文档为准;分类、传输方式与鉴权方式的中文说明为中文整理,最近核验 2026-08-23。