Skip to main content
Glama
rewe-mcp

rewe-mcp

by Robert-SD

rewe-mcp

Model Context Protocol (MCP) server for REWE (Germany). Search supermarkets, browse weekly discounts (Angebote) and brochures (Prospekte), search the product catalog, explore recipes, inspect digital eBon receipts and online order history, check your REWE Bonus balance and coupons, manage favorites and Pickup/Delivery baskets, and plan grocery trips.

Quick Start

1. Install & Build

npm install
npm run build

2. Configure the mTLS Client Certificate (Required)

REWE's mobile backend (https://mobile-clients-api.rewe.de and https://msco.rewe.de) requires a client certificate and private key during the TLS handshake. The certificate and private key must be extracted from the REWE Android APK and placed as certificate.pem and private.key in ~/.config/rewe-mcp/certs/ with 0600 permissions:

mkdir -p ~/.config/rewe-mcp/certs
chmod 600 ~/.config/rewe-mcp/certs/certificate.pem ~/.config/rewe-mcp/certs/private.key

Alternatively, set REWE_MTLS_CERT and REWE_MTLS_KEY to the file paths or inline PEM contents.

3. Log In to Your REWE Account

npm run login
  1. In the opened Chrome window, open DevTools (Cmd+Option+I on macOS / F12 on Windows/Linux) and switch to the Console tab first.

  2. Sign in with your REWE account (and 2FA if enabled).

  3. Copy the Failed to launch 'de.rewe.app://redirect?...' line from the Console and paste it into the terminal prompt.

4. Verify Setup

npm run status

Checks mTLS certificate configuration, OAuth session expiry, default market configuration, response cache settings, and performs a live check against the REWE Mobile Clients API.

Related MCP server: Rohlik MCP Server

Connecting to MCP Clients

Claude Desktop / Cursor / Antigravity (stdio)

{
  "mcpServers": {
    "rewe": {
      "command": "node",
      "args": ["/path/to/rewe-mcp/dist/index.js"],
      "env": {
        "REWE_MARKET_ID": "840174",
        "REWE_ZIP_CODE": "50667",
        "REWE_SERVICE_TYPE": "PICKUP"
      }
    }
  }
}

Streamable HTTP Server

npm run start:http -- --port 3000 --host 127.0.0.1
  • Health check: GET http://127.0.0.1:3000/healthz

  • MCP endpoint: POST / GET / DELETE http://127.0.0.1:3000/mcp

  • Optional bearer protection: set MCP_HTTP_AUTH_TOKEN=your-secret-token

Docker

docker build -t rewe-mcp .
docker run -d \
  -p 3000:3000 \
  -v ~/.config/rewe-mcp:/data \
  -e MCP_HTTP_AUTH_TOKEN=your-secret-token \
  rewe-mcp

When /data exists, rewe-mcp automatically looks for /data/certs/certificate.pem, /data/certs/private.key, /data/tokens.json, and /data/store.json.

Available MCP Tools (30 Tools)

Account, mTLS & REWE Bonus

Tool

Description

Mode

rewe_auth_status

Inspect OAuth session, mTLS cert status, and selected market

Read-only

rewe_get_profile

Fetch REWE SSO userinfo, customer details, and REWE ID

Read-only

rewe_get_bonus

Fetch REWE Bonus euro balance, points overview, and article missions

Read-only

rewe_get_coupons

List available and activated REWE Bonus & app coupons

Read-only

Markets & Default Store Configuration

Tool

Description

Mode

rewe_search_markets

Search REWE stores by city, street, name, or PLZ

Read-only

rewe_get_market_details

Fetch market opening hours, address, phone, and services

Read-only

rewe_get_service_portfolio

Check Pickup & Delivery availability for a PLZ

Read-only

rewe_get_selected_market

Read active default marketId, zipCode, and serviceType

Read-only

rewe_set_selected_market

Persist default market in store.json

Stateful (idempotent)

Discounts, Brochure & Product Catalog

Tool

Description

Mode

rewe_get_discounts

Fetch weekly market discounts (Angebote) grouped by category

Read-only

rewe_search_discounts

Filter weekly stationary offers by keyword

Read-only

rewe_get_brochure

Fetch digital weekly brochure (Prospekt) metadata

Read-only

rewe_search_products

Search live Pickup/Delivery assortment by keyword, EAN, or category

Read-only

rewe_get_product_details

Fetch full product details, ingredients, allergens, and nutrition

Read-only

rewe_get_shop_categories

Browse REWE online shop category tree for a market

Read-only

rewe_get_product_recalls

List active REWE safety product recalls (Produktrückrufe)

Read-only

Recipes

Tool

Description

Mode

rewe_search_recipes

Search REWE recipes by keyword, difficulty, collection, or tags

Read-only

rewe_get_recipe_details

Fetch recipe ingredients, preparation steps, and nutrition

Read-only

rewe_get_recipe_popular_terms

Fetch popular recipe search terms

Read-only

Digital Receipts (eBons) & Online Orders

Tool

Description

Mode

rewe_list_ebons

List in-store digital receipts (eBons) and Bonus earned

Read-only

rewe_get_ebon_pdf

Download eBon PDF receipt (base64 or save to savePath)

Stateful (idempotent)

rewe_list_orders

List online Pickup/Delivery order history

Read-only

rewe_get_order_details

Fetch line items, prices, and timeslot for an online order

Read-only

Favorites, Basket & Timeslots

Tool

Description

Mode

rewe_get_favorites

List saved REWE favorite lists and product listings

Read-only

rewe_manage_favorite

Add or remove a product in a REWE favorite list

Stateful (idempotent)

rewe_get_basket

Fetch or initialize active Pickup/Delivery basket

Stateful (idempotent)

rewe_set_basket_item

Set absolute quantity for a listingId in the basket (0 removes)

Stateful (idempotent)

rewe_get_timeslots

List available Pickup/Delivery timeslots and fees

Read-only

Grocery Trip Planning

Tool

Description

Mode

rewe_regular_products

Analyze purchase frequency, cadence, and items due for restock

Read-only

rewe_plan_grocery_trip

Match regular products & shopping list against current offers/coupons

Read-only

Environment Variables

Variable

Default

Description

REWE_MTLS_CERT

~/.config/rewe-mcp/certs/certificate.pem

PEM string or path to Cloudflare client cert

REWE_MTLS_KEY

~/.config/rewe-mcp/certs/private.key

PEM string or path to Cloudflare client private key

REWE_TOKENS_FILE

~/.config/rewe-mcp/tokens.json

OAuth token persistence file

REWE_STORE_FILE

~/.config/rewe-mcp/store.json

Default market persistence file

REWE_MARKET_ID

840174

Fallback default market ID (wwIdent)

REWE_ZIP_CODE

50667

Fallback default German postal code

REWE_SERVICE_TYPE

PICKUP

Fallback default service (PICKUP or DELIVERY)

REWE_REFRESH_TOKEN

None

Optional bootstrap refresh token

REWE_ACCESS_TOKEN

None

Optional static/ephemeral access token

REWE_MCP_CACHE

true

Set to false / 0 / off to disable in-memory TTL cache

REWE_MCP_CACHE_MAX_ENTRIES

500

Maximum cached responses in memory

MCP_TRANSPORT

stdio

Set to http for Streamable HTTP mode

MCP_HTTP_HOST

127.0.0.1

Bind host in HTTP mode

MCP_HTTP_PORT

3000

Listen port in HTTP mode

MCP_HTTP_PATH

/mcp

HTTP MCP route path

MCP_HTTP_AUTH_TOKEN

None

Optional Bearer token required for HTTP MCP requests

MCP_HTTP_JSON_RESPONSE

false

Set to true to prefer JSON responses over SSE

MCP_HTTP_SESSION_IDLE_MS

1800000

Idle session expiry timeout (ms)

Development

npm run build   # Compile TypeScript -> dist/
npm test        # Run offline test suite via node:test + tsx

All unit and integration tests run offline with mocked HTTP / mTLS fixtures. No REWE credentials or external network calls are required.

Disclaimer

This project is an unofficial, community-maintained Model Context Protocol (MCP) server. It is not affiliated with, endorsed by, or sponsored by REWE Markt GmbH or its subsidiaries. All trademarks and brand names belong to their respective owners.

License

MIT

Available Tools

30 tools
rewe_auth_statusCheck REWE OAuth & mTLS Certificate StatusA
Read-only

Inspect current REWE Keycloak SSO session status (token source, expiry, customerId), Cloudflare mTLS client certificate configuration, and active default market selection.

Inputs: no named parameters. Returns: message, savedAt, expiresAt, customerId, +11 more

rewe_get_basketGet Current REWE BasketA
Idempotent

Fetch or initialize the active REWE Pickup or Delivery basket for the configured market and return items, totals, version, and minimum order threshold status.

Inputs: zipCode, basketId, marketId, serviceType. Returns: id, items, version, zipCode, +5 more

rewe_get_bonusGet REWE Bonus Balance & Loyalty OverviewA
Read-only

Fetch your REWE Bonus euro credit balance, loyalty points overview, tier status, and active article missions.

Inputs: no named parameters. Returns: statusTier, balanceCents, balanceEuros, loyaltyPoints, +1 more

rewe_get_brochureGet REWE Weekly Brochure / Prospekt MetadataB
Read-only

Fetch digital stationary handout/brochure (Prospekt) metadata for a REWE market.

Inputs: marketId. Returns: handout, marketId

rewe_get_couponsGet REWE Bonus & App CouponsA
Read-only

Fetch available and activated REWE Bonus and personal digital app coupons.

Inputs: no named parameters. Returns: count, coupons

rewe_get_discountsGet Weekly REWE Store Discounts (Angebote)B
Read-only

Fetch current weekly promotional offers/discounts for a REWE market grouped by category.

Inputs: limit, zipCode, marketId, categoryId. Returns: marketId, categories, handoutUrl, validUntil, +1 more

rewe_get_ebon_pdfDownload REWE eBon Receipt PDFA
Idempotent

Download the original PDF receipt for a given ebonId. Optionally pass savePath to write the PDF directly to disk; otherwise returns base64Pdf and sizeBytes.

Inputs: ebonId (required), savePath. Returns: id, savedTo, base64Pdf, sizeBytes

rewe_get_favoritesGet REWE Favorite Product ListsA
Read-only

Fetch your saved REWE favorite lists along with product details, listingIds, and prices for the configured market.

Inputs: includeProducts. Returns: count, lists

rewe_get_market_detailsGet REWE Market DetailsA
Read-only

Fetch full details for a REWE market (wwIdent): opening hours, phone number, address, and in-store services.

Inputs: marketId. Returns: id, name, phone, wwIdent, +3 more

rewe_get_order_detailsGet REWE Online Order DetailsA
Read-only

Fetch full line-item breakdown, quantities, prices, and timeslot details for a REWE online order.

Inputs: orderId (required). Returns: id, items, status, createdAt, +1 more

rewe_get_product_detailsGet REWE Product Details & NutritionB
Read-only

Fetch detailed product information including description, ingredients, allergens, nutrition table, GTIN, and listing price.

Inputs: productId (required), zipCode, marketId, serviceType. Returns: id, price, title, allergens, +2 more

rewe_get_product_recallsGet REWE Product RecallsA
Read-only

Fetch active REWE product safety recalls (Produktrückrufe).

Inputs: no named parameters. Returns: count, recalls

rewe_get_profileGet REWE Member ProfileA
Read-only

Fetch authenticated REWE SSO userinfo, customer profile, REWE ID, and configured store settings.

Inputs: no named parameters. Returns: sub, email, reweId, zipCode, +7 more

rewe_get_recipe_detailsGet REWE Recipe Ingredients & Preparation StepsA
Read-only

Fetch complete REWE recipe details by recipeId: portion yield, preparation/cooking times, structured ingredients list, step-by-step instructions, and nutrition values.

Inputs: recipeId (required). Returns: id, steps, title, ingredients

rewe_get_selected_marketGet Configured Default REWE MarketA
Read-only

Show the currently active default REWE marketId (wwIdent), zipCode (PLZ), and serviceType (PICKUP or DELIVERY).

Inputs: no named parameters. Returns: city, zipCode, marketId, updatedAt, +2 more

rewe_get_service_portfolioCheck REWE Pickup & Delivery Availability for Zip CodeA
Read-only

Check whether REWE Lieferservice (delivery) and REWE Abholservice (pickup) are available for a German postal code (PLZ), and list matching market IDs.

Inputs: zipCode. Returns: zipCode, pickupMarkets, customerZipCode, deliveryMarketId, +1 more

rewe_get_shop_categoriesGet REWE Shop CategoriesA
Read-only

List top-level and nested REWE online shop categories (slug, product counts) available for a market and service type.

Inputs: zipCode, marketId, serviceType. Returns: count, categories

rewe_get_timeslotsGet Available REWE Pickup/Delivery TimeslotsA
Read-only

List available Abholservice (pickup) or Lieferservice (delivery) checkout timeslots and service fees for the current basket and market.

Inputs: zipCode, basketId, marketId, serviceType. Returns: count, timeslots

rewe_list_ebonsList REWE Digital Store Receipts (eBons)A
Read-only

List in-store digital receipts (eBons) with timestamps, store address, total spend, and REWE Bonus earned.

Inputs: limit. Returns: receipts, ebonActive, totalCount

rewe_list_ordersList REWE Online OrdersA
Read-only

List REWE Abholservice (pickup) and Lieferservice (delivery) online order history.

Inputs: limit. Returns: count, orders

rewe_manage_favoriteAdd or Remove Product in REWE Favorites ListA
Idempotent

Add a product (listingId, optional productId) to a REWE favorites list or remove an entry (itemId) from a favorites list.

Inputs: action (required), listId (required), itemId, quantity, +2 more. Returns: action, listId, result

rewe_plan_grocery_tripPlan REWE Grocery Trip with Current Offers & CouponsB
Read-only

Cross-reference your regular REWE products and extra shopping list items against current weekly stationary discounts and REWE Bonus coupons.

Inputs: zipCode, marketId, maxOrders, extraItems, +2 more. Returns: note, zipCode, marketId, serviceType, +9 more

rewe_regular_productsAnalyze Regular REWE Products from Purchase HistoryB
Read-only

Analyze previously purchased products and online order history to identify frequently bought groceries, average prices, purchase cadence, and items due for restock.

Inputs: limit, maxOrders, minPurchases. Returns: note, ebonsCount, minPurchases, ordersAnalyzed, +4 more

rewe_search_discountsSearch Weekly REWE Discounts by KeywordA
Read-only

Search current weekly stationary offers at the selected REWE market by product name, brand, or category keyword.

Inputs: query (required), limit, zipCode, marketId. Returns: query, offers, marketId, validUntil, +1 more

rewe_search_marketsSearch REWE SupermarketsA
Read-only

Search REWE stationary supermarkets by city, street, market name, or German postal code (PLZ).

Inputs: query (required). Returns: count, markets

rewe_search_productsSearch REWE Product CatalogA
Read-only

Search the live REWE supermarket assortment for a market and service type (PICKUP or DELIVERY) by product name, EAN barcode, or category slug.

Inputs: page, sort, query, filters, +5 more. Returns: page, marketId, products, totalPages, +4 more

rewe_search_recipesSearch REWE RecipesB
Read-only

Search REWE recipe database by keyword, difficulty, collection, or tags.

Inputs: page, tags, sorting, collection, +3 more. Returns: recipes, totalCount

rewe_set_basket_itemSet Product Quantity in REWE BasketA
Idempotent

Add a product listing to your REWE Pickup/Delivery basket or update its absolute quantity (set quantity: 0 to remove the item).

Inputs: quantity (required), listingId (required), version, zipCode, +3 more. Returns: id, items, version, zipCode, +5 more

rewe_set_selected_marketSet Default REWE Market & Service TypeA
Idempotent

Persist the default REWE marketId (wwIdent), zipCode (PLZ), and serviceType (PICKUP or DELIVERY) in ~/.config/rewe-mcp/store.json for subsequent product, offer, and basket calls.

Inputs: marketId (required), city, zipCode, marketName, +1 more. Returns: city, zipCode, marketId, updatedAt, +2 more

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 30 tools

    Disambiguation4/5

    Most tools target a clear resource+action pair (market details vs. market search, product search vs. product details, order list vs. order details, ebon list vs. ebon PDF). The main overlap is rewe_get_discounts vs. rewe_search_discounts (weekly offers, one grouped by category, one keyword-filtered), and the composite rewe_plan_grocery_trip partially overlaps rewe_regular_products and the discount tools, but descriptions make the distinction workable.

    Naming Consistency4/5

    Nearly every tool follows a consistent rewe_<verb>_<noun> snake_case pattern with a stable prefix. Two deviations: rewe_regular_products omits a verb entirely, and rewe_manage_favorite uses a generic verb that covers both add and remove, which is slightly less predictable than the add_/remove_ convention used elsewhere.

    Tool Count3/5

    At 30 tools the surface is heavy for a single MCP server, though the REWE domain genuinely spans auth, loyalty, markets, offers, products, recipes, receipts, orders, favorites, and basket. Many tools are narrow single-call wrappers (recipe popular terms, brochure metadata, service portfolio) that could have been consolidated, but each does earn a place.

    Completeness4/5

    Coverage is broad and coherent across the shopping lifecycle: auth/profile, loyalty and coupons, market selection, discovery, basket, timeslots, and historical orders/receipts. The notable gap is checkout — there is a basket and timeslot tool but no tool to place or cancel an order, and basket clearing only works implicitly via quantity 0.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables AI assistants to securely access a personal Dutch supermarket account, including digital receipts with itemized prices, discounts and VAT, loyalty points balance, and active shopping lists, plus search for nearby stores and products in the grocery catalog.
      20
      MIT
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to search grocery products, manage shopping carts, access account and order information, and find deals and delivery details across several European online grocery platforms.
      -
    • F
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to search grocery products, manage shopping carts, view discounts, and access account, delivery, and order information across multiple European online grocery platforms.
      -
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables AI assistants to search grocery products, manage shopping carts, view orders and delivery information, and get personalized meal and deal suggestions across multiple European grocery delivery services.
      MIT