yandex-lavka-mcp
v0.1.6Unofficial MCP server for ordering Yandex Lavka groceries: search, cart, checkout.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
lavka_status
Show whether the Lavka session and delivery location are configured. Read-only. Call this first to check setup before other tools.
set_location
Set the delivery location (required before catalog/cart calls). Provide either lat+lon coordinates or a saved address_id. Persists to config.
| Parameter | Type | Description |
|---|---|---|
address_id | ||
label | ||
lat | ||
lon |
list_addresses
List your saved Lavka delivery addresses (by name). Read-only. Use a returned `label` with use_address to switch delivery to that place.
use_address
Switch delivery to one of your saved addresses, matched by name. Catalog, cart and prices are location-scoped, so this re-points everything. A saved address carries city/street/house; pass flat/entrance/comment if the order needs them.
| Parameter | Type | Description |
|---|---|---|
name * | string | |
comment | ||
entrance | ||
flat |
set_delivery_address
Set delivery to ANY address by free text — works for a new city. Resolves the address to coordinates + city/street/house via Lavka's own geo search. Example: set_delivery_address("Казань, улица Баумана, 1", flat="12").
| Parameter | Type | Description |
|---|---|---|
query * | string | |
comment | ||
entrance | ||
flat |
search_products
Search the Lavka catalog at the current delivery location. Read-only. Each result has an `id` (use it with add_to_cart) and a `slug`; get_product takes either.
| Parameter | Type | Description |
|---|---|---|
query * | string | |
limit | integer |
get_product
Get one product: price, size, stock, description, nutrition. Read-only. `product` is an `id` or `slug` from a search result, or a Lavka link (a lavka.yandex.ru/good/... page or a shared ...?item=<id> link). `nutrition` is the КБЖУ block exactly as the product card shows it, numbers as Lavka gives them (nothing recomputed), or null when the card has none (non-food items): - `per_100g`: {kcal, protein, fat, carbs} per 100 g, or null. - `per_portion`: the same per the card's other tab, with its `label` ("Всё блюдо", "На упаковку", "На 50 г", ...), or null if the card…
| Parameter | Type | Description |
|---|---|---|
product * | string |
list_categories
Browse the Lavka catalog menu: category groups with their categories. Returns every `group` (id, title) and its `categories` (id, title) — use a category id with get_category_products. `layout_slug` picks the storefront: "grocery" (default) is the main food catalog; hubs like "pharmacy" (Аптека) and "pet_store" (Зоотовары) have their own. Read-only.
| Parameter | Type | Description |
|---|---|---|
layout_slug | string |
get_category_group
List the categories inside one catalog group, by group id. Group ids come from list_categories (each group carries an id). Read-only.
| Parameter | Type | Description |
|---|---|---|
group_id * | string | |
layout_slug | string |
get_category_products
List products in a catalog category. Read-only. Get `category_id` from list_categories or get_category_group. Returns the category's `subcategories` (id, title, product_count) plus up to `limit` products sorted as Lavka shows them — raise the limit to page further using `total_products`. Each result's `id` works with add_to_cart and its `slug` with get_product. Pass `subcategory` (an id or title from the result) to see only that shelf. `group_id`/`layout_slug` are only needed for non-grocery storefronts; without group_id the parent group is resolved via one extra lookup.
| Parameter | Type | Description |
|---|---|---|
category_id * | string | |
group_id | ||
layout_slug | string | |
limit | integer | |
subcategory |
view_cart
Show the current cart contents and running total. Read-only. The cart also reports order-readiness. Watch these: - `warning`: a plain-language problem to fix (or null). If set, act on it. - each item's `unavailable_on_depot`: true = it's in the cart but CANNOT be ordered from the current store (only in «Большая Лавка», or sold out here). - `available_for_checkout`: false = the order can't be placed as-is. Remove/replace flagged items with update_cart_item(product_id, 0) before checkout.
add_to_cart
Add a product to the cart (increments if already present). No charge. `product_id` is the `id` from a search result. Pass `price` from the same search result when available (Lavka validates it on cart writes). IMPORTANT: search can return items that are only stocked in «Большая Лавка» (a different store) — they add fine but can't be ordered from the current one. After adding, check the returned cart's `warning` and each item's `unavailable_on_depot`; drop any flagged item with update_cart_item(id, 0).
| Parameter | Type | Description |
|---|---|---|
product_id * | string | |
price | ||
quantity | integer |
update_cart_item
Set the exact quantity of a cart item. quantity=0 removes it. No charge.
| Parameter | Type | Description |
|---|---|---|
product_id * | string | |
quantity * | integer |
clear_cart
Remove everything from the cart. No charge.
checkout_preview
Preview the order: items, delivery fee, ETA, address, payment, TOTAL. Charges NOTHING. Show the returned total to the user and ask them to confirm it out loud before calling confirm_order. Always run this before confirming. If the summary has a `warning`, or `available_for_checkout` is false, or any item has `unavailable_on_depot: true`, the order will be REFUSED — fix the cart (remove/replace those items) and preview again before confirming.
confirm_order
Place the order and CHARGE the card. Irreversible — real money. Call ONLY after checkout_preview was run and the user explicitly said yes to the previewed total. Pass that exact total as confirmed_total. The order is refused unless: a preview was run recently, confirmed_total matches it, and — critically — the live cart still matches the previewed cart at submit time (same version and total). If anything drifted, nothing is charged and you must preview + confirm again. Returns the order id and payment_status. "wait_user_action" means the bank requires 3-D Secure — give the user redir…
| Parameter | Type | Description |
|---|---|---|
confirmed_total * | number |
cancel_order
Cancel an order by id (e.g. one returned by confirm_order/active_orders).
| Parameter | Type | Description |
|---|---|---|
order_id * | string |
list_payment_methods
List the user's saved cards and which is the default. Read-only. Use a returned `id` with set_payment_method to choose which card an order charges. By default the order uses the account default card.
set_payment_method
Choose which saved card orders will charge (persists). Pass an `id` from list_payment_methods. Pass an empty string to revert to the account default.
| Parameter | Type | Description |
|---|---|---|
card_id * | string |
active_orders
Currently tracked orders with status and ETA. Read-only. Covers in-progress orders (Lavka's order-tracking feed); past orders are in order_history.
order_history
Get list of past orders. Read-only. Use last_order_id from the last result for pagination (pass it as last_order_id to fetch the next page). Returns order id, status, total, items count, date.
| Parameter | Type | Description |
|---|---|---|
last_order_id | ||
limit | integer |
get_order
Get full details of a specific order: items, totals, address, status, payment. Pass an order_id from order_history or active_orders.
| Parameter | Type | Description |
|---|---|---|
order_id * | string |