MCP Taobao Server
The MCP Taobao Server enables AI models to automate food delivery ordering on 饿了么 (Ele.me) via 淘宝闪购 (Taobao Flash Buy), handling everything from browsing to order creation — while requiring human intervention for login and payment via noVNC.
Key capabilities:
Login & Session Management: Check current login status (
shangou_check_login) or open the login page (shangou_open_login); actual login (SMS + CAPTCHA slider) must be completed manually via noVNC.Address Management: List saved delivery addresses and select one to define the delivery area (
shangou_list_addresses/shangou_set_address).Search Nearby Restaurants (
shangou_search): Search for nearby shops and food by keyword (e.g., milk tea, burgers, supermarkets).Browse Shop Menu (
shangou_shop_menu): View a shop's menu items and prices.Cart Operations: Add items to the cart (
shangou_add_to_cart) and view current cart contents (shangou_view_cart).Create Pending Order (
shangou_create_order): Navigate to the order confirmation/payment page and stop — returns the total amount and a screenshot without submitting or paying.Submit Order (
shangou_submit_order): Click 'Submit Order' to reach the Alipay checkout page and return the payment link — payment must be completed manually.Server Status (
shangou_get_server_status): Query server configuration (Playwright setup, headless mode, order amount limit, etc.) without requiring login.
Safety features: Includes a maximum order amount safeguard, and pauses for human intervention on security challenges (captchas, payment). All sensitive actions (login, payment) are handled manually through a noVNC remote desktop.
Search products, add to cart, and generate pending orders for Taobao. Supports QR code login and payment via manual VNC takeover.
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., "@MCP Taobao Server search for wireless bluetooth headphones under 200 yuan"
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 Taobao Server(淘宝闪购 / 饿了么外卖)
为大模型提供淘宝闪购点外卖能力的 MCP 服务器:搜附近店 → 看菜单 → 加入购物车 → 生成待支付订单。 下单类工具会走到「确认订单/支付页」就停住,绝不自动付款;登录与付款都由你人工经 noVNC 完成。
说明:淘宝闪购/外卖没有面向个人的下单开放 API。本 server 通过一个持久化的有头 Chromium 自动化饿了么 H5(
h5.ele.me);部署在无屏 Linux 服务器时用 Xvfb 提供虚拟显示, 人工操作(登录的短信/滑块、最终付款)通过 noVNC 远程接管虚拟桌面完成。⚠️ 登录态是会话级:服务进程存活期间有效,进程重启需重新登录一次。因此以单一常驻进程运行。
功能
登录(人工):
shangou_open_login打开饿了么登录页(手机号+短信验证码+滑块),由人经 noVNC 完成;shangou_check_login查登录态收货地址:
shangou_list_addresses列常用地址,shangou_set_address选定地址(决定配送范围)搜附近店:
shangou_search(奶茶/汉堡/超市/水果…)店内菜单:
shangou_shop_menu加入购物车:
shangou_add_to_cart查看购物车:
shangou_view_cart生成待支付订单:
shangou_create_order——走到支付页即停,返回金额+截图+人工付款指引,含金额上限护栏提交并取支付链接:
shangou_submit_order——点『提交订单』进入支付宝收银台即停(不代付),返回收银台链接,人工点链接付款支持 stdio 与 SSE 两种传输
成熟度:登录 + 收货地址 + 搜店/进店/加购/店内搜/结算/提交已按真实页面实测校正 (饿了么 H5 为 tiga 影子DOM + 淘宝闪购
newretail页,用文本/aria-label/坐标 tap 驱动)。 触发滑块/风控时工具返回结构化提示,请用 noVNC 人工处理。
Related MCP server: mcp-amazon
安全护栏
绝不自动付款/自动登录:登录与付款都是人工点击(noVNC)。
金额上限:
MCP_TAOBAO_MAX_ORDER_AMOUNT(默认 100 元),确认页金额超限则拒绝提交并提示。触发风控:检测到滑块/验证即停并提示人工处理,不盲目重试。
快速开始
1. 本地开发运行
python -m venv .venv && source .venv/bin/activate
pip install -e ".[sse]"
playwright install chromium
# stdio
mcp-taobao-server
# SSE
MCP_TRANSPORT=sse MCP_PORT=8094 mcp-taobao-server2. 点外卖流程
shangou_open_login→ 经 noVNC 用手机+短信+滑块登录shangou_list_addresses→shangou_set_address选收货地址(决定配送城市/范围,务必先选对)shangou_search搜店 →shangou_shop_menu看菜 →shangou_add_to_cart加购(达起送才能结算)shangou_create_order→ 走到确认页,返回实付金额、截图(未提交、未付款)核对无误后二选一付款:
shangou_submit_order→ 提交订单,返回支付宝收银台链接,在已登录浏览器(noVNC:6080)点链接付款或直接在 noVNC(
http://<服务器IP>:6080/vnc.html)里手动点『提交订单』并付款
部署
cp .env.example .env # 按需改默认定位、金额上限、VNC 密码
docker compose up -d镜像基于
python:3.11-slim,内含 Chromium + Xvfb + x11vnc + noVNC + 精简中文字体,体积约 1.2GB。暴露端口:8094(MCP SSE)、6080(noVNC 网页,人工登录/付款接管)。
登录态卷
taobao_profile:/data/profile持久化 cookie(注意饿了么登录态仍是会话级)。推送
v*tag 触发 GitHub Actions:amd64 + arm64 原生构建、推 Harbor、多架构 manifest、GitHub Release。 需仓库 secretsHARBOR_USERNAME/HARBOR_PASSWORD。
MCP 客户端配置
SSE:
{ "mcpServers": { "shangou": { "url": "http://<your-server>:8094/sse" } } }stdio:
{
"mcpServers": {
"shangou": {
"command": "mcp-taobao-server",
"env": {
"MCP_TAOBAO_USER_DATA_DIR": "./profile",
"MCP_TAOBAO_LAT": "32.06",
"MCP_TAOBAO_LNG": "118.80",
"MCP_TAOBAO_MAX_ORDER_AMOUNT": "100"
}
}
}
}环境变量
变量 | 默认值 | 说明 |
|
|
|
|
| SSE 监听地址 |
|
| 浏览器持久化 profile |
|
| 有头(配 Xvfb)/无头 |
|
| 默认定位(决定“附近”范围;选地址后以地址为准) |
|
| 页面操作超时(秒) |
|
| 搜索/菜单返回条数上限 |
|
| 下单金额上限(元),0=不限制 |
|
| 每步操作放慢(毫秒) |
|
| Xvfb 虚拟显示编号(容器内) |
|
| 虚拟屏分辨率 |
|
| noVNC 网页端口 |
| (空) | VNC 密码,空=无密码(建议放内网/反代后) |
MCP 工具列表
工具 | 说明 | 是否需登录 |
| 打开饿了么登录页(人工经 noVNC 完成) | 否(用于登录) |
| 查询登录态 | 否 |
| 列出常用收货地址 | 是 |
| 选定收货地址 | 是 |
| 搜附近店/美食 | 是 |
| 查看店内菜单 | 是 |
| 加入购物车 | 是 |
| 查看购物车 | 是 |
| 生成待支付订单(停在支付前) | 是 |
| 提交订单并返回支付宝收银台链接(停在收银台,不代付) | 是 |
| 配置与可用性自检 | 否 |
项目结构
04-mcp-taobao-server/
├── Dockerfile / docker-compose.yaml / entrypoint.sh / .env.example
├── pyproject.toml / requirements.txt
├── .github/workflows/build-release.yaml
└── src/mcp_taobao_server/
├── server.py # 入口 + shangou_* 工具 + stdio/sse
└── platforms/
├── base.py # BasePlatform / 结果 dataclass / PlatformError
└── eleme.py # 饿了么 H5 Playwright 驱动(登录/地址/搜店/加购/下单停在支付前)许可
MIT
Available Tools
11 toolsshangou_add_to_cartA
把某店铺的菜品加入购物车。参数 shop=店铺ID/URL;item=菜品名称;quantity=份数(默认1)。可能需先选规格,返回是否成功及截图。
Inputs: item (required), shop (required), quantity.
shangou_check_loginA
检查是否已登录饿了么(淘宝闪购外卖)。未登录请调 shangou_open_login,并在 noVNC 里人工完成手机+短信+滑块登录。
Inputs: no named parameters.
shangou_create_orderA
生成待支付外卖订单:点『去结算』走到确认订单/支付页即【停止,绝不提交付款】,返回金额、页面截图与人工付款指引。参数 shop=店铺ID/URL(需已在该店加购)。金额超过服务端上限(MCP_TAOBAO_MAX_ORDER_AMOUNT)会被拦截。付款请经 noVNC(:6080)在浏览器手动完成。
Inputs: shop (required).
shangou_get_server_statusA
查询服务配置与可用性(是否装好 playwright、profile 目录、有头/无头、默认定位、金额上限等)。无需登录即可调用。
Inputs: no named parameters.
shangou_list_addressesA
列出账号里的常用收货地址(index/名称/联系人)。下单前需先用 shangou_set_address 选定一个地址。
Inputs: no named parameters.
shangou_open_loginA
打开饿了么登录页(手机号+短信验证码+滑块)。因含短信与滑块验证,须由人在 noVNC(http://<服务器IP>:6080/vnc.html) 的浏览器窗口里完成;返回当前页截图与操作指引。登录态在服务进程存活期间有效。
Inputs: no named parameters.
shangou_searchA
搜索附近可配送的店铺/美食。参数 keyword=关键词(如'奶茶'/'汉堡'/'超市'/'水果');limit=返回条数。需先登录并设好收货地址,否则返回结构化错误。
Inputs: keyword (required), limit.
shangou_set_addressA
选择收货地址以确定配送范围。参数 keyword=地址关键词(如'马家店春华园'),或 index=shangou_list_addresses 里的序号(从0起)。选好后即可搜附近店。
Inputs: index, keyword.
shangou_submit_orderA
【会真实提交订单】在确认订单页点『提交订单』,进入支付宝收银台即【停止,不输密码、不代付】,返回收银台支付链接与截图。仅在用户明确同意下单后调用(通常先 shangou_create_order 核对金额)。参数 shop=店铺序号。金额超上限(MCP_TAOBAO_MAX_ORDER_AMOUNT)会被拒绝。收银台链接与登录态/时效绑定,请在已登录浏览器(服务器为 noVNC:6080)打开付款。
Inputs: shop (required).
shangou_view_cartA
查看某店铺当前购物车内容(尽力解析菜品与价格)。参数 shop=店铺ID/URL。
Inputs: shop (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Each tool targets a distinct action and resource (login, search, address management, cart, orders, server status). No two tools have ambiguous boundaries; the sequential steps (create_order vs submit_order) are clearly differentiated.
All tools use the 'shangou_' prefix and verb_noun pattern (e.g., check_login, set_address, add_to_cart). The naming is mostly consistent, though 'shop_menu' deviates slightly from a clearer 'get_shop_menu'. Overall predictable and readable.
11 tools is well-scoped for a food ordering server. It covers the entire workflow from login to order submission without unnecessary bloat or missing critical steps.
The set covers the core ordering flow (login, search, address, menu, cart, order creation, submission). Minor gaps exist (e.g., no remove-from-cart tool, no order history), but the stated purpose is fulfilled effectively.
Maintenance
Related MCP Connectors
Product search for AI agents: Amazon + Shopify, cart-to-checkout buy path. Pay-per-call, no API key.
Live product search for AI agents across Shopify merchants and major retailers.
Product search for AI shopping agents: prices and buy links from big retailers. No key needed.
Shopify product discovery and x402-paid offer verification for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to search products, manage shopping carts, place orders, and retrieve order history from Amazon and Target accounts.3MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to search products, manage cart, place orders, and track shipments on Amazon via browser automation.22 npm2MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to browse product catalogs, search products with filters, and initiate checkouts, generating order summaries and checkout URLs.-
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to automate Taobao shopping tasks such as searching products, viewing details, adding to cart, placing orders, and making payments via Playwright.33MIT