
Leclerc Drive
io.github.skunkobi由 GitHub 帳號 skunkobi 發布v0.3.0更新於 Oct 25, 2026
MCP server for E.Leclerc Drive — search products, manage cart, and order groceries from Claude
概覽
非官方 MCP 伺服器,讓助理透過真實 Chrome 工作階段搜尋 E.Leclerc Drive 商品、選擇門市並管理購物車。
- 可以做什麼
- 依郵遞區號或城市尋找附近的 Leclerc Drive 門市,並選擇、記住目前門市及其後端主機。搜尋商品目錄,回傳價格、每公斤價格、Nutri-Score、庫存狀況與商品 id。將商品加入購物車、移除項目、設定項目數量。讀取完整購物車與總金額。
- 適用情境
- 適合在 MCP 用戶端中自動化自己在 E.Leclerc Drive 上的個人日常採買,取代在網站上緩慢手動點選。當你固定在一家門市購物,並希望助理在對話中搜尋商品、建立購物車時最有用。
- 執行需求
- 透過 npm 套件 mcp-leclerc-drive 以 stdio 在本機執行。需要 Node.js 22 或更新版本,以及同一台機器上安裝的 Google Chrome;會開啟 Chrome 視窗,需登入一次 Leclerc Drive。選用變數包括 LECLERC_STORE_ID、LECLERC_HOST、LECLERC_CHROME_PATH、LECLERC_CHROME_PROFILE_DIR、LECLERC_CHROME_PORT、LECLERC_HEADLESS 及限流設定;LECLERC_COOKIE 為選用的原始 Cookie 覆寫。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Leclerc Drive,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
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.3 — working & DataDome-proof. All eight tools are validated end-to-end against the live site. Requests run inside a real Chrome driven over CDP, so they pass DataDome's bot protection (which blocks headless clients and cookie-replay). You log into Leclerc Drive once in the window that opens; the session persists. 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.
Tools
Status
- Reverse-engineer Leclerc Drive endpoints (search / cart / store locator — see
docs/api-capture.md) - All 8 tools validated end-to-end against the live store
- Runtime store selection with persistence (
find_stores/set_store) - v0.3: DataDome-proof via real-Chrome CDP driving (beats active bot-challenge that killed cookie-replay) ✅
- Published to npm + MCP registry
- Checkout / delivery-slot booking
Requirements
- Node.js ≥ 22 (uses the built-in
WebSocket) - Google Chrome installed (the server drives it via CDP)
Install (development)
How auth works (real Chrome via CDP)
Leclerc Drive is protected by DataDome, which blocks non-browser traffic (headless clients, cookie-replay) with HTTP 403 once it escalates to active challenge mode. The only thing that reliably passes is a real browser that executes the challenge. So that's what the server uses:
- On first request it launches your installed Google Chrome with a
dedicated, persistent profile (
~/.mcp-leclerc-drive/chrome) and a debug port — no automation flags, sonavigator.webdriverstaysfalse. - A Chrome window opens. Log into Leclerc Drive once in it. The persistent profile keeps you logged in across restarts.
- Every request runs inside that page via CDP, so it carries the browser's cookies, TLS fingerprint, and solved DataDome challenge — and passes.
No cookies are read or stored; there's no Keychain prompt. The server must run on the same machine as Chrome, and a window does open (headless is detectable by DataDome — don't enable it unless you know the risk).
The server still serializes and spaces out requests (single queue, ~1 s + jitter, retry with backoff) to stay polite — good hygiene even though the browser now handles DataDome.
Choosing your store (no env needed)
The easiest way: just ask, in the conversation. No env vars required.
set_store persists your choice to ~/.mcp-leclerc-drive/config.json, so it
sticks across sessions, and it resolves the correct backend host for you (the
fdN prefix genuinely varies per store — fd8, fd9, fd14…).
⚠️ One drive at a time. Leclerc binds your session to a single drive. The store you
set_storeto must be the one your Chrome session is logged into — which is the normal case (your own drive). Switching to an arbitrary other drive your browser isn't on will return a "session expired" error.
You can still hard-set the store via LECLERC_STORE_ID / LECLERC_HOST env vars
if you prefer (e.g. for headless deploys). To find them manually: your Drive URL
looks like https://fd9-courses.leclercdrive.fr/magasin-053701-053701-Your-Town/
— the 6-digit number is the store id, the fdN-courses.leclercdrive.fr part is
the host.
Claude Desktop / Claude Code (mcp config)
Install straight from npm — no clone needed:
Or in a Claude Desktop config:
No env needed — pick your store in-conversation with find_stores / set_store.
On first use a Chrome window opens: log into Leclerc Drive once and you're set.
Development
Architecture
Contributing
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.
- Issues / PRs: open an issue on the repo.
- Email: [email protected]
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
來源:README.md,提交 ac341d7
工具
0版本歷史
1- v0.3.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分