Context7
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
MCP server for E.Leclerc Drive — search products, manage cart, and order groceries from Claude
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
LECLERC_STORE_ID, LECLERC_HOST, LECLERC_COOKIE, LECLERC_CHROME_PROFILEค่าที่ติดป้ายความลับคือกุญแจของบัญชีคุณ อย่าส่งให้ใคร และอย่าวางในแชต
ต้องเตรียมก่อน
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"leclerc-drive": {
"command": "npx",
"args": [
"-y",
"mcp-leclerc-drive"
],
"env": {
"LECLERC_STORE_ID": "ใส่ค่าของคุณ",
"LECLERC_HOST": "ใส่ค่าของคุณ",
"LECLERC_COOKIE": "ใส่ค่าของคุณ",
"LECLERC_CHROME_PROFILE": "ใส่ค่าของคุณ"
}
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add leclerc-drive --env LECLERC_STORE_ID='ใส่ค่าของคุณ' --env LECLERC_HOST='ใส่ค่าของคุณ' --env LECLERC_COOKIE='ใส่ค่าของคุณ' --env LECLERC_CHROME_PROFILE='ใส่ค่าของคุณ' -- npx -y mcp-leclerc-driveเติมค่าที่เว้นว่างไว้ก่อนรัน
วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"leclerc-drive": {
"command": "npx",
"args": [
"-y",
"mcp-leclerc-drive"
],
"env": {
"LECLERC_STORE_ID": "ใส่ค่าของคุณ",
"LECLERC_HOST": "ใส่ค่าของคุณ",
"LECLERC_COOKIE": "ใส่ค่าของคุณ",
"LECLERC_CHROME_PROFILE": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"leclerc-drive": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-leclerc-drive"
],
"env": {
"LECLERC_STORE_ID": "ใส่ค่าของคุณ",
"LECLERC_HOST": "ใส่ค่าของคุณ",
"LECLERC_COOKIE": "ใส่ค่าของคุณ",
"LECLERC_CHROME_PROFILE": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
LECLERC_STORE_ID envLECLERC_HOST envLECLERC_CHROME_PROFILE envค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 7 พ.ย. 2569
ชื่อใน registry ยืนยันด้วยบัญชี GitHub skunkobi ซึ่งเป็นเจ้าของ repo
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
ต้องใส่ค่าเหล่านี้: LECLERC_COOKIE
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.3.0) เข้า registry 4 เดือนที่ผ่านมา
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Node.js ในเครื่องด้วย
ในหมวดเดียวกันมี Context7, Codebase Memory, Exa
server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว
อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
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.
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.
| 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. |
docs/api-capture.md)find_stores / set_store)WebSocket)git clone https://github.com/skunkobi/mcp-leclerc-drive.git
cd mcp-leclerc-drive npm install npm run build
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:
~/.mcp-leclerc-drive/chrome) and a debug port — no automation flags, so navigator.webdriver stays false.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).
| Env var | Default | Description |
|---|---|---|
LECLERC_STORE_ID | 053701 | Default store id (overridden at runtime by set_store). |
LECLERC_HOST | fd9-courses.leclercdrive.fr | Default backend host (the fdN prefix varies by store). |
LECLERC_CHROME_PATH | auto | Path to the Chrome binary, if not in the default location. |
LECLERC_CHROME_PROFILE_DIR | ~/.mcp-leclerc-drive/chrome | Persistent Chrome profile dir. |
LECLERC_CHROME_PORT | 9222 | CDP remote-debugging port. |
LECLERC_HEADLESS | false | Run Chrome headless (⚠️ DataDome-detectable — not recommended). |
LECLERC_MIN_INTERVAL_MS | 1000 | Minimum delay between two requests (hygiene). |
LECLERC_JITTER_MS | 400 | Extra random jitter added between requests. |
LECLERC_MAX_RETRIES | 3 | Retries on a transient 403/429 before giving up. |
LECLERC_BACKOFF_BASE_MS | 1500 | Base retry backoff (doubles each attempt). |
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.
The easiest way: just ask, in the conversation. No env vars required.
> "trouve mon drive vers 44000" → find_stores lists nearby drives
"prends Rezé Atout Sud" → set_store remembers it (correct host resolved)
"cherche du lait" → runs on that store
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.
mcp config)Install straight from npm — no clone needed:
# Claude Code
claude mcp add leclerc-drive -- npx -y mcp-leclerc-drive
Or in a Claude Desktop config:
{
"mcpServers": { "leclerc-drive": { "command": "npx", "args": ["-y", "mcp-leclerc-drive"] } } }
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.
npm run dev # tsc --watch
npm run typecheck # type-check without emitting npm run inspect # run under the MCP Inspector
src/
index.ts # MCP server: registers the 8 tools over stdio config.ts # env-based config (store, host, Chrome/CDP, throttle) types.ts # Product / CartItem / Cart store.ts # active store selection + persistence (~/.mcp-leclerc-drive) browser.ts # ChromeSession: drives real Chrome via CDP → beats DataDome leclerc/ client.ts # Leclerc Drive backend client (search + cart) locator.ts # store finder: postal code / city → nearby drives throttle.ts # request serialization + spacing + retry (hygiene) docs/ api-capture.md # the reverse-engineered Leclerc Drive API
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](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, bug reports, and ideas are very welcome.
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.
MIT