eBay列表自动化插件

一个完整的Claude Code插件,通过AI驱动的图像分析、定价研究和履行管理自动化您的eBay列表工作流程。

  • by jbwashington
  • TypeScript
  • 本地部署
  • 17 星标
  • 更新于
在 GitHub 查看 jbwashington/ebay-mcp

使用说明

适用于Claude Code的易趣列表自动化插件

一个完整的Claude Code插件,通过人工智能驱动的图像分析、定价研究和履行管理自动化您的eBay列表工作流程。

特性

🤖 专业人工智能代理

  • 列表创建者 -从照片到出版物的端到端列表创建
  • 价格研究员 -市场分析和竞争性定价策略
  • 图像分析器 -产品标识和状态评估
  • 履行经理 -订单处理、发货和反馈自动化

📝 Slash命令(9个命令)

  • /ebay-auth -一次性OAuth身份验证
  • /ebay-analyze [folder] -基于人工智能的产品分析
  • /ebay-draft [folder] -生成SEO优化的草稿列表
  • /ebay-publish [offer-id] -将草稿发布到实时易趣
  • /ebay-orders -查看和管理订单
  • /ebay-ship [order-id] -通过跟踪处理发货
  • /ebay-feedback [item-id] [tx-id] -留下买家反馈
  • /ebay-policies -查看卖家政策
  • /ebay-status -健康检查和连接状态

🔗 MCP集成

通过10个MCP工具直接访问易趣API:

  • 库存管理(创建、更新、删除)
  • 提供创作和出版服务
  • 视觉搜索和关键字搜索
  • 订单管理和履行
  • 发货标签生成
  • 反馈管理

⚡ 自动化挂钩

  • 会话开始 -启动时验证易趣连接
  • PostTool使用 -记录列表活动并在发布时通知
  • 用户提示: -建议改进工作流程

安装

先决条件

  • Claude Code已安装在您的计算机上
  • Bun运行时(用于MCP服务器)
  • 具有API证书的易趣开发人员帐户

方法1:从市场安装(推荐)

一旦发布到Claude Code市场:

# Start Claude Code
claude

# Add the eBay tools marketplace
/plugin marketplace add https://github.com/jbwashington/ebay-mcp

# Install the plugin
/plugin install ebay-listing-automation@ebay-tools

# Select "Install now" when prompted
# Restart Claude Code to activate the plugin

方法2:从本地目录安装(开发)

用于测试或开发:

# Clone this repository to your local machine
git clone https://github.com/jbwashington/ebay-mcp.git
cd ebay-mcp

# Install dependencies
bun install

# Add as a local marketplace in Claude Code
claude

# In Claude Code, add local marketplace
/plugin marketplace add /full/path/to/ebay-mcp

# Install the plugin
/plugin install ebay-listing-automation@ebay-tools

方法3:手动安装(高级)

对于没有市场的直接安装:

# Copy plugin to Claude Code plugins directory
mkdir -p ~/.claude/plugins
cp -r ebay-mcp ~/.claude/plugins/ebay-listing-automation

# Install dependencies
cd ~/.claude/plugins/ebay-listing-automation
bun install

# Restart Claude Code

安装后设置

通过任何方法安装后:

  1. 配置环境变量:

    cd ~/.claude/plugins/ebay-listing-automation
    cp .env.example .env.local
    # Edit .env.local with your eBay credentials
    
  2. 通过易趣进行身份验证:

    /ebay-auth
    # Browser opens, authorize the application
    
  3. 验证安装:

    /ebay-status
    /help  # Check that eBay commands appear
    /agents  # Verify eBay agents are loaded
    

插件将自动:

  • 使用12个API工具添加易趣MCP服务器
  • 注册10个斜线命令
  • 加载5个专门的AI代理
  • 启用4个自动化挂钩

验证您的安装

检查这些组件是否处于活动状态:

# Commands should show:
/ebay-auth, /ebay-analyze, /ebay-draft, /ebay-publish, /ebay-orders,
/ebay-ship, /ebay-feedback, /ebay-policies, /ebay-status, /ebay-fraud-analysis

# Agents should show:
- Listing Creator
- Price Researcher
- Image Analyzer
- Fulfillment Manager
- Fraud Analyst

# Test MCP connection:
/ebay-status

快速开始

1.首次设置(5分钟)

  1. 获取易趣开发者证书

    • 访问https://developer.ebay.com/my/keys
    • 创建沙盒密钥集
    • 复制:客户端ID、客户端密码、开发人员ID
  2. 配置环境

    # Edit .env.local
    EBAY_API_CLIENT=your-app-id
    EBAY_API_SECRET=your-cert-id
    EBAY_DEV_ID=your-dev-id
    EBAY_ENV=sandbox
    
  3. 验证

    /ebay-auth
    # Browser opens, click "Agree", token saved automatically
    
  4. 设置卖家政策

    • 访问https://www.ebay.com/sh/policies
    • 创建:付款、退货、履行政策
  5. 验证连接

    /ebay-status
    

2.创建您的第一个列表

# Organize photos in a folder
mkdir -p items/nike-jordan-1
# Add 8-12 photos to the folder

# Let Claude analyze and create listing
/ebay-analyze items/nike-jordan-1
/ebay-draft items/nike-jordan-1
/ebay-publish [offer-id-from-previous-step]

3.使用专业代理

Claude可以根据您的需求主动调用代理:

"Help me list these Nike shoes"
→ Listing Creator agent handles everything

"What should I price this at?"
→ Price Researcher agent analyzes market

"What product is this?"
→ Image Analyzer agent identifies from photos

"I need to ship these orders"
→ Fulfillment Manager agent processes shipping

或手动调用:

/agents
# Select an agent from the list

工作流程

完成上市流程

graph TD
    A[Take Photos] --> B[Organize in Folder]
    B --> C[/ebay-analyze]
    C --> D[AI Identifies Product]
    D --> E[Price Research]
    E --> F[/ebay-draft]
    F --> G[Review Draft]
    G --> H[/ebay-publish]
    H --> I[Package Item]
    I --> J[Wait for Sale]
    J --> K[/ebay-ship]
    K --> L[Wait for Delivery]
    L --> M[/ebay-feedback]

日常订单管理

# Morning: Check new orders
/ebay-orders

# Ship all pending orders
# For each order, run:
/ebay-ship [order-id]

# Evening: Leave feedback for delivered orders
/ebay-feedback [item-id] [transaction-id]

批次列表

# Create multiple listings efficiently
for item in items/*; do
  /ebay-analyze "$item"
  /ebay-draft "$item"
done

# Review all drafts, then publish
/ebay-publish [offer-id-1]
/ebay-publish [offer-id-2]
/ebay-publish [offer-id-3]

插件组件

代理商(agents/)

四位专门代理eBay销售的不同方面:

  • listing-creator.md -完整的上市工作流程
  • price-researcher.md -市场分析和定价
  • image-analyzer.md -产品标识
  • fulfillment-manager.md -订单处理

命令(commands/)

用于手动工作流控制的九个斜线命令:

  • 认证、分析、起草、发布
  • 订单管理、发货、反馈
  • 策略检查、状态验证

钩子(hooks/hooks.json)

自动事件处理程序:

  • 会话开始检查
  • 活动日志
  • 发布通知
  • 工作流建议

MCP服务器(src/mcp-server/)

完整的易趣API集成:

  • OAuth令牌管理(自动刷新)
  • 库存API包装
  • 浏览API(搜索)
  • 履行API(装运)
  • 反馈API

节省时间

任务 手动 自动 已保存
产品标识 10-15分钟 30秒 ~14分钟
价格研究 5-10分钟 30秒 ~9分钟
标题/描述 5-10分钟 10秒 ~9分钟
项目详细信息 3-5分钟 5秒 ~4分钟
草稿创建 5分钟 10秒 ~4分钟
发布 2分钟 5秒 ~1分钟
每个列表总计 30-47分钟 2分钟 约40分钟

进入生产

当准备好进行真实上市时:

  1. 获取生产证书

    • 与developer.ebay.com上的沙盒相同的过程
    • 使用生产密钥集
  2. 配置生产环境

    # Create .env.production.local
    EBAY_API_CLIENT=your-prod-client-id
    EBAY_API_SECRET=your-prod-secret
    EBAY_DEV_ID=your-dev-id
    EBAY_ENV=production
    
  3. 生产认证

    EBAY_ENV=production bun run auth
    
  4. 使用生产模式

    export EBAY_ENV=production
    # Or set in your shell profile
    

高级功能

自定义模板

为最常见的项目创建列表模板:

# In your CLAUDE.md or project memory
"For Nike sneakers, always include:
- Official colorway name
- Release year
- Box condition
- Include '100% Authentic' in description"

批量操作

使用代理在一个会话中处理多个项目:

"I have 10 items to list, all in the items/ folder.
Process them in batch and create drafts for all."

价格监控

使用Price Researcher代理跟踪市场变化:

"Check if prices have changed for Nike Jordan 1 Chicago size 10"

定制挂钩

在中添加您自己的自动化 hooks/hooks.json:

{
  "hooks": {
    "PostToolUse": [
      {
        "matcher": "ebay_create_offer",
        "hooks": [{
          "type": "command",
          "command": "./scripts/custom-validation.sh"
        }]
      }
    ]
  }
}

故障排除

插件未加载

# Check plugin is in correct location
ls -la ~/.claude/plugins/ebay-listing-automation/.claude-plugin/

# Verify plugin.json is valid
cat ~/.claude/plugins/ebay-listing-automation/.claude-plugin/plugin.json | jq .

# Restart Claude Code with debug
claude --debug

MCP服务器未连接

# Check status
/ebay-status

# Verify credentials
cat .env.local

# Re-authenticate
/ebay-auth

命令未出现

# List all commands
/help

# Plugin commands have namespace: ebay-listing-automation:command-name
# Or just: /command-name if no conflicts

代理不调用

# List available agents
/agents

# Manually invoke an agent
# Select from the agents list

API限制

已售房源研究

已知限制:eBay的Finding API已退役(2025年2月)。我们无法以编程方式访问已完成/已售出的列表。

变通方法:

  1. 使用我们的活跃房源搜索(非常接近售价)
  2. 手动勾选“像这样卖一个”进行验证
  3. 在卖家中心使用Terapeak(如果您有eBay商店)
  4. 申请Marketplace Insights API(需要批准)

速率限制

  • 沙盒:5000个电话/天
  • 生产:因账户级别而异
  • 插件自动处理令牌刷新
  • 尊重指数回退的速率限制

安全

  • OAuth令牌存储在本地 .ebay-tokens.json
  • 刷新代币有效期为18个月
  • 每2小时自动刷新一次
  • 从未在日志或输出中公开
  • 凭据的环境变量
  • .gitignore 保护敏感文件

贡献

欢迎投稿!需要改进的地方:

  • 专门任务的额外代理
  • 更多自动化挂钩
  • 增强的SEO优化
  • Cloudflare Workers与webhooks的集成
  • 不同类别的模板库

许可证

MIT许可证-请参阅许可证文件

免责声明

此插件与易趣无关,也不受易趣认可。根据易趣的API服务条款和卖家政策使用。

支持

  • 文档:此自述文件
  • 问题:https://github.com/jbwashington/ebay-mcp/issues
  • 快速入门:请参阅QUICKSTART.md

由...制作❤️ 适合喜欢自动化的eBay卖家