Unofficial MCP server to order groceries from Yandex Lavka using your own session cookies with two-step order confirmation.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
The install command below didn't complete successfully in our automated test.
uvx yandex-lavka-mcpDownloading cpython-3.12.14-linux-x86_64-gnu (download) (32.6MiB) Downloaded cpython-3.12.14-linux-x86_64-gnu (download) Downloading pydantic-core (2.0MiB) Downloading cryptography (4.5MiB) Downloaded pydantic-core Downloaded cryptography Installed 32 packages in 17ms Traceback (most recent call last): File "/home/user/.cache/uv/archive-v0/H9ZWhd_4zj0kh3jP/bin/yandex-lavka-mcp", line 6, in <module> from yandex_lavka_mcp.__main__ import main File "/home/user/.cache/uv/archive-v0/H9ZWhd
This is an experimental automated check and can have false negatives β missing environment variables, a slow cold install, etc. It doesnβt necessarily mean somethingβs wrong. Last checked 3d ago.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Yandex Lavka MCP.
An MCP server that lets an AI assistant order groceries from Yandex Lavka β search products, build a cart, and place a real order β with an explicit human confirmation before any money is charged.
[!WARNING] Unofficial. Yandex Lavka has no public API. This project talks to the same private web API that
lavka.yandex.ruuses, authenticated with your own Yandex session cookies. It automates your own account, for your own shopping.
- Not affiliated with or endorsed by Yandex. Using it may violate Yandex's Terms of Service, and the private API can change or be blocked at any time.
confirm_orderspends real money on your card. Use at your own risk.- Provided as is, without warranty (see LICENSE).
| Tool | Charges? | What it does |
|---|---|---|
lavka_status | β | Is the session + location set up? |
list_addresses | β | Your saved Lavka addresses, by name. |
use_address | β | Switch delivery to a saved address by name. |
set_delivery_address | β | Set delivery to any address by text (any city). |
set_location | β | Set delivery point by raw lat/lon. |
search_products | β | Search the catalog at the current location. |
get_product | β | Product detail. |
view_cart | β | Show cart + total. |
add_to_cart | β | Add an item. |
update_cart_item | β | Set exact quantity (0 removes). |
clear_cart | β | Empty the cart. |
checkout_preview | no | Full summary: items, subtotal, discount, delivery, ETA, payment, total. |
confirm_order | YES | Places the order and charges the on-file card. |
cancel_order | β | Cancel an order by id. |
active_orders | β | Currently tracked orders with status/ETA. |
Money safety. Placing an order is a deliberate two-step flow: checkout_preview
returns the full summary and charges nothing; confirm_order(confirmed_total)
refuses unless a preview was just run and you pass back the exact total it showed.
Change the cart and the preview is invalidated β you must preview again.
3-D Secure. confirm_order submits the order and charges the on-file card,
then polls payment status. If your bank requires 3-D Secure, payment_status
comes back wait_user_action and a redirect_url is returned β open it to
finish paying (a headless charge cannot complete 3DS). cancel_order(order_id)
cancels.
Multiple locations / cities. Catalog, prices and cart are location-scoped.
use_address("ΠΠ°ΡΠ°") switches to a saved address; set_delivery_address("ΠΠ°Π·Π°Π½Ρ, ΡΠ»ΠΈΡΠ° ΠΠ°ΡΠΌΠ°Π½Π°, 1", flat="12") works for any address in any city (it geocodes via
Lavka's own address search).
httpx.client.py β the async API client (session auth, CSRF, request building, trims huge payloads).endpoints.py β every API path in one place (overridable from config, no code change).server.py β the MCP tools the assistant sees.The API sits under https://lavka.yandex.ru/api/v1/providers/* (plus
/api/v1/orders/submit for placing orders). Requests need the CSRF token from
the homepage HTML plus X-Lavka-Web-* headers β the client handles this.
Log into Lavka in your browser first, then get the session cookies into
~/.config/yandex-lavka-mcp/config.json.
macOS β pull cookies straight from Chrome (one Keychain prompt β Allow):
Any OS β paste the Cookie header from DevTools (Network β any
lavka.yandex.ru request β Request Headers β Cookie):
Session cookies expire β re-run when calls start returning "session expired".
Copy config.example.json to ~/.config/yandex-lavka-mcp/config.json and edit,
or set it from the assistant with use_address / set_delivery_address. The
catalog only works once a location is set. Smoke-test:
Claude Code:
Claude Desktop (mcpServers):
By default the server speaks stdio (local clients). Set
YANDEX_LAVKA_MCP_TRANSPORT=streamable-http to expose it over HTTP so a hosted
instance can back a claude.ai custom connector
(phone / web).
A prebuilt Dockerfile is included. Secrets are injected at
runtime β never baked into the image:
(The image defaults to stdio; the TRANSPORT env above switches it to HTTP.)
| Var | Purpose |
|---|---|
YANDEX_LAVKA_MCP_TRANSPORT | stdio (default) or streamable-http. |
YANDEX_LAVKA_MCP_HOST / _PORT | Bind address for HTTP (default 0.0.0.0:8000 in Docker). |
YANDEX_LAVKA_MCP_CONFIG_JSON | The whole config.json as one secret (instead of a file). |
A public endpoint spends real money, so protect it. claude.ai's custom
connector UI only supports OAuth (no static bearer / custom header β that
works only in Claude Code/Desktop). This server is a provider-agnostic OAuth 2.1
resource server: point it at any OpenID-Connect provider (Zitadel, Keycloak,
Auth0, Google, β¦) and it validates JWT access tokens against that provider's
JWKS and advertises it via OAuth protected-resource metadata.
Enable it by installing the server extra (pip install '.[server]', already in
the Docker image) and setting:
| Var | Purpose |
|---|---|
YANDEX_LAVKA_MCP_OAUTH_ISSUER | Your provider's issuer URL (enables OAuth). |
YANDEX_LAVKA_MCP_SERVER_URL | Public URL of this MCP server (the resource). |
YANDEX_LAVKA_MCP_OAUTH_AUDIENCE | Expected token audience (optional but recommended). |
YANDEX_LAVKA_MCP_OAUTH_SCOPES | Space-separated required scopes (optional). |
YANDEX_LAVKA_MCP_OAUTH_SUBJECTS | Allow-list of token subs that may call the server (optional; strongest lock β every request spends your Lavka session). |
YANDEX_LAVKA_MCP_OAUTH_JWKS_URL | Override JWKS URL (optional; else discovered). |
A network-exposed HTTP transport refuses to start unless OAuth is configured
(it spends real money). Set YANDEX_LAVKA_MCP_ALLOW_INSECURE=1 only if you front
it with your own auth. Leaving OAuth unset is allowed for loopback/local use.
Session cookies expire; when calls start failing, re-capture them and update the
YANDEX_LAVKA_MCP_CONFIG_JSONsecret. There is no headless Yandex login.
Lavka keeps a single server-side cart per account, guarded by an optimistic
cartVersion. This server serializes its own cart writes and retries on version
conflicts, so parallel tool calls in one session are safe. But don't drive the
same Yandex account from two places at once (e.g. this server and a second
MCP session, and the Lavka app): they all write the one shared cart, and you'll
see items from the other writer appear in yours. Use a single client at a time.
~/.config/yandex-lavka-mcp/config.json
(chmod 600), git-ignored. Never commit them.MIT. Unofficial project, not affiliated with Yandex.
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/dudude-bit-yandex-lavka-mcp)<a href="https://allmcps.com/mcp/dudude-bit-yandex-lavka-mcp"><img src="https://allmcps.com/api/badge/dudude-bit-yandex-lavka-mcp?style=directory" alt="Yandex Lavka MCP on AllMCPs" /></a>