xianyu-buyer-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
xianyu-buyer-mcp
Xianyu (Goofish) buyer-side inquiry MCP Server. Supports searching products, batch sending inquiry messages, and automatically collecting seller replies.
Features
Tool | Description |
| Log in to Xianyu by scanning a QR code (required on first use; cookies are reused automatically afterward) |
| Check the login status |
| Search products and return a product list + seller IDs |
| Send an inquiry message to a single seller |
| Send inquiry messages in batch |
| Get the IM conversation list and view all seller replies |
| Get the complete chat history with a specific seller |
Related MCP server: xianyu-buyer-mcp
Installation
Prerequisites
Python 3.11+
Xianyu/Taobao app (for QR-code login)
Xianyu web version / Taobao desktop client (for receiving and replying to messages)
Steps
# 1. 克隆项目
git clone https://github.com/<your-username>/xianyu-buyer-mcp.git
cd xianyu-buyer-mcp
# 2. 安装依赖
pip install -e .
# 3. 安装 Chromium 浏览器
playwright install chromiumOptional Configuration
Copy the environment variable template and modify it as needed:
cp .env.example .envVariable | Default | Description |
|
| Whether to run in headless mode (it is recommended to keep |
| (empty) | HTTP proxy address |
|
| Cookie storage path |
|
| Xianyu homepage URL |
Use with MCP Clients
Claude Desktop / Cursor / QoderWork
Add the following to the MCP configuration file:
{
"mcpServers": {
"xianyu-buyer": {
"command": "python",
"args": ["/path/to/xianyu-buyer-mcp/server.py"]
}
}
}First-Time Use
Call the
logintool in the AI assistantA browser window automatically pops up to the Xianyu login page
Scan the QR code with the Xianyu or Taobao app
Cookies are automatically saved to
~/.xianyu-buyer-mcp/cookies.jsonNo need to scan again on subsequent uses
Typical Workflow
cp .env.example .env# 1. 登录
login()
# 2. 搜索商品
search("MacBook Pro M1 16G 512G", max_price=5000)
# 3. 批量询价
batch_send_inquiry(
items='[{"itemId": "xxx", "sellerId": "yyy"}, ...]',
message="你好,还在吗?"
)
# 4. 查看回复
get_conversations()
# 5. 查看某个对话详情
get_conversation_detail(item_id="xxx", seller_id="yyy")Technical Details
Anti-detection: Uses
playwright-stealth+ custom UA + navigator spoofing to reduce the risk of being identified as a botCAPTCHA avoidance: Seller information queries go through the
lib.mtop.requestSDK on the IM page, avoiding slider CAPTCHA triggers on product detail pagesRate limiting: Batch messages are sent 2 seconds apart to avoid triggering platform risk controls
Thread safety: All browser operations are serialized and executed in a single-threaded executor
Notes
Xianyu has anti-scraping mechanisms. Do not make high-frequency calls or use it for large-scale data collection
Cookies have a limited validity period and you will need to scan the QR code again after they expire
This project is for learning and research purposes only. Please comply with the Xianyu platform terms of use
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Douyin short video, Xiaohongshu (RedNote) notes, comments & creator profile scraper remote MCP API.
Douyin short video, Xiaohongshu (RedNote) notes, comments & creator profile scraper remote MCP API.
Pay-per-use tool marketplace for AI agents. Search, price-check, and call APIs via MCP.
Taobao/Tmall, Bilibili videos + transcripts, WeChat articles, China hot search, suppliers by photo.
Related MCP Servers
- AlicenseBqualityAmaintenanceMCP server for automating Xianyu (Goofish) marketplace operations: publish, manage items, handle IM messages, and more via CLI or AI agents.171,060 PyPI498Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with Goofish (闲鱼) marketplace, supporting product search, batch inquiry messaging, and conversation management for buyers.4MIT
- FlicenseCqualityBmaintenanceProvides MCP interface to Xianyu (Goofish) for searching items, managing price watches, and monitoring prices via CLI, HTTP API, or MCP.374-
- AlicenseNot gradedqualityBmaintenanceEnables searching Xianyu (Goofish) listings, fetching item details, taking keyword-monitor snapshots, and publishing secondhand products through MCP tools with local-session authentication.MIT