cn-ecommerce-browser
Enables read-only search and product inspection on Taobao and Tmall using a local Chrome login state, returning product introductions, card prices, promotions, images, and direct links, and supporting search link generation and product link parsing.
Click on "Deploy 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., "@cn-ecommerce-browser搜索闲鱼和淘宝上的二手 iPhone 13 mini,并比较价格"
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.
中国电商登录态浏览器 MCP
一个仅供本机使用、只读、依赖 Chrome 登录态的中国电商 MCP。支持:
闲鱼(Xianyu / Goofish)
淘宝与天猫
京东
拼多多
它与免登录的 cn-ecommerce-mcp
相互独立:前者读取当前登录账号实际看到的动态商品卡片,本项目因此更适合核对实时 SKU、
个性化价格和一般优惠;后者不依赖浏览器,适合无状态的公开索引搜索。
工具
browser_status:只返回各平台 Cookie 的有无与数量,不返回 Cookie 内容。search_products:统一搜索闲鱼、淘宝、京东、拼多多,返回商品介绍、卡片价格、一般优惠、主图和直链。inspect_product:打开商品详情页,返回页面介绍、价格、优惠和图片。build_search_links:生成各平台官方搜索链接。parse_product_link:验证并规范化四个平台的官方商品链接。search_xianyu/build_xianyu_search_link:兼容早期闲鱼版客户端。
全部工具都是只读的。代码没有聊天、收藏、加入购物车、下单或支付能力。
Related MCP server: tieba-mcp
工作方式
项目使用 Playwright 驱动本机已安装的 Google Chrome,并使用仓库内的
.browser-profile 作为专用持久化配置。普通 Chrome 的现有登录不会被自动复制;第一次使用时,
你需要在这个专用 Chrome 窗口中登录一次。之后 MCP 默认复用这个可见的 Chrome,便于网站
正常识别浏览器并让你处理偶发验证;关闭 MCP 进程时该窗口会一并关闭。
这样做可以避免读取或破坏日常 Chrome 配置,也避免把 Cookie 复制到云端。.browser-profile
已被 .gitignore 排除,绝不能提交、打包或分享。
Windows 本地安装
本项目属于普通 Python 工具,建议使用 playground 环境:
conda run -n playground python -m pip install -r requirements.txt1. 创建登录态
先确保没有正在运行的本 MCP 进程,然后执行:
conda run -n playground python login_browser.py脚本会打开四个标签页。请在浏览器中手动登录并完成网站要求的验证,再回终端按 Enter。 密码、短信验证码和扫码过程都不会进入 MCP。
只更新部分平台也可以:
conda run -n playground python login_browser.py xianyu taobao2. 注册到 Codex
使用绝对路径注册 stdio MCP:
codex mcp add cn-ecommerce-browser -- `
C:\Users\Subwoofer\miniforge3\envs\playground\python.exe `
C:\absolute\path\to\xianyu-mcp\server.py检查:
codex mcp list3. 运行测试或独立实测
conda run -n playground python -m unittest discover -s tests -v
conda run -n playground python server.py --live-test "iPhone 13 mini"可选配置
ECOMMERCE_BROWSER_PROFILE:专用 Chrome profile 目录。ECOMMERCE_BROWSER_CHANNEL:Playwright 浏览器频道,默认chrome。ECOMMERCE_BROWSER_HEADLESS=1:改为无头运行;默认显示浏览器。部分平台会拒绝无头浏览器, 因此只建议在确认当前站点可用时开启。ECOMMERCE_CDP_URL:高级用法,连接到你自行启动并保护好的 Chrome DevTools 地址。
不要把 CDP 端口暴露到局域网或公网;它等同于远程控制浏览器和登录账号。
价格与优惠边界
返回值是抓取时该账号、地区、商品卡片或详情页上可见的价格,不是保证成交价。淘宝、京东和 拼多多可能把最低规格、多人团、以旧换新、会员价或满足条件后的券后价显示为主价格;闲鱼商品 也可能已经售出或被卖家修改。因此工具会保留:
price_kind:价格来自搜索卡片还是详情页;observed_at:抓取时间;item_url:官方商品直链;verification_required:下单前仍需核对选中 SKU、优惠资格、运费和结算页。
如果登录失效或触发风控,工具会返回 login_required 或 challenge_required,不会尝试绕过。
License
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only product discovery, merchant trust, shipping and returns for SVV-Schatzoekers.
Taobao/Tmall, Bilibili videos + transcripts, WeChat articles, China hot search, suppliers by photo.
Read-only TVCMall customer queries: products, orders, tracking, shipping, points and balance.
Read-only local AI advice, shared reports and website audits. No PC scan or local actions.
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to search Xianyu second-hand marketplace for product prices with automatic cookie detection.2-
- FlicenseNot gradedqualityCmaintenanceEnables reading public Baidu Tieba content through a persistent real-browser session, supporting forum searches, post details, and user public post lists with optional login-state injection.-
- AlicenseNot gradedqualityBmaintenanceEnables read-only monitoring of Xianyu (Goofish) listings, item details, chats, and account status through MCP tools for DeepSeek Harness.60 npmMIT
- AlicenseAqualityBmaintenanceEnables querying Pinduoduo merchant backend data through a logged-in Chrome session via CDP, including reviews, customer service chat, product analytics, and promotion reports.151MIT