
skunkobi/mcp-leclerc-drive
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
E.Leclercドライブ用のMCPサーバー
概要
最初のオープンソース — Claude の検索製品を、カートを管理し、ウェブサイトをクリックするのではなく、食料品の注文をネイティブに準備しましょう。 すべての8つのツールは、ライブサイトに対するエンドツーエンドを検証します。 リクエストは内部で実行されるため、DataDomeのボット保護(ヘッドレスクライアントとクッキー再生をブロックする)を渡します。 開いたウィンドウに一度Leclerc Driveにログインします。セッションはパーシスストです。 リバースエンジニアリング API の docs/api-capture.md を参照してください。 E.Leclerc Driveには公開APIはありません。 今日は、ブラウザの自動化であるだけを自動化する方法 — 遅い (~3–5 s / 項目) と 壊れやすい (盲クリック). このプロジェクトでは、任意のMCPクライアント(Claude Desktop、Claude Code)が直接運転できるように、適切なMCPツールとして、基礎業務を公開しています。 - [x] リバース・エンジン・レクルク ドライブエンドポイント(検索/カート/ストアロケータ — docs/api-capture を参照してください.
概要(AI 翻訳)
E.Leclerc Drive** の最初のオープンソース **MCP サーバー — Claude の検索製品を、カートを管理し、ウェブサイトをクリックするのではなく、食料品の注文をネイティブに準備します。
作業とDataDome-proof.** 全8つのツールは、ライブサイトに対してエンドツーエンドを検証します。 CDP** 上で駆動する **real Chrome 内で実行されるリクエストは、DataDome のボット保護 (ヘッドレスクライアントとクッキー再生をブロックする) を渡します。 開いたウィンドウに一度Leclerc Driveにログインします。セッションはパーシスストです。 リバースエンジニアリング API の
docs/api-capture.mdを参照してください。
なぜ
E.Leclerc Driveには公開APIはありません。 今日は、ブラウザの自動化であるだけを自動化する方法 — 遅い (~3–5 s / 項目) と 壊れやすい (盲クリック). このプロジェクトでは、任意のMCPクライアント(Claude Desktop、Claude Code)が直接運転できるように、適切なMCPツールとして、基礎業務を公開しています。
ツール
| ツール | 概要 |
| お問い合わせ |
| [find_stores(query) | 郵便番号・市町名・ID・サービスタイプ・距離・ホスト付近のドライブを探す |
| [set_store(store_id) | アクティブストアを選択・記憶する(自動的に正しいホストを解決する) お問い合わせ
| [get_store() | 現在セレクトした店舗をご紹介 |
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 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
| Tool | Description |
|---|---|
find_stores(query) |
Find drives near a postal code or city → name, id, service type, distance, host. |
set_store(store_id) |
Select & remember the active store (resolves the right host automatically). |
get_store() |
Show the currently selected store. |
search_product(query) |
Search the catalogue → products with price, price/kg, Nutri-Score, availability, and an id. |
add_to_cart(product_id, quantity?) |
Add a product to the cart. |
remove_from_cart(product_id) |
Remove a line from the cart. |
update_quantity(product_id, quantity) |
Set a line’s quantity (0 removes it). |
get_cart() |
Read the full cart with total. |
Status
- [x] Reverse-engineer Leclerc Drive endpoints (search / cart / store locator — see
docs/api-capture.md) - [x] All 8 tools validated end-to-end against the live store
- [x] Runtime store selection with persistence (
find_stores/set_store) - [x] v0.3: DataDome-proof via real-Chrome CDP driving (beats active bot-challenge that killed cookie-replay) ✅
- [x] 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)
git clone https://github.com/skunkobi/mcp-leclerc-drive.git
cd mcp-leclerc-drive
npm install
npm run build
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.
インストール
npx -y mcp-leclerc-drive設定
{
"mcpServers": {
"leclerc-drive": {
"command": "npx",
"args": ["-y", "mcp-leclerc-drive"]
}
}
}