mercadona-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PORT | No | The port the http (remote) mode listens on (binds to 127.0.0.1 only), e.g. 8787. | |
| MCP_PUBLIC_URL | No | The public https URL of the server when running in http (remote) mode, e.g. https://mcp.example.com. | |
| MERCADONA_MCP_HOME | No | Override the directory where the server stores its files (config, session, catalog index, chrome profile, OAuth files). Defaults to ~/.mercadona-mcp/. | |
| MCP_ALLOWED_REDIRECT_HOSTS | No | Override the set of allowed OAuth redirect hosts for remote mode (defaults accept only redirect URIs on claude.ai, claude.com, chatgpt.com, chat.openai.com and localhost). |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Tools for the Mercadona online supermarket (tienda.mercadona.es, Spain). Product names are in Spanish, so search in Spanish (e.g. 'leche', 'huevos', 'pechuga pollo'). Prices are EUR. Catalog and prices depend on the delivery postal code (set_postal_code). Account tools (cart, orders, lists) need a login: call mercadona_status first; if not logged in, call mercadona_login, which opens a browser window for the user to sign in themselves. In apps that support MCP Apps (Claude, ChatGPT), product, cart and order results are shown to the user as photo cards with prices and totals, so don't repeat every item or add images yourself: summarize, group, and point out what matters (deals, missing items, what's due). These tools never place or pay for orders: when the basket is ready, tell the user to review it and check out at https://tienda.mercadona.es. Before changing the cart in bulk, briefly tell the user what you will add.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| prompts | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| mercadona_statusA | Show login state, the customer's name/email, and the current postal code / warehouse used for prices and availability. |
| mercadona_loginA | Open a Chrome window on tienda.mercadona.es so the USER can sign in themselves (email/password + captcha). Waits up to 5 minutes, then stores the session token locally (~/.mercadona-mcp/session.json). Tell the user a browser window is opening before calling this. |
| mercadona_import_sessionA | Fallback login: store a session copied from the user's own browser. In DevTools console on tienda.mercadona.es run |
| mercadona_logoutA | Forget the locally stored Mercadona session token. |
| set_postal_codeA | Set the Spanish postal code used for catalog, prices and availability. Returns the warehouse that serves it. |
| list_categoriesA | List the full category tree (top-level sections and their sub-categories with ids). |
| browse_categoryA | List all products in a sub-category (use ids from list_categories, e.g. 112 = 'Aceite, vinagre y sal'), grouped by shelf. |
| search_productsA | Search the catalog by keywords (Spanish works best: 'leche semidesnatada', 'tomate frito', 'yogur griego'). First call may take ~30s while the catalog index is built; it is then cached for 12h. |
| refresh_catalogA | Rebuild the local product index now (prices/stock change daily). |
| get_productB | Full details for a product: price, size, ingredients, allergens, origin, storage. Optionally similar products. |
| get_cartA | Show the current online cart with quantities and an estimated total. |
| update_cartA | Add products to the cart or change quantities, in one call. mode 'add' (default) adds to any existing quantity; 'set' sets the exact quantity (0 removes). Quantities are units/pieces (fruit too, e.g. 6 bananas); only products flagged sold_by_weight take kg (e.g. 0.5). Does NOT check out. |
| remove_from_cartB | Remove the given products from the cart entirely. |
| clear_cartA | Remove everything from the cart. Requires confirm=true; ask the user first. |
| list_ordersA | List past and upcoming online orders (newest first), 1 page ≈ 10–20 orders. |
| get_orderA | Details of one online order including every product line (ordered vs. prepared quantity, price paid). |
| purchase_historyA | Aggregate the last N online orders into per-product stats: how many orders included it, total quantity, typical quantity, last bought date, and spend per order. Great for 'what do I usually buy?' and for rebuilding a usual basket. |
| add_order_to_cartA | Add every product from a past order to the cart (with the same quantities). Use list_orders to find the id. |
| list_store_ticketsB | Digital tickets (receipts) from purchases in physical Mercadona stores, if the user enabled digital tickets. |
| my_regularsA | Mercadona's own 'Mis habituales' list: products this customer buys regularly, with the shop's recommended quantity. |
| add_regulars_to_cartA | Add products from 'my regulars' to the cart with Mercadona's recommended quantity (or all of them if product_ids is omitted — ask first, the list can be long). |
| list_shopping_listsC | The customer's saved shopping lists. |
| get_shopping_listC | Products in one shopping list. |
| create_shopping_listC | Create a named shopping list, optionally with products. |
| update_shopping_listC | Add products to a shopping list and/or remove products from it. |
| add_shopping_list_to_cartB | Add all products of a shopping list to the cart (quantity from the list, default 1). |
| delete_shopping_listA | Permanently delete a shopping list. Requires confirm=true; ask the user first. |
| list_addressesA | Saved delivery addresses (ids are needed for delivery_slots). |
| delivery_slotsA | Available delivery time slots and their prices for a saved address (default address if omitted). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| weekly_basket | Rebuild a usual weekly shop from purchase history and 'my regulars', then fill the cart. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| mercadona-cards | Photos, prices and totals for products, the cart and orders. |
TDQS
Scored across 29 tools
Most tools target clearly distinct resources (catalog browsing vs. cart vs. orders vs. shopping lists), and the three 'add X to cart' variants are differentiated by their source (past order, 'my regulars', saved list). Minor overlap exists between update_cart with mode 'set'/0, remove_from_cart, and clear_cart, which could cause misselection for removal tasks.
The dominant convention is snake_case verb_noun (list_categories, get_product, update_cart), which is readable, but four auth tools carry a mercadona_ prefix while the rest do not, and several tools are bare nouns (delivery_slots, purchase_history, my_regulars, list_store_tickets). The mix is workable but not predictable.
29 tools is heavy, but the surface spans genuinely separate sub-domains (auth, catalog, cart, orders, physical tickets, regulars, shopping lists, addresses/delivery), so most tools earn their place. Still, marginal value tools like refresh_catalog and the four separate auth tools push it past a comfortable size.
Coverage is broad across browsing, cart building, history and list management, but the lifecycle dead-ends at checkout: update_cart explicitly 'does NOT check out' and there is no place_order or delivery-slot booking tool, so an agent can assemble a basket but never complete a purchase. Address management is read-only and there is no order tracking beyond past orders.