内容
# Shopify 管理后台 MCP
Shopify 管理后台 API 操作的 MCP 服务器
[日本語版はこちら](README.ja.md)
## 设置
```bash
npm install
```
## 环境变量
```
SHOPIFY_SHOP_DOMAIN=您的商店.myshopify.com
SHOPIFY_ACCESS_TOKEN=shpat_xxxxx
```
## Claude 桌面端配置
```json
{
"mcpServers": {
"shopify-admin": {
"command": "node",
"args": ["--experimental-strip-types", "/path/to/shopify-admin-mcp/src/index.ts"],
"env": {
"SHOPIFY_SHOP_DOMAIN": "您的商店.myshopify.com",
"SHOPIFY_ACCESS_TOKEN": "shpat_xxxxx"
}
}
}
}
```
## 可用工具
### 系统
| 工具 | 描述 |
|------|-------------|
| `test_connection` | 测试 API 连接 |
### 产品
| 工具 | 描述 |
|------|-------------|
| `search_products` | 搜索产品(按标题、供应商等) |
| `get_product` | 获取产品详情(按 ID 或别名) |
| `create_product` | 创建新产品,附带可选变体 |
| `update_product` | 更新产品信息(标题、描述、状态、SEO 等) |
| `upload_product_image` | 从公共 URL 添加产品图片 |
| `get_monthly_ranking` | 获取每月销售排名 |
### 集合
| 工具 | 描述 |
|------|-------------|
| `get_collections` | 搜索和列出集合 |
| `get_collection` | 获取集合详情 |
| `create_collection` | 创建集合 |
| `add_products_to_collection` | 添加产品并设置排序顺序 |
| `duplicate_collection` | 复制集合 |
### 博客
| 工具 | 描述 |
|------|-------------|
| `get_blogs` | 获取博客列表 |
| `get_articles` | 获取文章列表 |
| `create_article` | 创建文章 |
| `update_article` | 更新文章 |
### 主题
| 工具 | 描述 |
|------|-------------|
| `get_themes` | 获取主题列表 |
| `get_theme_asset` | 获取主题文件 |
| `update_theme_asset` | 创建或更新主题文件 |
### 菜单
| 工具 | 描述 |
|------|-------------|
| `get_menus` | 获取导航菜单及其项目 |
| `update_menu` | 更新导航菜单 |
### 折扣
| 工具 | 描述 |
|------|-------------|
| `get_discounts` | 列出所有折扣(代码 + 自动) |
| `get_discount` | 按 ID 获取单个折扣详情 |
| `create_discount_code_basic` | 创建代码折扣(金额/% 折扣) |
| `update_discount_code_basic` | 更新基本代码折扣 |
| `create_discount_automatic_basic` | 创建自动应用的基本折扣 |
| `update_discount_automatic_basic` | 更新自动应用的基本折扣 |
| `create_discount_code_bxgy` | 创建 BXGY(买 X 得 Y)代码折扣 |
| `update_discount_code_bxgy` | 更新 BXGY 代码折扣 |
| `create_discount_automatic_bxgy` | 创建自动应用的 BXGY 折扣 |
| `update_discount_automatic_bxgy` | 更新自动应用的 BXGY 折扣 |
| `create_discount_code_free_shipping` | 创建免运费代码折扣 |
| `update_discount_code_free_shipping` | 更新免运费代码折扣 |
| `create_discount_automatic_free_shipping` | 创建自动应用的免运费折扣 |
| `update_discount_automatic_free_shipping` | 更新自动应用的免运费折扣 |
| `activate_discount` | 激活(启用)折扣 |
| `deactivate_discount` | 停用(禁用)折扣 |
## 所需 API 权限
- `read_orders`
- `read_products`, `write_products`
- `read_content`, `write_content`
- `read_themes`, `write_themes`
- `read_online_store_navigation`, `write_online_store_navigation`
- `read_discounts`, `write_discounts`