Yandex Lavka Mcp logo
Health: ActiveRecent health check succeeded.Last checked 8/8/2026, 11:36:47 PM

Yandex Lavka Mcp

Dudude-bit
View Repository6

Order groceries from Yandex Lavka (Russia): search the catalog, build a cart, and place an order with a two-step confirmation before any charge. Unofficial (reverse-engineered private web API); local stdio or remote HTTP with OAuth. uvx yandex-lavka-mcp.

Quick Install

Automated & IDE Setup

Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β€” or use 1-click editor setup below.

Manual Client & Custom JSON ConfigExpand JSON β–Ύ

Install Config Generator

claude_desktop_config.json
{
  "mcpServers": {
    "dudude-bit-yandex-lavka-mcp": {
      "command": "uvx",
      "args": [
        "yandex-lavka-mcp"
      ]
    }
  }
}

πŸ’‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

Documentation Overview

yandex-lavka-mcp

PyPI Python License: MIT 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.ru uses, 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_order spends real money on your card. Use at your own risk.
  • Provided as is, without warranty (see LICENSE).

What it does

ToolCharges?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_previewnoFull summary: items, subtotal, discount, delivery, ETA, payment, total.
confirm_orderYESPlaces 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).

How it's built

  • Python 3.12+ Β· FastMCP Β· 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.

Setup

1. Install

bash
uv venv && uv pip install -e .

2. Provide your Yandex session (one time)

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):

bash
uv pip install -e '.[browser]'
python scripts/extract_chrome_cookies.py          # auto-detects your profile

Any OS β€” paste the Cookie header from DevTools (Network β†’ any lavka.yandex.ru request β†’ Request Headers β†’ Cookie):

bash
python scripts/import_cookies.py --header "Session_id=...; yandexuid=...; L=..."

Session cookies expire β€” re-run when calls start returning "session expired".

3. Set a delivery location

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:

bash
python scripts/smoke.py "ΠΌΠΎΠ»ΠΎΠΊΠΎ"

4. Register with your assistant

Claude Code:

Terminal
claude mcp add yandex-lavka -- uv run --directory /path/to/yandex-lavka-mcp yandex-lavka-mcp

Claude Desktop (mcpServers):

config.json
{
  "yandex-lavka": {
    "command": "uv",
    "args": ["run", "--directory", "/path/to/yandex-lavka-mcp", "yandex-lavka-mcp"]
  }
}

Remote deploy (order from your phone)

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:

Terminal
docker build -t yandex-lavka-mcp .
docker run -p 8000:8000 \
  -e YANDEX_LAVKA_MCP_TRANSPORT=streamable-http \
  -e YANDEX_LAVKA_MCP_CONFIG_JSON="$(cat ~/.config/yandex-lavka-mcp/config.json)" \
  yandex-lavka-mcp

(The image defaults to stdio; the TRANSPORT env above switches it to HTTP.)

Environment variables

VarPurpose
YANDEX_LAVKA_MCP_TRANSPORTstdio (default) or streamable-http.
YANDEX_LAVKA_MCP_HOST / _PORTBind address for HTTP (default 0.0.0.0:8000 in Docker).
YANDEX_LAVKA_MCP_CONFIG_JSONThe whole config.json as one secret (instead of a file).

Authentication (any OIDC provider)

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:

VarPurpose
YANDEX_LAVKA_MCP_OAUTH_ISSUERYour provider's issuer URL (enables OAuth).
YANDEX_LAVKA_MCP_SERVER_URLPublic URL of this MCP server (the resource).
YANDEX_LAVKA_MCP_OAUTH_AUDIENCEExpected token audience (optional but recommended).
YANDEX_LAVKA_MCP_OAUTH_SCOPESSpace-separated required scopes (optional).
YANDEX_LAVKA_MCP_OAUTH_SUBJECTSAllow-list of token subs that may call the server (optional; strongest lock β€” every request spends your Lavka session).
YANDEX_LAVKA_MCP_OAUTH_JWKS_URLOverride 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_JSON secret. There is no headless Yandex login.

Develop

bash
uv pip install -e ".[dev]"
pytest

One account = one cart

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.

Security & privacy

  • Cookies and address live only in ~/.config/yandex-lavka-mcp/config.json (chmod 600), git-ignored. Never commit them.
  • The server never adds payment methods or changes account settings.
  • Ordering always requires an explicit confirmed total.

License

MIT. Unofficial project, not affiliated with Yandex.

Related MCP Servers

View all alternatives

Frequently Asked Questions about Yandex Lavka Mcp

How do I install the Dudude-bit/yandex-lavka-mcp MCP server?

Add the following block to your claude_desktop_config.json under mcpServers: "mcpServers": { "yandex-lavka-mcp": { "command": "npx", "args": ["-y", "Dudude-bit/yandex-lavka-mcp"] } }

What does Dudude-bit/yandex-lavka-mcp do?

Order groceries from Yandex Lavka (Russia): search the catalog, build a cart, and place an order with a two-step confirmation before any charge. Unofficial (reverse-engineered private web API); local stdio or remote HTTP with OAuth. uvx yandex-lavka-mcp.

Is the Dudude-bit/yandex-lavka-mcp MCP server free to use?

Yes. Dudude-bit/yandex-lavka-mcp is listed on AllMCPs as a free, open Model Context Protocol server you can install into Claude Desktop, Cursor, or any MCP-compatible client.

Technical Specs & Signals

More technical detailsExpand β–Ύ
TransportSTDIO
RuntimePython
Views1
Installs0
GitHub stars6
44Quality signal: Fair Β· 44/100How this signal is calculated β–Ύ
Server availabilityNot measured

Not scored for repo-hosted servers β€” we can't reach the running server, only its GitHub page. Hosted MCP endpoints are health-checked live.

Verified ownership8/20
Documentation & tools23/30
Adoption2/15
Community engagement0/10

A guidance signal from public completeness & health data β€” not a user rating. New listings start lower and rise as they add docs, get verified, and grow adoption. Signals we can't observe for a listing are skipped, not counted against it.

β˜… FeaturedMoxie Docs MCP logo

Moxie Docs MCP

MCP & Agent Skills for Automated Documentation, and codebase conventions + context

Explore Server β†’

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Free dofollow backlink: after claiming, verify your product site and place a dofollow AllMCPs badge β€” we recheck it stays live.

Claim & get free dofollow

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.