内容
# 产品概述
由AI驱动的WooCommerce产品内容生成器、SEO优化器和批量内容管理器 — 为Claude构建的模型上下文协议(MCP)服务器。
**无需单独的AI API。** 运行此MCP的Claude(模型)原生处理所有内容生成。
## 功能描述
| 问题 | 产品概述工具 |
|---|---|
| 200个导入产品,供应商描述不佳 | `audit` → `analyze_brand_voice` → `bulk_apply_template` |
| 单个产品需要SEO重写 | `optimize_for_seo` → `apply_generated_content` |
| 目录中缺少元描述 | `generate_meta_descriptions` |
| 扩展到新市场 | `translate_product_content` |
| 新产品需要品牌描述 | `analyze_brand_voice` → `generate_product_description` |
## 工具列表
| 工具 | 描述 |
|---|---|
| `productscribe_audit_product_content` | 扫描产品的内容空白:缺少描述、替代文本、元描述。返回评分报告(0-100)。 |
| `productscribe_analyze_brand_voice` | 采样畅销/高评产品以提取商店的语气、词汇、句子结构和格式化模式。 |
| `productscribe_generate_product_description` | 使用品牌语气 + SEO目标为特定产品构建生成提示。在保存前预览。 |
| `productscribe_apply_generated_content` | 将AI生成的描述和元数据保存到WooCommerce(支持dry-run)。 |
| `productscribe_optimize_for_seo` | 评估当前产品SEO健康状况并构建关键词优化的重写提示。 |
| `productscribe_generate_meta_descriptions` | 为类别或产品列表批量生成元描述(尊重160字符SERP限制)。 |
| `productscribe_bulk_apply_template` | 使用模板 + 品牌语气在整个类别中生成一致的描述。安全分页。 |
| `productscribe_translate_product_content` | 将产品描述翻译成最多5种语言,同时保留HTML。 |
## 快速入门
### 1. 获取WooCommerce API密钥
1. 进入 **WooCommerce → 设置 → 高级 → REST API**
2. 点击 **添加密钥**
3. 将权限设置为 **读写**
4. 复制消费者密钥和消费者密钥
### 2. 安装和构建
```bash
git clone https://github.com/vishalkakadiya/woo-productscribe-mcp-server
cd woo-productscribe-mcp-server
npm install
npm run build
```
### 3. 配置环境变量
```bash
export WC_STORE_URL=https://yourstore.com
export WC_CONSUMER_KEY=ck_xxxxxxxxxxxxxxxxxxxx
export WC_CONSUMER_SECRET=cs_xxxxxxxxxxxxxxxxxxxx
```
### 4. 添加到Claude Desktop
编辑 `~/Library/Application Support/Claude/claude_desktop_config.json`:
```json
{
"mcpServers": {
"productscribe": {
"command": "node",
"args": ["/absolute/path/to/woo-productscribe-mcp-server/dist/index.js"],
"env": {
"WC_STORE_URL": "https://yourstore.com",
"WC_CONSUMER_KEY": "ck_xxxxxxxxxxxxxxxxxxxx",
"WC_CONSUMER_SECRET": "cs_xxxxxxxxxxxxxxxxxxxx"
}
}
}
}
```
重启Claude Desktop。
## 演示工作流:重写200个导入产品
> *"我刚刚从供应商导入了200个产品,描述很糟糕。根据我的前20个畅销产品匹配我的品牌语气,并重写它们,使其针对SEO进行优化。*
**步骤1 — 审核问题:**
```
调用:productscribe_audit_product_content
severity_filter: "critical"
limit: 50
```
**步骤2 — 提取品牌语气:**
```
调用:productscribe_analyze_brand_voice
sample_size: 20
source: "top_selling"
```
**步骤3 — 按类别批量重写(每批20个):**
```
调用:productscribe_bulk_apply_template
category_id: 5
template: "Discover our {product_name} — {key_feature}. {benefit}."
brand_voice_guidelines: <profile from step 2>
target_keyword_pattern: "buy {product_name} online"
limit: 20
offset: 0
```
Claude生成所有20个描述。然后使用`offset: 20`、`offset: 40`等重复。
**步骤4 — 应用每个生成的描述:**
```
调用:productscribe_apply_generated_content
product_id: 101
description: "<p>...</p>"
short_description: "..."
```
**步骤5 — 关键产品的SEO检查:**
```
调用:productscribe_optimize_for_seo
product_id: 101
target_keyword: "organic cotton t-shirt"
```
## HTTP传输(可选)
适用于远程/多客户端部署:
```bash
TRANSPORT=http PORT=3000 node dist/index.js
```
服务器监听在 `POST /mcp`。健康检查: `GET /health`。
## SEO评分
内置SEO分析器检查:
| 检查 | 评分影响 |
|---|---|
| 字数 < 150 | -25(严重) |
| 字数 150–300 | -10(警告) |
| 缺少目标关键词 | -30(严重) |
| 关键词密度 < 2% | -10(警告) |
| 关键词堆砌 > 4% | -15(警告) |
| 低可读性(Flesch < 40) | -10(警告) |
| 缺少元描述 | -20(严重) |
| 元描述太长(> 160字符) | -5(警告) |
| 没有HTML结构 | 仅信息 |
## 多语言支持
支持的语言代码: `es`、`fr`、`de`、`it`、`pt`、`nl`、`pl`、`ru`、`ja`、`zh`、`ar`、`ko`、`tr`、`sv`、`da`、`fi`、`nb`、`cs`、`hu`、`ro`
与 **WPML**、**Polylang** 或 **TranslatePress** 一起使用,将翻译内容存储为产品语言变体。
## 环境变量
| 变量 | 必需 | 描述 |
|---|---|---|
| `WC_STORE_URL` | 是 | 您的WooCommerce商店URL(例如 `https://yourstore.com`) |
| `WC_CONSUMER_KEY` | 是 | WooCommerce REST API消费者密钥 |
| `WC_CONSUMER_SECRET` | 是 | WooCommerce REST API消费者密钥 |
| `TRANSPORT` | 否 | `stdio`(默认)或 `http` |
| `PORT` | 否 | HTTP端口(默认:`3000`) |
## 开发
```bash
# 监视模式(无需构建)
npm run dev
# 生产构建
npm run build
# 使用MCP Inspector测试
npx @modelcontextprotocol/inspector node dist/index.js
```