Taobao Sourcing Assistant

Taobao Sourcing Assistant

A local, human-paced MCP server for sourcing products on Taobao/Tmall, extracting per-SKU pricing, variant-linked reviews, and exporting to a comparison spreadsheet.

Category
Visit Server

README

Taobao Sourcing Assistant

A local, human-paced MCP server that removes the drudgery of sourcing products on Taobao/Tmall. You keep all judgment (search intuition, buy decisions, sending supplier messages); the tool drives a real Chrome window to extract — for every product — a price for every SKU variant, specs, images, and reviews linked to the variant bought, then tabulates it into a comparison spreadsheet. Ships with a Claude Skill (sourcing playbook) and Chinese supplier-message templates (drafted by Claude, sent manually by you).

Built on the QR-login + persistent-session approach of JeremyDong22/taobao_mcp, rebuilt as 6 FastMCP tools with embedded-data + DOM extraction (mtop interception kept as a fallback), per-SKU pricing, variant-linked reviews, xlsx export, and a captcha human-handoff.

What it does NOT do

No headless scraping, no proxy rotation, no captcha-solving service, no auto-messaging, no cloud. Not getting your account flagged is the priority, not speed.


Install (one time)

# from the project root
uv venv --python 3.12
uv pip install -e ".[dev]"

You need Google Chrome installed (the real app, not Chromium, not Comet). The launcher is pinned to it in config.toml. If Chrome lives somewhere non-standard, edit [browser] executable_path, or clear it ("") to let Playwright resolve the chrome channel.

Configure

Edit config.toml (defaults are sensible):

  • [browser] executable_path — pinned Google Chrome binary (avoids launching Comet/other Chromium).
  • [browser] user_data_dir — the persistent profile (your login lives here; gitignored).
  • [pacing] — random delays + max_products_per_minute (keep it low).
  • [limits] — max_reviews, review_pages.
  • [output] dir — where xlsx + run.log land.

Run

.venv/bin/python server.py                                   # stdio MCP server
npx @modelcontextprotocol/inspector .venv/bin/python server.py   # interactive inspect

For Claude Desktop, register it as an MCP server pointing at the full venv python path and server.py (use absolute paths — /Volumes/...).

First-run login (once per session)

  1. Call taobao_initialize_login (or just taobao_fetch_product — it auto-ensures login).
  2. A visible Chrome window opens to the Taobao QR page.
  3. Scan the QR with your Taobao app. The server polls and continues automatically.
  4. The session persists in user_data_dir — restarts reuse it, no re-scan.

Tools

Tool Purpose
taobao_initialize_login Open Chrome, QR login (you scan).
taobao_session_status Login/health (read-only).
taobao_search Keyword → result list for you to pick from.
taobao_fetch_product One product: every SKU variant + price/stock, specs, images.
taobao_fetch_reviews Recent reviews, each tagged with the variant bought.
taobao_export_xlsx 3-sheet comparison workbook (Summary / Variants / Reviews).

The Skill

skill/SKILL.md is the sourcing playbook (search → you pick → fetch → translate → summarize reviews → normalize price-per-unit → compare → export → flag risks). skill/supplier_templates.md has Chinese message templates — Claude drafts, you send via Wangwang.


Troubleshooting

  • It launched Comet / the wrong browser — set [browser] executable_path to your Google Chrome binary (default: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome).
  • "login_required" / NotLoggedInError — run taobao_initialize_login and scan the QR; keep the window open.
  • A slider/verification appeared — solve it yourself in the Chrome window; the tool pauses (human_action_required) and resumes. It logs to output/run.log.
  • Screenshots/automation "page still loading" — the new detail page holds a connection open; this server uses embedded-data + DOM extraction (not screenshot-waits), so this only affects ad-hoc scripts.
  • SelectorDriftError — Taobao changed its layout; patch the one file src/extract/selectors.py.
  • Wrong price on a multi-model listing — the headline price is the cheapest model; always read the per-SKU price for the exact variant. 补贴后 prices may include a 国补 subsidy that needs a mainland ID — verify the real checkout price.
  • Only a few reviews returned — deep review pagination is shallow (known limit); increase scrolling in src/extract/reviews.py if needed.
  • Reset everything — delete user_data/chrome_profile/ and re-scan the QR.

Risks (don't hide these)

  • Scraping Taobao violates its ToS; using your own logged-in account carries account-limitation risk. Keep volume low and human-paced.
  • mtop endpoints / selectors drift — budget periodic maintenance (selectors are centralized).

Tests

.venv/bin/python -m pytest -q     # parsers, output, MCP contract, drift, evals

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured