
UK Supermarkets
io.github.jbeshir由 GitHub 账号 jbeshir 发布v1.0.3更新于 Oct 30, 2026
Search and compare grocery prices across UK supermarkets with product details.
概览
在九家英国超市之间搜索和比较食品杂货价格,并提供商品详情、分类浏览和 Tesco 购物篮工具。
- 可以做什么
- 列出支持的超市及其状态
- 在一家或多家超市搜索商品,并比较同一商品的价格
- 查看商品详情,如价格、描述、配料和营养成分
- 浏览某家超市的商品分类
- 登录 Tesco 后可读取历史订单、查看购物篮、添加商品或修改数量、移除商品
- 适用场景
- 适合让助手核对食品杂货价格、比较同一商品在不同英国超市的售价,或在规划采购时查询配料与营养信息。Tesco 购物篮和订单历史工具仅在你在 Tesco 购物并启用登录时才有意义。
- 运行要求
- 以本地进程运行(Go 二进制、预编译版本或 Docker 镜像)。Tesco、Asda 和 Waitrose 以及任何登录都需要 Chrome、Chromium 或 Edge,可用 CHROME_EXEC_PATH 指定浏览器路径。不登录浏览无需任何环境变量;登录需按超市设置 TESCO_LOGIN 等变量,SUPERMARKET_COOKIE_DIR 可覆盖 Cookie 存储目录。需要能访问各超市网站的网络。
安装
在 SourceWeft 中
- 打开 控制台中的 UK Supermarkets,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
supermarkets-uk-mcp
An MCP server for searching and comparing grocery prices across 9 UK supermarkets. It provides product search, price comparison, category browsing, and (for Tesco) order history and basket management. Each supermarket is implemented as a pluggable datasource behind a common interface, with the server fanning out concurrent requests across stores and aggregating the results.
Getting Started
Requirements
-
Go 1.27.3+ (to build from source)
-
Chrome, Chromium, or Microsoft Edge — required for Tesco, Asda, and Waitrose (headless browser rendering), and for login to any supermarket. Sainsbury's, Ocado, Morrisons, and the Shopify stores work without a browser.
On Linux, avoid snap-packaged Chromium (Ubuntu's default
chromiumpackage). It is known to hang indefinitely — both on graceful CDP tab-close and on OS-level process reaping after a forced kill — when launched as a descendant of certain parent processes (observed running under Claude Desktop's Electron process tree). The hang was 100% reproducible under that setup and never reproduced with the same code against a non-snap Chrome/Chromium build. Install Google Chrome or a non-snap Chromium build instead, and pointCHROME_EXEC_PATHat it if it isn't picked up automatically.
Installation
Pre-built binaries are available from Releases.
Install from source:
Or build from the repo root:
A Dockerfile is also provided, based on chromedp/headless-shell so that browser-based stores work out of the box:
Configuration
No environment variables are required to get started — all supermarkets work without login.
See Login below for the additional variables that enable interactive login.
Claude Desktop
Claude Code
Tools
Supported Supermarkets
Product Information Coverage
Not all supermarkets provide the same level of detail:
Login
Login is optional and enables personalised results (e.g. local stock, delivery availability), order history, and basket management. It requires running the server locally with a browser available.
To enable login, set <SUPERMARKET>_LOGIN=true for each supermarket you want to log in to. On first use, a visible browser window opens for you to complete login manually. Session cookies are cached to disk and reused across restarts. If cookies expire, the server clears them and triggers a fresh login automatically.
Login requires Chrome, Chromium, or Edge for all supermarkets, including those that do not otherwise need a browser. Supermarket sessions tend to expire frequently, so expect to be prompted to log in again regularly.
Example with login enabled:
Key Concepts
- Datasource — A pluggable adapter for a single supermarket. Each datasource implements a common
ProductSourceinterface (search, product details, category browsing) using whatever transport the supermarket requires: JSON API, server-rendered HTML scraping, or headless Chrome rendering. - AuthProductSource — An extension of
ProductSourcethat supports session cookie injection and validation. Six of the nine supermarkets implement this interface, allowing logged-in features like personalised results. The three Shopify-based stores are plainProductSourceimplementations with no auth support. - Client orchestrator — The
client.Clienttype wires together all nine datasources. It manages concurrent fan-out for searches, lazy authentication with session expiry detection, and per-host rate limiting. - Auth resolver — A per-supermarket wrapper that handles lazy login. On first use of a login-enabled supermarket, it opens a visible browser window for the user to complete login manually. Session cookies are persisted to disk and reused. If a request returns
ErrSessionExpired, the resolver clears the cookies and triggers a fresh login. - Shared browser — A single headless Chrome instance (via chromedp) shared across all browser-based datasources. Each request opens a new tab within the shared browser context so that cookies persist between navigations.
- OSP (Ocado Smart Platform) — Ocado and Morrisons share a common server-rendered HTML structure. A single
osppackage implements both, parameterised by store-specific config.
Architecture
External Dependencies
Data Flow
A search_products call with multiple supermarkets triggers concurrent requests across all targeted stores. Individual store failures are captured per-result rather than failing the entire request.
When a logged-in request fails with ErrSessionExpired, the auth resolver clears the cached cookies, opens a browser window for re-login, and retries the request transparently.
来源:supermarkets-uk/README.md,提交 27dc1b2
工具
0版本历史
2- v1.0.3最新Oct 29, 2026
- v1.0.2Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分