French Grocery

io.github.maxime-desmarchelier由 GitHub 账号 maxime-desmarchelier 发布v0.1.1更新于 Oct 30, 2026

Search, compare and manage E.Leclerc Drive and Super U grocery carts without ordering.

已验证STDIO仅桌面浏览器自动化商业与电商

概览

AI 生成的概览

该 MCP 服务器让助手在法国 E.Leclerc Drive 和 Super U 上搜索商品、查看配料并管理购物车,但不会下单。

可以做什么
  • 搜索商品并读取价格、单价、促销与最优报价
  • 读取商品页的配料、过敏原与产地信息
  • 读取并比较购物车:明细、总额、最低消费与可预约时段
  • 修改购物车:加购、设置数量、移除商品,并回读确认
  • 列出已接入的零售商与会话状态,查找或选择 Leclerc 门店
适用场景
适合让助手按菜谱或家庭需求生成购物清单、查询法国超市商品与价格、在 Leclerc 和 Super U 分别装好购物车,并在你自己预约时段和付款前比较哪家更便宜。
运行要求
需在本机以 npx 运行 Node.js 26 或更高版本的进程,仅限桌面端。需要一个以 9222 端口开启远程调试并已登录各零售商网站的 Chrome。可通过 FR_GROCERY_CONFIG 指定可选 JSON 配置文件(不提供时仅启用 Super U);FR_GROCERY_CHROME_PORT 与 FR_GROCERY_STATE_DIR 为可选覆盖项。
安装前请注意
它操作的是你自己已登录的浏览器会话,助手会以你的零售商账户身份操作。购物车修改会真实写入(加购、改数量、删除),但不会下单、预约时段或付款。需遵守零售商网站的使用条款,项目与零售商无关联;遇到反爬拦截会直接停止。商品数据为法语并会发送给模型。

安装

在 SourceWeft 中

  1. 打开 控制台中的 French Grocery,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

fr-grocery-mcp

An MCP server that gives an agent domain-level access to the online grocery services ("drive") of French retailers: E.Leclerc Drive and Super U (coursesu.com) today, others through a new adapter. Search products, read their composition, manage the cart, read slots and minimum order amounts, compare carts. Nothing else.

The reasoning (recipes, ingredients, quantities for N people, product choice, price/promotion trade-offs) belongs to the agent. For example:

Order what I need to cook spaghetti bolognese and a four-cheese pizza for 4, at the cheapest of Leclerc and Super U.

The agent builds the list, searches each ingredient at each retailer, fills the carts, then compares them. The order is never placed: slot booking and payment are left to the user, on the site.

[!WARNING] This project is not affiliated with, endorsed by or supported by E.Leclerc, Système U or any retailer. It drives your own logged-in browser session, at a human pace, for personal use. Retailer sites change without notice and their terms of use apply: use it at your own risk.

Tools

Every retailer tool takes store (leclerc, superu: an enum generated from the configuration).

ToolEffectAnnotations
list_stores(check=false)plugged-in retailers and capabilities; with check, status of each session and active storeread-only
search_products(store, query, limit=20)products: id, label, price_eur, unit_price (€/kg, €/l, €/piece), available, typed promotions, best_offer (net cost, bundles and loyalty included)read-only
get_product(store, product_id)product page: ingredients (allergens in capitals; null for a raw product), declared allergens, originread-only
get_cart(store)lines (product_id, name, quantity, line_total_eur, unit_price) and total_eurread-only
get_order_conditions(store?)store, booked slot, slot attached to the cart, dated next slots (ISO start), minimums; store omitted = every retailerread-only
add_to_cart(store, product_id, quantity=1)adds to the quantity already present
set_quantity(store, product_id, quantity)sets the quantity (0 = removal)idempotent
remove_from_cart(store, product_id)removes the productdestructive, idempotent
find_stores(store, query)stores around a postcode or town (if the retailer supports it)read-only
set_store(store, store_id)selects and remembers the active storeidempotent
compare_carts(mode="drive")each retailer's cart: total, lines, minimum and missing amount, next slots; sorted from cheapest to most expensiveread-only

Every change reads the cart back and returns confirmed: true if the site holds the targeted quantity. Results are typed (outputSchema + structuredContent) and the server sends instructions describing the flow to the agent. A cap of 50 units per product guards against unit mistakes.

Errors (isError, error field): ValidationError (fix the call), NotSupportedError (the retailer does not support it), SessionExpiredError (log in again in Chrome), SiteBlockedError (anti-bot: stop), TransientError (retried automatically, then reported).

Product labels, promotion texts and search terms stay in French, as on the sites.

Capabilities per retailer

CapabilityE.Leclerc DriveSuper U
Search, cart, promotionsyes (immediate, multibuy, Ticket)yes (immediate, multibuy, Carte U)
Product pageingredients, allergens, originingredients, origin
Store selection from the agentfind_stores / set_storeno: on the site
Minimum ordernot exposed when logged outyes
Slotsnext slot, cart datenext slots, booked slot

Requirements

  • Node ≥ 26 (runs TypeScript natively: no build step). With mise: mise install --locked installs the version recorded in mise.lock.
  • A Chrome started with --remote-debugging-port=9222 and logged in to the sites (mise run chrome starts a dedicated profile in ~/.fr-grocery-mcp/chrome). One tab per site is found, or opened, by its domain.

Requests go through the browser session, one at a time and spaced out: the server replays what the site does on a click (see docs/retailers/). No protection is bypassed: an anti-bot block stops the server, it is never retried.

Configuration

FR_GROCERY_CONFIG points to a JSON file. Without a file, only Super U is plugged in.

json
{  "chrome": { "port": 9222, "timeoutMs": 30000 },  "stores": [    {      "retailer": "leclerc",      "store": {        "storeId": "123456",        "retrievalPointId": "123456",        "host": "fd7-courses.leclercdrive.fr",        "name": "My Leclerc Drive"      }    },    { "retailer": "superu", "minIntervalMs": 300 }  ]}

The order of the retailers is the order of preference. minIntervalMs sets the spacing between requests (default: 1000 ms for Leclerc, 300 ms for Super U). Your Leclerc store's values can be found with find_stores / set_store: the store picked with set_store is remembered in $FR_GROCERY_STATE_DIR/leclerc-store.json (default ~/.fr-grocery-mcp) and takes precedence over the configuration. FR_GROCERY_CHROME_PORT overrides the port of the file. The Super U store is chosen on coursesu.com.

Usage

The server is distributed as the fr-grocery-mcp npm package and runs locally over stdio. Claude Code (.mcp.json):

json
{  "mcpServers": {    "fr-grocery-mcp": {      "command": "npx",      "args": ["-y", "fr-grocery-mcp@latest"],      "env": { "FR_GROCERY_CONFIG": "/path/to/fr-grocery-mcp.json" }    }  }}

Pin an exact version (for example [email protected]) instead of @latest for a reproducible setup. The same package is described in the official MCP Registry by io.github.maxime-desmarchelier/fr-grocery-mcp. Each release is published on npm, GitHub Releases and the MCP Registry; see docs/releasing.md.

From a source checkout, use "command": "node" and "args": ["/path/to/fr-grocery-mcp/src/main.ts"] instead. Manual inspection: npm run inspect (MCP Inspector).

Development

sh
npm cinpm run check                      # typecheck + lint + tests with coverage thresholdsmise run lint                      # the git hook's ruleset on the whole repository (what CI runs)npm test                           # unit, adapter contract, integration (no access to the sites)npm run doctor                     # real sites, read-only: session, search, product page, cart per retailernpm run test:live                  # real sites: changes then removes an item that is not in the cartLIVE_STORES=leclerc npm run test:livenpm run fixtures -- leclerc        # captures a retailer's reference pages againnpm run format                     # Biome

Architecture and technical choices: docs/architecture.md. Adding a retailer: docs/adding-a-retailer.md. Releases: docs/releasing.md.

Contributing

Issues and pull requests are welcome: see CONTRIBUTING.md for the setup, the code rules and what npm run check must show before a pull request. main is protected and CI must be green.

Security

Please report vulnerabilities privately through the repository's Security tab, never in a public issue: see SECURITY.md.

License

MIT. The E.Leclerc Drive adapter builds on knowledge from mcp-leclerc-drive (MIT): see NOTICE.

来源:README.md,提交 fa25af4

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v0.1.1最新Oct 29, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分