PDD Shopping MCP
Enables searching, normalizing, and signal-analyzing products on Pinduoduo, with built-in fraud signals to help Claude reason about product authenticity.
README
PDD Shopping MCP
MCP server for Claude Code that enables searching, normalizing, and signal-analyzing products on Pinduoduo (拼多多).
What it does
Write in Claude Code:
"Find Ray-Ban Meta smart glasses on Pinduoduo. Compare options and warn me about fake risk."
Claude uses these MCP tools to fetch structured product data with pre-computed fraud signals, then does its own reasoning and recommendations.
Data Sources
| Provider | Status | Notes |
|---|---|---|
mock |
✅ Always works | Dev/testing. Three Ray-Ban Meta scenarios (replica, suspicious, potentially genuine). |
h5 |
⚠️ Requires login cookies | Playwright scraping of mobile.yangkeduo.com. Requires PDD_H5_COOKIES_JSON. |
official |
🔲 Skeleton | PDD Open Platform / DDK API. Set PDD_PROVIDER=official with credentials. |
Important: All mobile.yangkeduo.com pages require login — there is no guest mode. The H5 adapter requires valid session cookies via PDD_H5_COOKIES_JSON. Without cookies it returns NEED_AUTH and falls back to mock data.
Note on H5 scraping: Scraping PDD may violate their Terms of Service. Use for personal research only.
Getting PDD Session Cookies
- Log in to Pinduoduo in Chrome (or on your phone)
- Open DevTools → Application → Cookies →
mobile.yangkeduo.com - Copy cookies to a JSON array format
- Set
PDD_H5_COOKIES_JSONin your.envfile
Cookie format:
[
{"name": "PDDAccessToken", "value": "...", "domain": ".yangkeduo.com", "path": "/"},
{"name": "api_uid", "value": "...", "domain": ".yangkeduo.com", "path": "/"}
]
Cookies expire — you may need to refresh them periodically.
Setup
git clone <repo>
cd pdd-shopping-mcp
npm install
npx playwright install chromium
cp .env.example .env
# Edit .env as needed (default is mock mode, no config required)
Run
# Development (mock mode — no config needed)
npm run dev
# Real H5 scraping (requires PDD_H5_COOKIES_JSON in .env)
PDD_PROVIDER=h5 npm run dev
# Tests
npm test
Claude Code Config
Add to ~/.claude/claude_desktop_config.json (or project .claude/mcporter.json):
{
"mcpServers": {
"pdd-shopping": {
"command": "npx",
"args": ["tsx", "/absolute/path/to/pdd-shopping-mcp/src/index.ts"],
"env": {
"PDD_PROVIDER": "h5",
"CNY_RUB_RATE": "13.5",
"CARGO_RATE_RUB_PER_KG": "600"
}
}
}
}
Available Tools
| Tool | Description |
|---|---|
health_check |
Check server and provider status |
translate_query_to_chinese |
Dictionary-based query translation helper |
search_pdd_products |
Search products, returns Product[] with signals |
get_pdd_product_detail |
Get full detail by goodsId or URL |
compare_pdd_products |
Sort by quality signals, generate Russian warnings list |
estimate_cargo_cost |
Calculate total cost including Russia cargo |
Product Signals
Each Product has a signals field pre-computed before Claude sees the data:
| Signal | Meaning |
|---|---|
replicaKeywordsFound |
Chinese replica keywords in title: 同款, 高仿, 复刻, 潮牌… |
priceSuspiciouslyLow |
Price below 15% of expected brand range |
priceVsExpectedRatio |
Ratio of actual to minimum expected price (0.05 = 5% = almost certainly fake) |
brandMismatch |
Price below 50% of brand minimum |
hasBuyerPhotos |
Whether buyers posted real photos |
noShopInfo |
Shop data completely absent |
Claude uses these signals to reason about authenticity and risk.
Example Session
User: Find Ray-Ban Meta smart glasses on Pinduoduo. Compare and warn about fakes.
Claude calls: search_pdd_products("Ray-Ban Meta 智能眼镜")
Claude calls: compare_pdd_products([...results])
Analysis:
• 99 CNY — replicaKeywordsFound: ["同款","潮牌"], priceVsExpectedRatio: 0.07 → AVOID
• 399 CNY — priceSuspiciouslyLow: true, no buyer photos → RISKY
• 1800 CNY — ratio: 1.2, but only 7 reviews → needs more verification
None are confirmed genuine. Real Ray-Ban Meta retails ~$299 USD (~2200+ CNY).
Environment Variables
| Variable | Default | Description |
|---|---|---|
PDD_PROVIDER |
mock |
h5, mock, or official |
PDD_H5_COOKIES_JSON |
— | JSON cookie array (required for h5 mode) |
PLAYWRIGHT_HEADLESS |
true |
Set false to see browser |
CNY_RUB_RATE |
13.5 |
CNY to RUB exchange rate |
CARGO_RATE_RUB_PER_KG |
600 |
Cargo rate RUB/kg |
CARGO_MIN_KG |
0.3 |
Minimum billable weight kg |
DEBUG |
false |
Include raw PDD data in Product output |
Roadmap
- PDD Open Platform / DDK API integration
- Third-party API connectors (RapidAPI)
- Buyer review and image extraction
- Price history tracking
- Taobao / 1688 / Poizon adapters
- Telegram bot wrapper
- Image-based search
- Real cargo company calculator
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。