French Grocery

Registre officiel Recherche et web

Search, compare and manage E.Leclerc Drive and Super U grocery carts without ordering.

Installation

Ajoutez ceci à la configuration MCP de votre client (Claude Desktop : claude_desktop_config.json ; Cursor : .cursor/mcp.json ; VS Code et les autres utilisent la même forme « mcpServers »).

NPM package fr-grocery-mcp
Claude Code
claude mcp add french-grocery -e 'FR_GROCERY_CONFIG=<FR_GROCERY_CONFIG>' -e 'FR_GROCERY_CHROME_PORT=<FR_GROCERY_CHROME_PORT>' -e 'FR_GROCERY_STATE_DIR=<FR_GROCERY_STATE_DIR>' -- npx -y fr-grocery-mcp@0.1.1
Configuration JSON (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "french-grocery": {
            "command": "npx",
            "args": [
                "-y",
                "fr-grocery-mcp@0.1.1"
            ],
            "env": {
                "FR_GROCERY_CONFIG": "<FR_GROCERY_CONFIG>",
                "FR_GROCERY_CHROME_PORT": "<FR_GROCERY_CHROME_PORT>",
                "FR_GROCERY_STATE_DIR": "<FR_GROCERY_STATE_DIR>"
            }
        }
    }
}

Variables d'environnement

  • FR_GROCERY_CONFIG Path to the optional JSON configuration file. Without it, only Super U is enabled.
  • FR_GROCERY_CHROME_PORT Chrome DevTools Protocol port; overrides the configuration file.
  • FR_GROCERY_STATE_DIR Directory for retailer state such as the selected Leclerc store.

Documentation

Tirée du README du projet sur GitHub, actualisée chaque semaine. Les liens ouvrent GitHub.

Sommaire
  1. fr-grocery-mcp
  2. Tools
  3. Requirements
  4. Usage
  5. Development
  6. Contributing
  7. Security
  8. License

fr-grocery-mcp

An MCP server that gives an agent domain-level access to the online grocery services ("drive") of French retailers: E.Leclerc Drive and Super U (coursesu.com) today, others through a new adapter. Search products, read their composition, manage the cart, read slots and minimum order amounts, compare carts. Nothing else.

The reasoning (recipes, ingredients, quantities for N people, product choice, price/promotion trade-offs) belongs to the agent. For example:

Order what I need to cook spaghetti bolognese and a four-cheese pizza for 4, at the cheapest of Leclerc and Super U.

The agent builds the list, searches each ingredient at each retailer, fills the carts, then compares them. The order is never placed: slot booking and payment are left to the user, on the site.

[!WARNING] This project is not affiliated with, endorsed by or supported by E.Leclerc, Système U or any retailer. It drives your own logged-in browser session, at a human pace, for personal use. Retailer sites change without notice and their terms of use apply: use it at your own risk.

Tools

Every retailer tool takes store (leclerc, superu: an enum generated from the configuration).

ToolEffectAnnotations
list_stores(check=false)plugged-in retailers and capabilities; with check, status of each session and active storeread-only
search_products(store, query, limit=20)products: id, label, price_eur, unit_price (€/kg, €/l, €/piece), available, typed promotions, best_offer (net cost, bundles and loyalty included)read-only
get_product(store, product_id)product page: ingredients (allergens in capitals; null for a raw product), declared allergens, originread-only
get_cart(store)lines (product_id, name, quantity, line_total_eur, unit_price) and total_eurread-only
get_order_conditions(store?)store, booked slot, slot attached to the cart, dated next slots (ISO start), minimums; store omitted = every retailerread-only
add_to_cart(store, product_id, quantity=1)adds to the quantity already present
set_quantity(store, product_id, quantity)sets the quantity (0 = removal)idempotent
remove_from_cart(store, product_id)removes the productdestructive, idempotent
find_stores(store, query)stores around a postcode or town (if the retailer supports it)read-only
set_store(store, store_id)selects and remembers the active storeidempotent
compare_carts(mode="drive")each retailer's cart: total, lines, minimum and missing amount, next slots; sorted from cheapest to most expensiveread-only

Every change reads the cart back and returns confirmed: true if the site holds the targeted quantity. Results are typed (outputSchema + structuredContent) and the server sends instructions describing the flow to the agent. A cap of 50 units per product guards against unit mistakes.

Errors (isError, error field): ValidationError (fix the call), NotSupportedError (the retailer does not support it), SessionExpiredError (log in again in Chrome), SiteBlockedError (anti-bot: stop), TransientError (retried automatically, then reported).

Product labels, promotion texts and search terms stay in French, as on the sites.

Capabilities per retailer
CapabilityE.Leclerc DriveSuper U
Search, cart, promotionsyes (immediate, multibuy, Ticket)yes (immediate, multibuy, Carte U)
Product pageingredients, allergens, originingredients, origin
Store selection from the agentfind_stores / set_storeno: on the site
Minimum ordernot exposed when logged outyes
Slotsnext slot, cart datenext slots, booked slot

Requirements

  • Node ≥ 26 (runs TypeScript natively: no build step). With mise: mise install --locked installs the version recorded in mise.lock.
  • A Chrome started with --remote-debugging-port=9222 and logged in to the sites (mise run chrome starts a dedicated profile in ~/.fr-grocery-mcp/chrome). One tab per site is found, or opened, by its domain.

Requests go through the browser session, one at a time and spaced out: the server replays what the site does on a click (see docs/retailers/). No protection is bypassed: an anti-bot block stops the server, it is never retried.

Configuration

FR_GROCERY_CONFIG points to a JSON file. Without a file, only Super U is plugged in.

{
  "chrome": { "port": 9222, "timeoutMs": 30000 },
  "stores": [
    {
      "retailer": "leclerc",
      "store": {
        "storeId": "123456",
        "retrievalPointId": "123456",
        "host": "fd7-courses.leclercdrive.fr",
        "name": "My Leclerc Drive"
      }
    },
    { "retailer": "superu", "minIntervalMs": 300 }
  ]
}

The order of the retailers is the order of preference. minIntervalMs sets the spacing between requests (default: 1000 ms for Leclerc, 300 ms for Super U). Your Leclerc store's values can be found with find_stores / set_store: the store picked with set_store is remembered in $FR_GROCERY_STATE_DIR/leclerc-store.json (default ~/.fr-grocery-mcp) and takes precedence over the configuration. FR_GROCERY_CHROME_PORT overrides the port of the file. The Super U store is chosen on coursesu.com.

Usage

The server is distributed as the fr-grocery-mcp npm package and runs locally over stdio. Claude Code (.mcp.json):

{
  "mcpServers": {
    "fr-grocery-mcp": {
      "command": "npx",
      "args": ["-y", "fr-grocery-mcp@latest"],
      "env": { "FR_GROCERY_CONFIG": "/path/to/fr-grocery-mcp.json" }
    }
  }
}

Pin an exact version (for example fr-grocery-mcp@0.2.0) instead of @latest for a reproducible setup. The same package is described in the official MCP Registry by io.github.maxime-desmarchelier/fr-grocery-mcp. Each release is published on npm, GitHub Releases and the MCP Registry; see docs/releasing.md.

From a source checkout, use "command": "node" and "args": ["/path/to/fr-grocery-mcp/src/main.ts"] instead. Manual inspection: npm run inspect (MCP Inspector).

Development

npm ci
npm run check                      # typecheck + lint + tests with coverage thresholds
mise run lint                      # the git hook's ruleset on the whole repository (what CI runs)
npm test                           # unit, adapter contract, integration (no access to the sites)
npm run doctor                     # real sites, read-only: session, search, product page, cart per retailer
npm run test:live                  # real sites: changes then removes an item that is not in the cart
LIVE_STORES=leclerc npm run test:live
npm run fixtures -- leclerc        # captures a retailer's reference pages again
npm run format                     # Biome

Architecture and technical choices: docs/architecture.md. Adding a retailer: docs/adding-a-retailer.md. Releases: docs/releasing.md.

Contributing

Issues and pull requests are welcome: see CONTRIBUTING.md for the setup, the code rules and what npm run check must show before a pull request. main is protected and CI must be green.

Security

Please report vulnerabilities privately through the repository's Security tab, never in a public issue: see SECURITY.md.

License

MIT. The E.Leclerc Drive adapter builds on knowledge from mcp-leclerc-drive (MIT): see NOTICE.

Questions fréquentes

Qu'est-ce que French Grocery ?

Search, compare and manage E.Leclerc Drive and Super U grocery carts without ordering.

Comment installer French Grocery ?

Il s'exécute sur votre machine. Dans Claude Code : claude mcp add french-grocery -e 'FR_GROCERY_CONFIG=<FR_GROCERY_CONFIG>' -e 'FR_GROCERY_CHROME_PORT=<FR_GROCERY_CHROME_PORT>' -e 'FR_GROCERY_STATE_DIR=<FR_GROCERY_STATE_DIR>' -- npx -y fr-grocery-mcp@0.1.1. Pour les autres clients, collez la configuration JSON de cette page dans leurs réglages MCP.

Faut-il une clé API pour French Grocery ?

Son entrée au registre n'indique aucune clé ni secret obligatoire. Certaines fonctions peuvent tout de même demander un compte auprès du service auquel il se connecte.

French Grocery est-il open source ?

Oui. Son code est sur GitHub sous licence MIT.

Qui maintient French Grocery ?

Il est publié par maxime-desmarchelier. AI.tn le référence sans le maintenir ni le recommander.

Issu du registre MCP officiel. Être listé n'est pas une recommandation : vérifiez le code et les permissions d'un serveur avant de lui donner accès à vos données.