xianyu-buyer-mcp
xianyu-buyer-mcp
闲鱼(Goofish)の買い手向け価格問い合わせ MCP Server。商品検索、問い合わせメッセージの一括送信、売り手からの返信の自動収集をサポートします。
機能
ツール | 説明 |
| 闲鱼にQRコードでログイン(初回のみ必要、以降は cookies を自動利用) |
| ログイン状態をチェックする |
| 商品を検索し、商品一覧 + 売り手 ID を返す |
| 単一の売り手に問い合わせメッセージを送信する |
| 問い合わせメッセージを一括送信する |
| IM の会話一覧を取得し、すべての売り手からの返信を確認する |
| 特定の売り手との完全なチャット履歴を取得する |
Related MCP server: Goofish MCP Server
インストール
前提条件
Python 3.11+
闲鱼/淘宝アプリ(QRコードログイン用)
闲鱼ウェブ版/淘宝デスクトップ版(メッセージの受信・返信用)
手順
# 1. 克隆项目
git clone https://github.com/<your-username>/xianyu-buyer-mcp.git
cd xianyu-buyer-mcp
# 2. 安装依赖
pip install -e .
# 3. 安装 Chromium 浏览器
playwright install chromiumオプション設定
環境変数テンプレートをコピーして、必要に応じて変更してください:
cp .env.example .env変数 | デフォルト値 | 説明 |
|
| ヘッドレスモードにするかどうか(QRコードログインのため false を推奨) |
| (空) | HTTP プロキシアドレス |
|
| Cookie 保存パス |
|
| 闲鱼ホームページ URL |
MCP クライアントでの使用
Claude Desktop / Cursor / QoderWork
MCP 設定ファイルに以下を追加:
{
"mcpServers": {
"xianyu-buyer": {
"command": "python",
"args": ["/path/to/xianyu-buyer-mcp/server.py"]
}
}
}初回利用
AI アシスタントで
loginツールを呼び出します。ブラウザウィンドウが自動的に闲鱼のログインページを開きます。
闲鱼または淘宝アプリでQRコードをスキャンしてログインします。
Cookies は自動的に
~/.xianyu-buyer-mcp/cookies.jsonに保存されます。以降はQRコードを再読み取りする必要はありません。
典型的なフロー
# 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")技術詳細
アンチ検出: playwright-stealth + カスタム UA + navigator 偽装を使用して、ボットとして識別されるリスクを低減します。
CAPTCHA 回避: 売り手情報の取得は IM ページの
lib.mtop.requestSDK を介して行い、商品詳細ページでのスライダー認証の発動を回避します。頻度制御: メッセージの一括送信間隔を2秒にして、プラットフォームのリスク管理機能が発動しないようにします。
スレッドセーフ: すべてのブラウザ操作はシングルスレッドの executor で直列実行されます。
注意事項
闲鱼にはアンチクローリング機構があるため、高頻度の呼び出しや大規模なデータ収集には使用しないでください。
Cookies の有効期間は限られているため、失効後は再度をスキャンする必要があります。
このプロジェクトは学習・研究目的のみで提供されています。闲鱼プラットフォームの利用規約を順守してください。
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