# leclerc-drive [Health: Active]

**Category:** 🛒 E-Commerce  
**Repository:** https://github.com/skunkobi/mcp-leclerc-drive  
**GitHub Stars:** 26  
**npm Downloads (last month):** 346  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/leclerc-drive

## Description
MCP server for E.Leclerc Drive — search products, manage cart, and order groceries from Claude

## Tools
Capabilities this server exposes over MCP:

- **search_product** — Recherche des produits dans le catalogue Leclerc Drive du magasin configuré. Retourne label, prix, prix au kilo/litre, Nutri-Score, disponibilité et l'id à utiliser pour add_to_cart.
- **add_to_cart** — Ajoute un produit au panier. Utilise l'id retourné par search_product.
- **remove_from_cart** — Retire complètement un produit du panier.
- **update_quantity** — Modifie la quantité d'un produit déjà présent dans le panier.
- **get_cart** — Affiche le contenu complet du panier avec le total.
- **find_stores** — Recherche les drives E.Leclerc proches d'un code postal ou d'une ville, triés par distance. Retourne pour chacun : nom, identifiant (à passer à set_store), type de service (drive/relais/livraison), distance et magasin.
- **set_store** — Sélectionne le magasin actif (et le mémorise pour les prochaines sessions). Utilise l'id renvoyé par find_stores.
- **get_store** — Affiche le magasin actuellement sélectionné (id, host).

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "leclerc-drive": {
    "command": "npx",
    "args": ["-y","mcp-leclerc-drive"]
  }
}
```

## Documentation

## What leclerc-drive MCP server does

The leclerc-drive MCP server exposes eight MCP tools for working with E.Leclerc Drive. It can locate nearby drives from a postal code or city, select and remember an active store, inspect that selection, search the store catalogue, and manage cart contents.

Product search returns product identifiers along with information such as price, price per kilogram, Nutri-Score, and availability. Cart operations cover adding a product, removing a product, setting a quantity, and reading the complete cart with its total. The available operations stop before checkout: delivery-slot selection and order submission are not included.

## How it works

Requests run inside an installed Google Chrome window rather than through a headless HTTP client. On first use, the server starts Chrome with a dedicated persistent profile and connects to it through the Chrome DevTools Protocol. You log into Leclerc Drive in that window once; the profile retains the session for later restarts.

The browser approach is used because E.Leclerc Drive’s DataDome protection can reject headless clients and replayed cookies. The server keeps requests in a single queue, spaces them with a minimum interval and jitter, and retries some temporary 403 or 429 responses with increasing delays.

Store selection is persisted in `~/.mcp-leclerc-drive/config.json`. The selected store determines the backend host used for later searches and cart requests. A session is tied to one drive, so the active store should match the drive associated with the logged-in Chrome session.

## Setup and configuration

The leclerc-drive MCP server requires Node.js 22 or newer and Google Chrome on the same machine. It can be installed for Claude Code with `claude mcp add leclerc-drive -- npx -y mcp-leclerc-drive`, or configured in Claude Desktop with an `npx` command and the `mcp-leclerc-drive` package. No environment variables are needed for the normal setup; the store can be chosen through `find_stores` and `set_store`.

Optional settings include `LECLERC_STORE_ID` and `LECLERC_HOST` for a fixed store, `LECLERC_CHROME_PATH` for a nonstandard Chrome location, and `LECLERC_CHROME_PROFILE_DIR` for the persistent profile path. `LECLERC_CHROME_PORT` changes the CDP port. Request pacing and retry behavior can be adjusted with `LECLERC_MIN_INTERVAL_MS`, `LECLERC_JITTER_MS`, `LECLERC_MAX_RETRIES`, and `LECLERC_BACKOFF_BASE_MS`.

## Tools and capabilities

- `find_stores(query)` locates drives near a city or postal code.
- `set_store(store_id)` selects and remembers a drive.
- `get_store()` reports the current drive.
- `search_product(query)` searches the selected catalogue.
- `add_to_cart(product_id, quantity?)` adds a product.
- `remove_from_cart(product_id)` removes a cart line.
- `update_quantity(product_id, quantity)` changes a line quantity; zero removes it.
- `get_cart()` returns cart contents and the total.

## Limitations and notes

The leclerc-drive MCP server is unofficial and intended for personal automation with the user’s own account. A visible Chrome window normally opens, and headless mode is detectable by DataDome and is not recommended. The server must run on the same machine as Chrome, and switching to a store unrelated to the current browser session can produce a session-expired error.

The implementation has been validated against the live store, but the service has no public API and its underlying endpoints may change. Checkout, delivery-slot booking, saved lists, and other capabilities are not currently provided. The project is licensed under MIT and is not affiliated with or endorsed by E.Leclerc.

_Full upstream README: https://allmcps.com/mcp/leclerc-drive/readme_

