
面向淘宝/天猫产品抓取集成的MCP服务器,与Claude
概览
该MCP服务器使AI助手能够获取淘宝和天猫的全面产品数据,包括产品详情、图片、规格、客户评价和问答部分。非常适合产品调研、比较和分析。 - :识别台包/天猫链接的中文分享文本 - :支持产品ID、直网、短链接和共享文本 - :抓取标题、价格、图片、规格、评测和问答 - :浏览器会话多次请求都保持登录 - :处理英文和中文(中文)输入/输出 - 返回结构化、AI友好的Markdown格式 对于每个产品,该MCP服务器提取: - Python 3.10 或更高版本 - UV 包管理器(或普通 PIP)- Chromium 浏览器(由 Playwright 自动安装) 创建或编辑MCP配置文件: 编辑 ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) 或 %APPDATA%\Claude\claude_desktop_config。
概述(AI 翻译)
建模上下文协议(MCP)服务器,用于抓取淘宝/淘宝(淘宝/天猫)产品信息。
该MCP服务器使AI助手能够获取淘宝和天猫的全面产品数据,包括产品详情、图片、规格、客户评价和问答部分。非常适合产品调研、比较和分析。
🌟 特色
- 自动链接检测:识别台宝/天猫链接的中文分享文本
- 多输入格式:支持产品ID、直达URL、短链接和共享文本
- 全面数据:抓取标题、价格、图片、规格、评测及问答
- 持久会话:浏览器会话在多个请求中保持登录状态
- 双语支持:同时处理英语和中文(中文)输入/输出
- Markdown 输出:返回结构化、对 AI 友好的 Markdown 格式
📦 什么被刮掉了
对于每个产品,该MCP服务器提取:
| 数据类型 | 详细信息 |
|---|---|
| 基本信息 | 标题(标题)、价格(价格)、店铺名称(店铺)、产品ID |
| 图片 | 缩略图(缩略图)+详细产品图片(详情图) |
| 参数 | 产品规格(参数)与属性(属性) |
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Taobao MCP Server
Model Context Protocol (MCP) server for scraping Taobao/Tmall (淘宝/天猫) product information.
This MCP server enables AI assistants to fetch comprehensive product data from Taobao and Tmall, including product details, images, specifications, customer reviews, and Q&A sections. Perfect for product research, comparison, and analysis.
🌟 Features
- Automatic Link Detection: Recognizes Taobao/Tmall links in Chinese share text
- Multiple Input Formats: Supports product IDs, direct URLs, short links, and share text
- Comprehensive Data: Scrapes titles, prices, images, specs, reviews, and Q&A
- Persistent Sessions: Browser session remains logged in across multiple requests
- Bilingual Support: Handles both English and Chinese (中文) input/output
- Markdown Output: Returns structured, AI-friendly Markdown format
📦 What Gets Scraped
For each product, this MCP server extracts:
| Data Type | Details |
|---|---|
| Basic Info | Title (标题), Price (价格), Store Name (店铺), Product ID |
| Images | Thumbnail images (缩略图) + Detailed product images (详情图) |
| Parameters | Product specifications (参数) and attributes (属性) |
| Reviews | Customer reviews (用户评价) with text, ratings, and photos |
| Q&A | Customer questions and seller answers (问答) |
🚀 Installation
Prerequisites
- Python 3.10 or higher
uvpackage manager (or regularpip)- Chromium browser (installed automatically by Playwright)
Step 1: Install Dependencies
cd taobao_mcp
uv pip install -e .
# OR
pip install -e .
Step 2: Install Playwright Browser
playwright install chromium
Step 3: Configure MCP Server
Create or edit the MCP configuration file:
For Claude Code CLI
Create .mcp.json in your project root:
{
"mcpServers": {
"taobao-scraper": {
"command": "python3",
"args": [
"/absolute/path/to/taobao_mcp/server.py"
],
"env": {}
}
}
}
Replace /absolute/path/to/ with the actual path to this directory!
For Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"taobao-scraper": {
"command": "python3",
"args": [
"/absolute/path/to/taobao_mcp/server.py"
]
}
}
}
Step 4: Restart Your AI Assistant
- Claude Code CLI: Start a new conversation or reload
- Claude Desktop: Restart the application
🎯 Usage Workflow
Step 1: Initialize Login (REQUIRED FIRST)
Before scraping any products, you MUST initialize the browser session:
User: "Initialize Taobao login"
AI: [Calls taobao_initialize_login]
The AI will:
- Launch a Chrome browser window
- Navigate to Taobao homepage
- Check if login is required
- If login needed: Wait for you to scan the QR code (扫码登录)
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"taobao-scraper": {
"command": "python3",
"args": [
"/absolute/path/to/taobao_mcp/server.py"
],
"env": {}
}
}
}