migros-mcp
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., "@migros-mcp Search Migros for oat milk and check if it's in stock nearby"
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.
migros-mcp
Lets Claude (and other AI apps) search Migros products, recipes, stores and promotions. Sign in, and it can also manage your basket and look up your orders, receipts and Cumulus points.
Unofficial. Not made or supported by Migros. It uses the same behind-the-scenes addresses as the Migros website, so it can break whenever Migros changes them. Use at your own risk.
Install
This is a fork. herp75/migros-mcp is lewpgs/migros-mcp with security hardening, live tests and more tools (see the CHANGELOG). It comes as a Docker image,
ghcr.io/herp75/migros-mcp, and is listed in the MCP Registry asio.github.herp75/migros-mcp. The npm packagemigros-mcpand the Claude Desktop installermigros-mcp.mcpbare upstream's version, not this one.
It runs on your own computer, so it works in desktop apps that can start a program: Claude Desktop, Claude Code, Cursor and similar. It doesn't work on claude.ai in a browser or in the Claude phone apps. You need Docker or Podman.
Your login, in a file only you can read. Skip this to only search.
install -m 600 /dev/null ~/.config/migros-mcp.env
"${EDITOR:-nano}" ~/.config/migros-mcp.envMIGROS_EMAIL=you@example.com
MIGROS_PASSWORD=your-passwordOne line each, no quotes. $, # and quotes in the password are fine (Docker reads the file as written). For 2FA without being asked for codes, add MIGROS_TOTP_SECRET=... (see Your Migros account).
The saved login lives in the Docker volume migros-mcp, so it survives restarts. That matters: Migros blocks computers that sign in too often.
Claude Code
claude mcp add migros -- docker run -i --rm \
--env-file ~/.config/migros-mcp.env -v migros-mcp:/config \
ghcr.io/herp75/migros-mcp:0.6Leave out --env-file … to only search. With Podman, write podman instead of docker.
Claude Desktop, Cursor and other apps
Add this to the app's MCP config file, with your home folder in the path:
Claude Desktop: Settings > Developer > Edit Config
Cursor:
~/.cursor/mcp.json(all projects) or.cursor/mcp.json(one project)
{
"mcpServers": {
"migros": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"--env-file", "/home/you/.config/migros-mcp.env",
"-v", "migros-mcp:/config",
"ghcr.io/herp75/migros-mcp:0.6"
]
}
}
}Other apps (VS Code, Windsurf, Zed and so on) run the same command but lay out their config a little differently. Check your app's MCP instructions.
Checking the image (optional)
Each image is signed with cosign, keyless, by the release workflow of this repository:
cosign verify ghcr.io/herp75/migros-mcp:0.6 \
--certificate-identity-regexp '^https://github.com/herp75/migros-mcp/\.github/workflows/(docker|release)\.yml@' \
--certificate-oidc-issuer https://token.actions.githubusercontent.comCheck that it works
Start a new chat and ask: "Search Migros for oat milk."
Related MCP server: wegmans-mcp
Your Migros account
Optional. Without it, product search, product details, stock, stores, promotions and recipes all work.
With it, Claude can also see and change your basket and shopping lists, look up your orders, in-store receipts and Cumulus points, and put Cumulus coupons on your card. It never places an order or pays. It gives you a checkout link, and you finish on migros.ch yourself.
What to enter depends on how you sign in to migros.ch:
You sign in with | Enter |
Email and password | Email and password. Done. Use a password you use nowhere else: the server keeps it in a file on your computer. |
Email, password and a 6-digit code from an authenticator app | Email and password. When Claude needs to sign in, it asks you for the current code. That only happens when Migros ends the saved login, not in every chat. |
The same, but you never want to be asked for a code | Email, password and your setup key (see below). |
The setup key (also called the TOTP secret) is not the 6-digit code. It's the long code, about 32 letters and digits like JBSWY3DPEHPK3PXP..., that you got when you first added Migros to your authenticator app. It never changes.
Saved in a password manager? Open the Migros entry and look for an option like "View one-time password secret". If you see a link starting with
otpauth://, the setup key is the part aftersecret=.Not saved anywhere? Migros only shows it while you set up 2FA. In your Migros account settings, remove 2FA and set it up again. Under the QR code is a box saying "Or enter the following key in the authenticator app". Copy that key before you finish, and add the new entry to your authenticator app.
Add it as one more line, MIGROS_TOTP_SECRET=..., in ~/.config/migros-mcp.env (see Install).
Only codes from an authenticator app work. If your account uses a passkey only, or codes by SMS, add an authenticator app in your Migros account settings first.
Settings
All settings are environment variables. With Docker, put them in ~/.config/migros-mcp.env (see Install). None is required.
Variable | Default | What it does |
| none | Your Migros login email. Without email and password, only the tools without an account work. |
| none | Your Migros password. Only ever sent to |
| none | The 2FA setup key, so you're never asked for a code. Works like a second password: keep it as safe. With it in the same file as the password, anyone who gets that file has both factors. |
| on; off in the image |
|
| built in | Overrides the browser name sent with the searches that need no account. Rarely needed. |
| the usual place; | Where the saved login ( |
For development only: MIGROS_TEST_EMAIL, MIGROS_TEST_PASSWORD, MIGROS_TEST_TOTP_SECRET, MIGROS_LIVE_ENV_FILE and MIGROS_LIVE_SESSION_DIR (see Development).
What you can ask
Without an account:
"Search Migros for protein bars"
"What's the nutrition info for this product?"
"Find Migros stores near Zurich"
"What promotions does Migros have right now?"
"Find me a risotto recipe"
With your account:
"What's in my Migros basket?"
"Add 2 litres of milk to my basket"
"Add the ingredients for this recipe to my basket"
"Show me my last 5 Migros orders"
"How much did I spend at Migros last month?"
"Which Migros stores did I shop at last month, and for how much?"
"Which Cumulus coupons do I have? Activate the one for coffee."
"Make a new shopping list for the weekend"
"Give me the link to finish my checkout"
Updating
:0.6 follows the newest 0.6.x release (fixes only). To get it, pull the image and restart the app:
docker pull ghcr.io/herp75/migros-mcp:0.6New features come with a new minor version (:0.7): change the tag in your config. Releases are listed on the releases page and in the CHANGELOG. The image doesn't check for updates itself (MIGROS_MCP_UPDATE_CHECK is off in it).
Privacy and safety
Your email, password and setup key are only ever sent to Migros' own login page (
login.migros.ch). A 6-digit code you give Claude is used for that one sign-in and never stored or logged.Your password and setup key sit in
~/.config/migros-mcp.env, readable only by you, not in the app's config file.Once you're signed in, the saved login (cookies and an access token) stays on your computer, in
session.jsonin the Docker volumemigros-mcp.docker volume rm migros-mcpsigns you out. Inside the volume, only the server's user can read it. (Run without Docker, it's in~/.config/migros-mcp/on Linux,~/Library/Application Support/migros-mcp/on a Mac,%APPDATA%\migros-mcp\on Windows.)Your email, password, setup key, cookies and access token are masked in error messages.
Tools that change your basket are marked as such, so your app can ask you before running them. Leave that approval on.
Give Claude the 6-digit code yourself. Don't let an AI that can act on your account also read your codes (for example from a password manager): then a text it reads could get it to sign in, and the second factor protects nothing.
Product texts, recipes and order data come from Migros and other people. migros-mcp tells the AI to treat them as information, not as instructions.
It never places orders or pays.
get_checkout_linkgives you a link, and you finish on migros.ch.Found a security problem? See SECURITY.md.
Troubleshooting
"Too many requests" or other sign-in errors. Migros blocks computers that sign in too often. When that happens, migros-mcp stops trying for a while on its own (30 seconds at first, longer if it keeps happening) and keeps using your current login while it's still valid. The error says until when. Wait until then before trying again. Restarting the app over and over, or a wrong password, makes it worse.
Something that used to work fails. Migros may have changed its website. Update to the newest version (see Updating), and if it still fails, open an issue.
Tools
These are what Claude calls behind the scenes. You don't need them to use it.
The Kind column says what a tool does to your account: reads, changes (nothing is lost) or deletes (removes or overwrites something). Your app uses this to decide when to ask you first. Keep that approval on for anything that isn't reads.
Without an account (all reads)
Tool | What it does |
| Search products by name or keyword, including ones sold only online (such as "Partner" products). |
| Nutrition, ingredients, allergens, price and ratings. Online-only products also get their online price and a Partner flag. |
| Whether a product is in stock at a given store. Updated once a day. "Unknown" when Migros has no data. |
| All Migros product categories. |
| Stores near a place, with addresses and opening hours. |
| Current promotions and deals. |
| Search Migusto, Migros' recipe site, by text and/or ingredients. German, French and Italian only. |
| A full recipe: ingredients, steps, photos, nutrition. |
| The Migros products Migusto suggests for a recipe, with name and price, ready for |
With your account
Tool | Kind | What it does |
| changes | Sign in with the current 6-digit code. Only used when no setup key is saved. |
| reads | Your name, email and language. |
| reads | Your saved delivery and billing addresses. |
| reads | Your shopping lists by name, for people with more than one. |
| changes | Start a new, empty list. |
| deletes | Give a list a new name (the old one is replaced). |
| deletes | Delete a list with its items. Only after you confirm, and never your only list. |
| reads | What's in your basket (a shopping list). |
| deletes | Add a product (1 by default). If it's already there, its quantity is replaced by the new number, not added to. |
| deletes | Set how many of an item you want (0 removes it). |
| deletes | Remove an item. |
| deletes | Add a note to an item, such as "laktosefrei" (replaces an earlier note). |
| reads | A link to finish checkout on migros.ch. The link is the same for every list: with several lists, check on migros.ch that the right one is shown. |
| reads | Your online orders, page by page, filterable by status. |
| reads | One order in full. |
| reads | Your Cumulus card: points collected this period, card number, cardholder, memberships. |
| reads | Your current personal Cumulus coupons, and which can be activated. |
| changes | Put a coupon on your Cumulus card for your next purchase. Nothing is bought. |
| changes | Take a coupon off the card again. |
| reads | Your Cumulus bons (vouchers). You redeem them yourself at checkout. |
| reads | Your in-store receipts (Kassenbons) for a date range: store, date, amount, points. |
| reads | The link to the receipts page on migros.ch, where you open a receipt to see its items (the same link for every receipt; the items aren't available to this server). |
Without an account, it uses migros-api-wrapper and the same addresses the Migros website calls, with a guest token it fetches at startup.
With an account, it signs in at
login.migros.chthe way a browser does (email, then password, then the 2FA code if your account has one) and saves the login. The access token only lasts a short while, so it's renewed quietly from the saved login, without signing in again. A full sign-in only happens when Migros ends the saved login.Saving the login matters because Migros' sign-in page sits behind Cloudflare, which blocks computers that sign in too often.
Without a setup key, once it knows your account needs a code, it waits until Claude has one before sending your password. That way it never starts a sign-in it can't finish.
Development
How the code is laid out, and how a tool is added: docs/architecture.md. How to contribute: CONTRIBUTING.md.
git clone https://github.com/herp75/migros-mcp.git
cd migros-mcp
npm install
npm run build
npm testBefore a pull request, run the same checks as CI:
npm run typecheck # TypeScript, including the tests
npm run lint # ESLint
npm run format:check # Prettier (npm run format fixes it)
npm run test:coverage # tests, failing below 80 % line coverage of src/git config blame.ignoreRevsFile .git-blame-ignore-revs hides the one big formatting commit from git blame.
Check the tools that need no account against the live Migros website. GitHub also runs this every Monday, so a change on Migros' side shows up early:
npm run live-checkCheck the tools that need an account, with a dedicated test account (never your own). Put its login in .env.live (git-ignored, chmod 600) as MIGROS_TEST_EMAIL, MIGROS_TEST_PASSWORD and, for 2FA, MIGROS_TEST_TOTP_SECRET. --write also adds a product to the basket, changes its quantity and removes it again, checking that the basket ends up as before. The test login is kept in .live-session/, so repeated runs don't sign in again each time.
Migros answers logins from GitHub's servers with a bot check, so this runs weekly on a computer instead: scripts/migros-live-check.sh pulls the published image (edge, built from main), checks its cosign signature, and runs the check with --write inside that image with rootless podman, so it tests what people install and nothing from the repo runs outside a container. It needs podman, skopeo and cosign; the saved test login is kept in ~/.local/state/migros-live-check/. To schedule it, copy scripts/systemd/migros-live-check.service and .timer to ~/.config/systemd/user/ and run systemctl --user enable --now migros-live-check.timer; results are in journalctl --user -u migros-live-check. The live workflow on GitHub can still be started by hand, to see whether GitHub's servers get through again.
npm run live-account # read-only
npm run live-account -- --write # with the basket round tripTry it with the MCP Inspector:
npx -y @modelcontextprotocol/inspector node dist/index.jsLicense
MIT, see LICENSE.
Available Tools
31 toolsactivate_cumulus_couponActivate Cumulus couponAIdempotent
Put a personal Cumulus coupon on the user's Cumulus card, so it applies to their next purchase (online or in store). Nothing is bought. Use the ean from get_cumulus_coupons. Requires authentication.
Inputs: ean (required).
add_to_basketAdd to basketADestructiveIdempotent
Add a product to the user's basket. If it is already there, its quantity is replaced by the new one, not added to (check get_basket first to add on top). Returns the updated basket. Requires authentication.
Inputs: productId (required), quantity, shoppingListId.
authenticateSign in to MigrosAIdempotent
Log in to Migros with the current six-digit 2FA code from the user's authenticator app (ask the user for it). Only needed when an authenticated tool reports fresh_code_required, which happens when no TOTP secret is configured. Omit totpCode to reuse a cached session, or if the account has no 2FA. The code is never stored or returned.
Inputs: totpCode.
create_shopping_listCreate shopping listA
Create a new, empty shopping list and return its shoppingListId, which the basket tools take. Requires authentication.
Inputs: name (required).
deactivate_cumulus_couponDeactivate Cumulus couponAIdempotent
Take an activated Cumulus coupon off the card again (status back to AVAILABLE). Use the ean from get_cumulus_coupons. Requires authentication.
Inputs: ean (required).
delete_shopping_listDelete shopping listADestructiveIdempotent
Delete one of the user's shopping lists with all its items. Cannot be undone. Only deletes with confirm: true, which needs the user's explicit OK; the only remaining list is never deleted. Requires authentication.
Inputs: shoppingListId (required), confirm.
get_addressesYour addressesARead-only
Get the user's saved delivery and billing addresses. Requires authentication.
Inputs: no named parameters.
get_basketBasket contentsARead-only
Fetch the items currently in the user's shopping basket (Migros calls this a shopping list). Returns product IDs and quantities; use get_product_details to enrich. If the user has several lists, use get_shopping_lists and pass shoppingListId. Requires authentication.
Inputs: shoppingListId.
get_categoriesProduct categoriesARead-only
List all Migros product categories
Inputs: no named parameters.
get_checkout_linkCheckout linkARead-only
Return the URL the user should open in their browser to complete checkout (review basket, confirm address/slot, pay). Order placement requires payment confirmation in a real browser, so this tool hands off rather than firing the order automatically. Returns a basket summary alongside the URL. Requires authentication.
Inputs: shoppingListId.
get_cumulus_bonsCumulus bonsARead-only
List the user's Cumulus bons (vouchers their Cumulus points turned into). Read only: bons are redeemed at checkout on migros.ch or in a store. Requires authentication.
Inputs: no named parameters.
get_cumulus_couponsCumulus couponsARead-only
List active Cumulus coupons targeted at the user (personalized offers based on shopping history). Requires authentication.
Inputs: no named parameters.
get_cumulus_statusCumulus cardARead-only
Get the user's Cumulus loyalty card: points collected this period, Cumulus number, cardholder and memberships (such as Famigros). Requires authentication.
Inputs: no named parameters.
get_in_store_receiptsIn-store receiptsARead-only
List the user's in-store Migros receipts (Kassenbons) over a date range. Default: the last 30 days, Swiss time. Gives store, date, amount and points; line items aren't available to this server (get_receipt_details gives the link to see them on migros.ch). Requires authentication.
Inputs: limit, endDate, startDate.
get_order_detailsOrder detailsARead-only
Fetch the full details of a single order by id. Requires authentication.
Inputs: orderId (required).
get_ordersYour ordersARead-only
List the user's online orders, paginated, filtered by status. Use to find an order id, then call get_order_details. Requires authentication.
Inputs: page, status.
get_product_detailsProduct detailsARead-only
Get full product details including nutrition facts, ingredients, allergens, price, and ratings. Use search_products first to get product IDs.
Inputs: productIds (required).
get_profileYour profileARead-only
Get the logged-in customer's basic profile (name, email, language, cooperative). Requires authentication.
Inputs: no named parameters.
get_promotionsCurrent promotionsBRead-only
Search current Migros promotions and deals. Optionally filter by search query.
Inputs: query.
get_receipt_detailsReceipt linkARead-only
Get the link to the receipts page on migros.ch, where the user can open a receipt and see its line items. The link is the same for every receipt: line items aren't available to this server. get_in_store_receipts gives store, date, amount and points, enough for most questions. Requires authentication.
Inputs: receiptId (required).
get_recipe_detailsRecipe detailsARead-only
Fetch a full Migusto recipe by slug: ingredients with quantities, step-by-step instructions, photos, nutrition. Use search_recipes first to find the slug. (Migusto is Migros' recipe site at migusto.migros.ch.)
Inputs: slug (required), language.
get_recipe_productsProducts for a recipeARead-only
Fetch the Migros products Migusto suggests for a recipe, with name, price and the product UID that add_to_basket takes. Bridges recipes to shopping. Use the recipe ID from search_recipes (NOT the slug). Ingredients without a suggested product: use search_products.
Inputs: recipeId (required), limit, offset, language.
get_shopping_listsYour shopping listsARead-only
List the user's Migros shopping lists (id and name). Call this when the user mentions a specific list or has several: pass the chosen shoppingListId to the basket tools. Requires authentication.
Inputs: no named parameters.
get_stockStock at a storeARead-only
Check product stock at a specific Migros store. Use search_products and search_stores first to get the IDs. Stock is approximate and updated once a day.
Inputs: storeId (required), productId (required).
remove_from_basketRemove from basketADestructiveIdempotent
Remove a product from the user's basket. Returns the updated basket. Requires authentication.
Inputs: productId (required), shoppingListId.
rename_shopping_listRename shopping listADestructiveIdempotent
Rename one of the user's shopping lists. The old name is replaced. Requires authentication.
Inputs: name (required), shoppingListId (required).
search_productsSearch productsARead-only
Search Migros products by name or keyword, including products sold only in the Migros Online shop (such as 'Partner' products). Returns product IDs that can be used with get_product_details and add_to_basket.
Inputs: query (required), language.
search_recipesSearch Migusto recipesARead-only
Search Migusto (Migros' recipe site) by free-text query and/or ingredients. Returns recipe id, slug, title, cooking time, rating. Use get_recipe_details for full info or get_recipe_products to get Migros product UIDs to add to the basket.
Inputs: limit, query, offset, language, +1 more.
search_storesFind storesARead-only
Find Migros stores by location (city name, zip code, etc.). Returns store details including address and opening hours.
Inputs: query (required).
set_item_noteNote on a list itemADestructiveIdempotent
Set the note of an item already in a shopping list (e.g. 'laktosefrei'), keeping its quantity. Replaces an earlier note. Requires authentication.
Inputs: note (required), productId (required), shoppingListId.
update_basket_quantitySet basket quantityADestructiveIdempotent
Set an item's exact quantity in the basket. quantity=0 removes the item. Returns the updated basket. Requires authentication.
Inputs: quantity (required), productId (required), shoppingListId.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 31 tools
Most tools map cleanly to a distinct resource+action (products, stores, stock, recipes, recipes→products, orders, receipts, Cumulus). The main friction is the basket/shopping-list duality: get_basket documents that Migros calls a basket a shopping list, so get_shopping_lists vs get_basket and the list-CRUD vs basket-item tools need careful reading. get_in_store_receipts vs get_receipt_details is also a subtle split (data vs link), though descriptions explain it.
Predominantly consistent verb_noun snake_case (search_products, get_product_details, add_to_basket, delete_shopping_list). The only outlier is the bare verb 'authenticate', plus a couple of shortened forms like get_stock rather than get_product_stock. Minor deviations, still highly predictable.
31 tools exceeds the comfortable band, but the server genuinely spans many sub-domains: catalog, stores/stock, recipes, basket, shopping lists, orders, receipts, Cumulus loyalty, and auth. Each tool has a real purpose, yet the surface is heavy and forces agents to navigate several clusters before acting.
Strong lifecycle coverage for shopping: discovery (search/details/categories/stock/stores), basket and list mutation, order and receipt history, Cumulus coupons/points, and authentication. Gaps remain around address management (read-only), product review interactions, and any category-scoped product browsing, and receipt line items are explicitly unavailable—workable but not complete.
Maintenance
Related MCP Connectors
Search independent stores, check recalls and product facts, and prepare checkout at the store.
Grocery lists, recipes, menu plan, household, supermarket offers and receipt photos to track costs
Compare prices across Swiss and European shops — barcode (GTIN) lookup and daily price history.
Grocery meal planning, budgets, and flyer deals for Canadian households. Auth required.
Related MCP Servers
- FlicenseAqualityBmaintenanceA Model Context Protocol server for real-time Swiss grocery shopping that searches and compares products across 8 major Swiss retailers (Migros, Coop, Aldi, Denner, Lidl, Farmy, Volgshop, Otto’s), normalizes per-unit prices, surfaces promotions, computes optimal multi-store shopping plans, and works with any MCP-compatible client without API keys or accounts.7215 npm46-
- AlicenseNot gradedqualityBmaintenanceEnables product search and authenticated grocery shopping-list management, including adding items, setting quantities, removing items, emptying the list, and reading purchase history.1MIT
- AlicenseAqualityBmaintenanceEnables natural-language search of Swiss grocery products, price comparison, and weekly promotion lookup across retailers including Migros, Coop, Aldi, Denner, Lidl, Farmy, Volgshop, and Otto's.7MIT
- AlicenseCqualityBmaintenanceEnables Claude or any MCP client to search the Migros catalogue, check offers and stores, and read your own Cumulus data and receipts, with read-only defaults and explicit confirmation for account-changing actions.1051MIT