
Swissgroceries Mcp
io.github.nicktcode由 GitHub 帳號 nicktcode 發布v0.1.2更新於 Oct 24, 2026
Swiss grocery search, promotions, and shopping plans across Migros, Coop, Aldi, Denner, Lidl.
概覽
一個本機 MCP 伺服器,讓助理搜尋瑞士超市商品、跨連鎖比價與查看促銷,並規劃多店購物行程。
- 可以做什麼
- 跨 Migros、Coop、Aldi、Denner、Lidl、Farmy、Volgshop 和 Otto's 搜尋商品,提供正規化價格、單位價格與營養資訊,並依連鎖與商品 ID 取得完整商品詳情。依連鎖與半徑尋找附近門市,並查詢某連鎖哪些門市有指定商品庫存。列出目前促銷,可依連鎖、關鍵字、門市或到期時間篩選。用單店、拆分購物車或絕對最低價策略為購物清單規劃行程,可設定每多一站的成本懲罰。對每個連鎖轉接器做健康檢查,並讀取已註冊連鎖及其能力清單。
- 適用情境
- 適合在瑞士購物時,讓助理比較食品雜貨價格、查找本週優惠、定位附近門市,或為一份購物清單算出最省錢的買法,包括跨店拆分購物車。
- 執行需求
- 透過 npx 以 stdio 本機程序執行,需要 Node.js 20 或更新版本。不需帳號或 API 金鑰,Denner 轉接器會匿名自動註冊。選用環境變數:DENNER_JWT、LIDL_DEFAULT_STORE、SWISSGROCERIES_USER_AGENT_COOP、SWISSGROCERIES_LOG_LEVEL 和 SWISSGROCERIES_DISABLE_CACHE。需要連線至各零售商介面的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Swissgroceries Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
swissgroceries-mcp
[npm version] [npm downloads] [CI] [License: PolyForm Shield 1.0.0] [Node] [MCP compatible] [nicktcode/swissgroceries-mcp MCP server] [PRs Welcome]
Real-time Swiss grocery shopping over the Model Context Protocol. Search products, compare prices across Migros, Coop, Aldi, Denner, Lidl, Volgshop, Otto's, and Coop City, see weekly promotions, and plan multi-store shopping trips. Works with any MCP-compatible client (Claude Desktop, Claude Code, Cursor, Cline, Continue, VS Code MCP extensions, custom clients).
Disclaimer
This is a personal fun project. It is not affiliated with, endorsed by, or sponsored by Migros, Coop, Aldi, Denner, Lidl, Volg, Otto's, or any other retailer. It uses publicly accessible mobile-app endpoints to make Swiss grocery shopping a bit smarter for end users.
If you represent any of these stores and have concerns (about API usage, branding, scraping rate, or anything else), please reach out to the maintainer through GitHub and we will work it out. No need to escalate.
API stability: the chain APIs used here are unofficial and can change at any time. The maintainer is not responsible for failures caused by upstream changes; please open an issue with the response sample so the affected adapter can be updated.
PRs welcome. New chains, better matchers, smarter strategies, bug fixes, doc improvements; all encouraged. See CONTRIBUTING.md.
Install
No accounts, no tokens, no API keys required. The Denner adapter self-registers an anonymous client on first use; everything else uses public endpoints.
Claude Desktop (one-click)
Download swissgroceries-mcp.mcpb from the Releases page and:
- macOS: double-click or drag onto the Claude Desktop app icon.
- Windows: Settings → Extensions → Advanced → Install Extension → select the file.
Claude Code (one-liner)
Cursor / Cline / Continue / VS Code / Claude Desktop (manual config)
Most MCP-compatible clients accept the same JSON server entry. Add it to your client's MCP config file (paths vary, see your client's docs):
Common config paths:
- Claude Desktop:
~/Library/Application Support/Claude/claude_desktop_config.json(macOS),%APPDATA%\Claude\claude_desktop_config.json(Windows). - Cursor:
.cursor/mcp.jsonin the project, or~/.cursor/mcp.jsonglobally. - Cline / Continue / VS Code: see each client's MCP documentation.
- Custom clients: any stdio-based MCP client can spawn
npx -y @nicktcode/swissgroceries-mcpdirectly.
What you can ask
Price comparison
- "Where is milk cheapest near 8001 Zürich right now?"
- "Compare pasta prices across Migros and Coop."
- "Show me organic milk options under CHF 3."
Shopping planning
- "I need milk, bread, eggs, chicken, and pasta near 8050. Where should I shop to keep costs down?"
- "Plan my weekly shop for 5 items near 4052 Basel, one stop only."
- "Split my cart across stores for the absolute lowest total, but add a 2 CHF penalty per extra trip."
Promotions and deals
- "What is on sale at Aldi this week?"
- "Any Migros deals on cheese ending this week?"
- "Show me all promotions across chains for pasta."
Stores and stock
- "Find Coop stores within 3 km of Bern Hauptbahnhof."
- "Which Migros near me has product 4389992 in stock?"
- "List Denner branches near 8050."
Tools
Each tool exposes rich JSON Schema with field-level descriptions, so the LLM knows when and how to call it.
Prompts
Prompts are surfaced as one-click templates in MCP-aware clients (Claude Desktop, Cursor, Cline). They produce structured user messages that drive the right tool calls — useful as a starting point and as discovery of what the server can do.
Resources
Chain coverage
NormalizedProduct.nutrition is normalized to a per-100g (or per-100ml) basis with the standard Swiss labelling fields — energyKj, energyKcal, fat, saturatedFat, carbs, sugar, fiber, protein, salt — so consumers can sort across chains ("highest protein per 100g lasagne") even though each upstream API exposes the data on a different surface and in a different shape. Missing or unparseable fields are left undefined; adapters never fabricate values.
Configuration
How it works
Each grocery chain is wrapped in an independent adapter (src/adapters/<chain>/) that handles authentication, HTTP calls, and raw-to-normalised mapping. Adapters all produce the same NormalizedProduct, NormalizedStore, and NormalizedPromotion shapes (defined in src/adapters/types.ts), so the rest of the system never has to know which chain it is talking to.
The HTTP utility (src/util/http.ts) underpins every adapter except Migros (which delegates to the migros-api-wrapper library): in-memory response caching with a 5-minute TTL, retry with exponential backoff (3 attempts, 250 ms base), per-host rate limiting (~10 requests per second), and a per-host circuit breaker that opens after 5 consecutive failures and resets after 60 seconds.
The shopping planner (src/services/planner.ts) fans out store and product searches in parallel across all active adapters, then feeds results into a strategy solver (src/services/strategy.ts) that supports three modes:
single_store: minimise the number of stops.split_cart: cheapest split across chains, with a configurable per-stop penalty.absolute_cheapest: cheapest split, ignoring stop count.
Cross-chain comparisons are kept fair by a category-text canonicality filter (src/services/matcher.ts, isCanonical). When at least one chain returns a product whose category text matches the query, results from chains that only returned tangential products (for example, Apfelschorle when searching for "apfel") are dropped from the comparison matrix for that item.
Build from source
To also build the .mcpb bundle locally:
Troubleshooting
Coop "DataDome challenge" error
You hit Coop's bot protection. Set SWISSGROCERIES_USER_AGENT_COOP to a freshly captured iOS Safari User-Agent string and try again.
Denner "auth_expired" error
Rare, since the adapter rotates its token automatically. If it persists, unset any custom DENNER_JWT and let the adapter re-bootstrap from scratch.
Lidl returns 0 results
Lidl Switzerland has no online grocery shop; lidl.ch only lists the current and upcoming weekly offers (around 600 items, food and non-food). Search covers that assortment, so a product that isn't on offer this or next week returns 0 results. This is expected.
ZIP unknown error
The static lookup table covers all 3,190 official Swiss postcodes. If yours is missing, pass { lat, lng } directly or open an issue with the missing PLZ.
Migros stores nowhere near my location
The Migros store-search API caps at ~10 results per query. The adapter passes a city hint derived from your ZIP. If you call the adapter directly without ZIP-based geocoding, pass cityHint explicitly.
Development
The test suite uses Vitest. Fixture JSON files live under tests/fixtures/<chain>/. Capture scripts in scripts/ show how to refresh them.
Adding a new chain
See CONTRIBUTING.md for the full guide. Quick version:
- Capture API responses with Charles Proxy or mitmproxy on the chain's iOS or Android app.
- Create
src/adapters/<chain>/{client,tags,normalize,index}.tsfollowing the existing patterns. Usesrc/adapters/aldi/as the simplest reference. - Map raw responses to
NormalizedProduct,NormalizedStore, andNormalizedPromotion. - Declare capability flags accurately.
- Register the adapter in
src/index.ts'sbuildRegistry(). - Add fixture-based tests under
tests/adapters/.
License
PolyForm Shield 1.0.0 from v0.10.0. You can use and modify it for
anything that doesn't compete with this software or the author's own products
built on it (Swiss grocery search, price comparison and shopping apps or
services), even if your product is free. Personal use in your own MCP client is
fine. See LICENSING.md or contact [email protected].
v0.7.5 to v0.9.0 were released under AGPL-3.0-only and v0.7.4 and earlier under MIT; those published versions keep their original licenses.
來源:README.md,提交 c95862b
工具
0版本歷史
1- v0.1.2最新Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。