xianyu-buyer-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@xianyu-buyer-mcpsearch MacBook Pro, then send batch inquiries to top 5 sellers"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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: Goofish MCP Server
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
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseAqualityDmaintenanceAn MCP server that automates Xianyu marketplace operations through Playwright, allowing users to manage listings and conduct market research via natural language. It features integrated tools for generating AI-powered product descriptions and cover images using DashScope.1121
- FlicenseBqualityDmaintenanceEnables searching and monitoring of Goofish (闲鱼) items via Playwright automation, providing structured item details and keyword-based monitoring.47
- AlicenseBqualityBmaintenanceMCP server for automating Xianyu (Goofish) marketplace operations: publish, manage items, handle IM messages, and more via CLI or AI agents.417139Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to interact with Goofish (闲鱼) marketplace, supporting product search, batch inquiry messaging, and conversation management for buyers.3MIT
Related MCP Connectors
Managed LinkedIn MCP server for AI agents: search, connect, message and enrich on accounts you own.
First AI Agent e-commerce marketplace with 74+ AI products, MCP protocol, and Alipay payments
Shopping MCP for AI agents: search, compare, Amazon buy links. Auto-register.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/xhjiang1998/xianyu-buyer-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server