{"id":49446450,"url":"https://github.com/nicktcode/swissgroceries-mcp","last_synced_at":"2026-05-02T14:05:35.549Z","repository":{"id":354633917,"uuid":"1224481107","full_name":"nicktcode/swissgroceries-mcp","owner":"nicktcode","description":"MCP server for Swiss grocery stores: Migros, Coop, Aldi, Denner, Lidl","archived":false,"fork":false,"pushed_at":"2026-04-29T21:14:49.000Z","size":1516,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-29T23:07:52.123Z","etag":null,"topics":["aldi","anthropic","claude","coop","denner","grocery","lidl","mcp","mcp-server","migros","model-context-protocol","shopping","swiss","switzerland"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nicktcode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-29T10:21:28.000Z","updated_at":"2026-04-29T21:14:54.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/nicktcode/swissgroceries-mcp","commit_stats":null,"previous_names":["nicktcode/swissgroceries-mcp"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/nicktcode/swissgroceries-mcp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicktcode%2Fswissgroceries-mcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicktcode%2Fswissgroceries-mcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicktcode%2Fswissgroceries-mcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicktcode%2Fswissgroceries-mcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicktcode","download_url":"https://codeload.github.com/nicktcode/swissgroceries-mcp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicktcode%2Fswissgroceries-mcp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32487751,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aldi","anthropic","claude","coop","denner","grocery","lidl","mcp","mcp-server","migros","model-context-protocol","shopping","swiss","switzerland"],"created_at":"2026-04-29T23:01:17.398Z","updated_at":"2026-05-02T14:05:35.533Z","avatar_url":"https://github.com/nicktcode.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/icon.png\" alt=\"swissgroceries-mcp\" width=\"180\"\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eswissgroceries-mcp\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@nicktcode/swissgroceries-mcp\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@nicktcode/swissgroceries-mcp.svg?label=npm\" alt=\"npm version\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@nicktcode/swissgroceries-mcp\"\u003e\u003cimg src=\"https://img.shields.io/npm/dm/@nicktcode/swissgroceries-mcp.svg\" alt=\"npm downloads\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/nicktcode/swissgroceries-mcp/actions/workflows/ci.yml\"\u003e\u003cimg src=\"https://github.com/nicktcode/swissgroceries-mcp/actions/workflows/ci.yml/badge.svg\" alt=\"CI\"\u003e\u003c/a\u003e\n  \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-blue.svg\" alt=\"License: MIT\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://nodejs.org/\"\u003e\u003cimg src=\"https://img.shields.io/node/v/@nicktcode/swissgroceries-mcp\" alt=\"Node\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://modelcontextprotocol.io/\"\u003e\u003cimg src=\"https://img.shields.io/badge/MCP-compatible-8A2BE2\" alt=\"MCP compatible\"\u003e\u003c/a\u003e\n  \u003ca href=\"CONTRIBUTING.md\"\u003e\u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg\" alt=\"PRs Welcome\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nReal-time Swiss grocery shopping over the [Model Context Protocol](https://modelcontextprotocol.io/). Search products, compare prices across Migros, Coop, Aldi, Denner, Lidl, Farmy, Volgshop, and Otto's, 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).\n\n\u003e **Disclaimer**\n\u003e\n\u003e This is a personal fun project. It is not affiliated with, endorsed by, or sponsored by Migros, Coop, Aldi, Denner, Lidl, Farmy, 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.\n\u003e\n\u003e 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.\n\u003e\n\u003e **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.\n\u003e\n\u003e **PRs welcome.** New chains, better matchers, smarter strategies, bug fixes, doc improvements; all encouraged. See [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## Install\n\nNo accounts, no tokens, no API keys required. The Denner adapter self-registers an anonymous client on first use; everything else uses public endpoints.\n\n### Claude Desktop (one-click)\n\nDownload `swissgroceries-mcp.mcpb` from the [Releases page](https://github.com/nicktcode/swissgroceries-mcp/releases) and:\n\n- macOS: double-click or drag onto the Claude Desktop app icon.\n- Windows: Settings → Extensions → Advanced → Install Extension → select the file.\n\n### Claude Code (one-liner)\n\n```bash\nclaude mcp add swissgroceries -- npx -y @nicktcode/swissgroceries-mcp\n```\n\n### Cursor / Cline / Continue / VS Code / Claude Desktop (manual config)\n\nMost 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):\n\n```json\n{\n  \"mcpServers\": {\n    \"swissgroceries\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@nicktcode/swissgroceries-mcp\"]\n    }\n  }\n}\n```\n\nCommon config paths:\n\n- **Claude Desktop**: `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS), `%APPDATA%\\Claude\\claude_desktop_config.json` (Windows).\n- **Cursor**: `.cursor/mcp.json` in the project, or `~/.cursor/mcp.json` globally.\n- **Cline / Continue / VS Code**: see each client's MCP documentation.\n- **Custom clients**: any stdio-based MCP client can spawn `npx -y @nicktcode/swissgroceries-mcp` directly.\n\n## What you can ask\n\n**Price comparison**\n- \"Where is milk cheapest near 8001 Zürich right now?\"\n- \"Compare pasta prices across Migros and Coop.\"\n- \"Show me organic milk options under CHF 3.\"\n\n**Shopping planning**\n- \"I need milk, bread, eggs, chicken, and pasta near 8050. Where should I shop to keep costs down?\"\n- \"Plan my weekly shop for 5 items near 4052 Basel, one stop only.\"\n- \"Split my cart across stores for the absolute lowest total, but add a 2 CHF penalty per extra trip.\"\n\n**Promotions and deals**\n- \"What is on sale at Aldi this week?\"\n- \"Any Migros deals on cheese ending this week?\"\n- \"Show me all promotions across chains for pasta.\"\n\n**Stores and stock**\n- \"Find Coop stores within 3 km of Bern Hauptbahnhof.\"\n- \"Which Migros near me has product 4389992 in stock?\"\n- \"List Denner branches near 8050.\"\n\n## Tools\n\n| Tool | What it does |\n|---|---|\n| `find_stores` | Find grocery stores near a location, filtered by chain and radius. |\n| `search_products` | Cross-chain product search with normalised price, unit price, size, and tags. |\n| `get_product` | Full product details for a chain plus product ID pair. |\n| `get_promotions` | Current promotional deals, filterable by chain, keyword, store, or expiry. |\n| `find_stock` | Stores of a chain that have a given product in stock. |\n| `plan_shopping` | Plan a multi-store trip for a shopping list near a location. |\n| `health_check` | Probe each registered chain adapter and report status, latency, and capabilities. |\n\nEach tool exposes rich JSON Schema with field-level descriptions, so the LLM knows when and how to call it.\n\n## Chain coverage\n\n| Chain | Product search | Promotions | Per-store stock | Auth |\n|---|---|---|---|---|\n| Migros | Full catalog | Yes | Yes | Guest token (auto, rotated on expiry) |\n| Coop | Full catalog (coopathome) | Yes | Yes (geo) | None |\n| Aldi | Full catalog | Yes | No | None |\n| Denner | Full catalog | Yes | No | Anonymous self-auth (signup + signin, rotated) |\n| Lidl | Weekly leaflet only | Yes | No | None |\n| Farmy | Full catalog (organic delivery) | Yes (strikeout-price filter) | No (delivery-only) | None |\n| Volgshop | Full catalog | Yes (`on_sale` filter) | No (delivery-only) | None |\n| Otto's | Grocery-adjacent (food, drugstore, baby) | Yes (priceLabels facet) | Yes (per-store stockLevel) | None |\n\n---\n\n## Configuration\n\n| Env var | Default | Effect |\n|---|---|---|\n| `DENNER_JWT` | _(unset)_ | Optional pre-supplied Denner Bearer JWT. Without it, the adapter self-registers anonymously on first use and rotates the token automatically. |\n| `LIDL_DEFAULT_STORE` | `CH0149` | Default Lidl store ID used when no `storeIds` are passed. |\n| `SWISSGROCERIES_USER_AGENT_COOP` | _(default iOS Safari UA)_ | Override the User-Agent for Coop calls if DataDome ever blocks the default. |\n| `SWISSGROCERIES_LOG_LEVEL` | `info` | `silent`, `info`, or `debug`. |\n| `SWISSGROCERIES_DISABLE_CACHE` | _(unset)_ | Set to `1` to bypass the in-memory HTTP cache (useful for debugging). |\n\n## How it works\n\nEach grocery chain is wrapped in an independent adapter (`src/adapters/\u003cchain\u003e/`) 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.\n\nThe 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.\n\nThe 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:\n\n- `single_store`: minimise the number of stops.\n- `split_cart`: cheapest split across chains, with a configurable per-stop penalty.\n- `absolute_cheapest`: cheapest split, ignoring stop count.\n\nCross-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.\n\n```\nMCP client (any LLM)\n    │\n    │ MCP tool call\n    ▼\nsrc/index.ts ── buildRegistry() ────────────────────────────────────────┐\n    │                                                                     │\n    │ routes to tool handler                                              │\n    ▼                                                                     ▼\nsrc/tools/                                                  src/adapters/\n  find_stores.ts    ──► geocoding ──► adapter.searchStores     migros/\n  search_products.ts ──────────────► adapter.searchProducts    coop/\n  get_product.ts    ──────────────► adapter.getProduct         aldi/\n  get_promotions.ts ──────────────► adapter.getPromotions      denner/  (auto-auth)\n  find_stock.ts     ──────────────► adapter.findStoresWithStock lidl/\n  plan_shopping.ts  ──► geocoding ──► planner ──► strategy solver\n                                                     │\n                                            NormalizedProduct\n                                            NormalizedStore\n                                            NormalizedPromotion\n```\n\n## Build from source\n\n```bash\nnode --version   # requires Node.js \u003e=20\ngit clone https://github.com/nicktcode/swissgroceries-mcp\ncd swissgroceries-mcp\nnpm install\nnpm run build\n```\n\nTo also build the `.mcpb` bundle locally:\n\n```bash\nnpx tsx scripts/build-mcpb.ts\n```\n\n## Troubleshooting\n\n**Coop \"DataDome challenge\" error**\n\nYou hit Coop's bot protection. Set `SWISSGROCERIES_USER_AGENT_COOP` to a freshly captured iOS Safari User-Agent string and try again.\n\n**Denner \"auth_expired\" error**\n\nRare, since the adapter rotates its token automatically. If it persists, unset any custom `DENNER_JWT` and let the adapter re-bootstrap from scratch.\n\n**Lidl returns 0 results**\n\nLidl only indexes products from the current weekly campaign leaflet. If your search term is not in this week's campaigns, you will get 0 results. This is expected.\n\n**ZIP unknown error**\n\nThe 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.\n\n**Migros stores nowhere near my location**\n\nThe 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.\n\n## Development\n\n```bash\nnpm test              # full test suite, no network calls\nRUN_LIVE=1 npm test   # also runs live smoke tests against real chain APIs\nnpm run dev           # tsx watcher for local iteration\nSWISSGROCERIES_DISABLE_CACHE=1 RUN_LIVE=1 npm test  # cache off, useful for debugging\nSWISSGROCERIES_LOG_LEVEL=debug npm run dev          # verbose logging\n```\n\nThe test suite uses [Vitest](https://vitest.dev/). Fixture JSON files live under `tests/fixtures/\u003cchain\u003e/`. Capture scripts in `scripts/` show how to refresh them.\n\n## Adding a new chain\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for the full guide. Quick version:\n\n1. Capture API responses with Charles Proxy or mitmproxy on the chain's iOS or Android app.\n2. Create `src/adapters/\u003cchain\u003e/{client,tags,normalize,index}.ts` following the existing patterns. Use `src/adapters/aldi/` as the simplest reference.\n3. Map raw responses to `NormalizedProduct`, `NormalizedStore`, and `NormalizedPromotion`.\n4. Declare capability flags accurately.\n5. Register the adapter in `src/index.ts`'s `buildRegistry()`.\n6. Add fixture-based tests under `tests/adapters/`.\n\n## License\n\nMIT, see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicktcode%2Fswissgroceries-mcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicktcode%2Fswissgroceries-mcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicktcode%2Fswissgroceries-mcp/lists"}