
Delhaize receipts
io.github.SHIMABEIGIv0.1.0更新于 Oct 1, 2026
Fetch your own Delhaize (Belgium) till receipts and weekly promotions with a headless browser.
概览
使用无头浏览器把你自己的 Delhaize(比利时)收银小票和每周促销保存到本地文件。
- 功能
- 这是一个非官方 MCP 服务器,使用已保存的浏览器会话登录你自己的 Delhaize 账户,把小票图片和每周促销页面保存到磁盘。工具包括检查登录状态、列出最近小票、抓取新小票图片、补齐缺失的小票照片,以及抓取每周促销列表。它不会转录商品、不会修改你的记录,也不会处理你的密码,只把文件写到磁盘。小票按日期、门店和总额识别,因此不会重复抓取。
- 适用场景
- 当你希望助手把你自己的 Delhaize 比利时小票和促销内容拉到本地文件夹,以便日后阅读或存档时,可以使用它。适合已有 Delhaize 账户、小票已关联到会员卡,并且愿意运行本地 Python 工具的用户。
- 运行要求
- 需要 Python 3.10+,以及一个已把小票关联到会员卡的 Delhaize 账户。安装 PyPI 包和 Playwright Chromium。首次需交互式登录以创建浏览器配置文件;可选环境变量 DELHAIZE_DATA_DIR 用于设置数据文件夹。需要访问 delhaize.be 的网络连接。
安装
在 SourceWeft 中
- 打开 控制台中的 Delhaize receipts,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
delhaize-mcp
An unofficial Model Context Protocol server that lets an AI assistant fetch your own Delhaize (Belgium) till receipts and this week's promotions, using its own headless browser, without driving your everyday browser and without ever seeing your password.
Unofficial and not affiliated with or endorsed by Delhaize. It reads only your own account, at your request, the way you would read it yourself. Check that your use fits Delhaize's terms of use, keep the request rate low, and do not use it to collect other people's data.
What it does
It never transcribes items, never edits your record, and never handles your password. It only puts files on disk. Reading the images and recording them is left to you or your assistant, ideally with a check that each receipt's lines sum to its printed total.
Receipts are identified by (date, store, total), so nothing is fetched twice.
Requirements
- Python 3.10+
- A Delhaize account with receipts linked to your loyalty card
Install
This gives you two commands: delhaize-mcp (the MCP server) and delhaize-receipts (the same actions from the command line).
Set up
-
Log in once. A browser window opens, and you sign in yourself:
The session is saved in
~/.delhaize-mcp/profile(or setDELHAIZE_PROFILE). Later runs reuse it headlessly. If it lapses, runloginagain. That folder holds your session cookies: never commit or share it. -
Choose a data folder (optional). By default everything is written to
~/.delhaize-mcp/data. SetDELHAIZE_DATA_DIRto use another folder. Your record of receipts isreceipts_all.jsonin that folder, a JSON list such as:imageis optional. A receipt without an existing image is whatbackfilllooks for. -
Connect it to your assistant.
Claude Code:
Claude Desktop (
claude_desktop_config.json):If the app cannot find
delhaize-mcp, use its full path (which delhaize-mcpshows it).
Command line
The same actions work without an assistant:
How it works
Delhaize renders each receipt as an image inside a client-side app, so the server lets the real page render in a headless Chromium (Playwright) and reads the finished page, exactly as a person would. All parsing rules (French dates, euro amounts, de-duplication, file naming) live in src/delhaize_mcp/core.py, which has no browser dependency and is fully unit-tested.
Tests
No browser or network needed:
Privacy
- Nothing leaves your machine except the normal page requests to delhaize.be.
- No password is read or stored. The login is a browser profile you create yourself.
- Your login and data live in
~/.delhaize-mcp, outside the code, so they never end up in a repository.
Limitations
- Built against the French-language Belgian site (
delhaize.be/fr). Page changes on Delhaize's side can break it; the parsers are deliberately forgiving, and the tools report what they missed rather than failing silently. - The promotions capture saves raw page data only; interpreting it is up to you.
Licence
MIT. See LICENSE.
来源:README.md,提交 c8b81bf
工具
0版本历史
1- v0.1.0最新Oct 1, 2026