mcp-leclerc-drive
Search products, manage cart (add, remove, update quantities), and retrieve cart details for E.Leclerc Drive.
Click on "Install 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., "@mcp-leclerc-driveSearch for organic milk and add 2 to cart."
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.
mcp-leclerc-drive
The first open-source MCP server for E.Leclerc Drive β let Claude search products, manage a cart, and prepare grocery orders natively, instead of clicking through the website.
π’ v0.1 β working. All five tools are implemented and validated end-to-end against the live site (store 053701): search, add, read, update, remove. Auth reads your existing Chrome session automatically (no copy-paste). See
docs/api-capture.mdfor the reverse-engineered API.
Why
E.Leclerc Drive has no public API. Today the only way to automate it is browser automation β slow (~3β5 s per item) and fragile (blind clicks). This project exposes the underlying operations as proper MCP tools so any MCP client (Claude Desktop, Claude Code) can drive it directly.
Related MCP server: Discovery Engine MCP Server
Tools
Tool | Description |
| Search the catalogue β products with price, price/kg, Nutri-Score, availability, and an |
| Add a product to the cart. |
| Remove a line from the cart. |
| Set a line's quantity (0 removes it). |
| Read the full cart with total. |
Status
MCP server scaffold (stdio,
@modelcontextprotocol/sdk)Tool contracts (
search_product,add_to_cart,remove_from_cart,update_quantity,get_cart)Cookie-based auth model
Reverse-engineer Leclerc Drive endpoints (validated live β see
docs/api-capture.md)Wire endpoints into
src/leclerc/client.tsAuto-read auth cookie from the local Chrome session (
src/auth/cookies.ts)End-to-end validation of all five tools against the live store β
Test under Claude Desktop / Claude Code (MCP client integration)
Handle DataDome cookie refresh / session expiry gracefully
Publish to npm + submit to MCP registry
Install (development)
git clone https://github.com/skunkobi/mcp-leclerc-drive.git
cd mcp-leclerc-drive
npm install
npm run buildConfiguration & auth
Default (recommended): borrow your Chrome session. Log into Leclerc Drive in
Chrome once. The server reads the session cookie (incl. the datadome cookie)
directly from your local Chrome profile β no copy-paste, and it refreshes itself
as your browser session does. On macOS the first read triggers a one-time
Keychain prompt ("Chrome Safe Storage"); approve it. The server must run on the
same machine as Chrome.
Headless deploys (VPS / CI): set LECLERC_COOKIE to a captured Cookie
header and it takes precedence over Chrome (note: a captured DataDome cookie
expires, so this needs periodic refreshing).
Env var | Default | Description |
|
| Store id (La Ville-aux-Dames). |
|
| Backend host (the |
|
| Chrome profile directory to read cookies from. |
| β | Optional raw |
Finding your store id and host: open your Drive in a browser β the URL looks
like https://fd9-courses.leclercdrive.fr/magasin-053701-053701-Your-Town/. The
6-digit number is your LECLERC_STORE_ID; the fdN-courses.leclercdrive.fr part
is your LECLERC_HOST (the fdN prefix varies by region). The defaults point to
store 053701 (La Ville-aux-Dames).
Claude Desktop / Claude Code (mcp config)
{
"mcpServers": {
"leclerc-drive": {
"command": "node",
"args": ["/absolute/path/to/mcp-leclerc-drive/dist/index.js"],
"env": {
"LECLERC_STORE_ID": "053701"
}
}
}
}(No cookie needed in the config β it comes from your Chrome session. Just be logged into Leclerc Drive in Chrome.)
Development
npm run dev # tsc --watch
npm run typecheck # type-check without emitting
npm run inspect # run under the MCP InspectorArchitecture
src/
index.ts # MCP server: registers the 5 tools over stdio
config.ts # env-based config (store, host, cookie source)
types.ts # Product / CartItem / Cart
auth/
cookies.ts # cookie provider: auto-read from Chrome, env override
leclerc/
client.ts # Leclerc Drive backend client (search + cart, validated)
docs/
api-capture.md # the reverse-engineered Leclerc Drive APIContributing
This is a community tool β contributions are very welcome, whether it's a bug fix, support for your store, or a whole new capability (checkout, delivery slots, saved listsβ¦).
See CONTRIBUTING.md for dev setup, how to smoke-test
against your own account (npm run smoke), and β most useful for this project β
a short guide on how to reverse-engineer a new Leclerc Drive endpoint and
wire it in. Good first issues are listed in the status checklist above.
Feedback & contact
Feedback, bug reports, and ideas are very welcome β this is an early v0.1.
Issues / PRs: open an issue on the repo.
Email: alexandreyagoubi@gmail.com
Disclaimer
Unofficial. Not affiliated with or endorsed by E.Leclerc. Use with your own account, at your own risk, in line with the site's terms of service. Intended for personal automation of your own grocery shopping.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/skunkobi/mcp-leclerc-drive'
If you have feedback or need assistance with the MCP directory API, please join our Discord server