yandex-lavka-mcp
An unofficial MCP server for ordering groceries from Yandex Lavka: search, cart and checkout with total confirmation
Install
uv venv && uv pip install -e .Run inside a clone. Then import cookies: python scripts/import_cookies.py --header "...".
This is third-party code. Review the repository files before installing.
What it does
The server uses the same private web API as the Lavka site, acting through your Yandex session. The agent searches products at the delivery address, builds a cart, switches saved addresses, shows an order summary and places the order. Checkout is two steps: a preview with all totals, then a confirmation that only accepts the exact total from a fresh preview. If the bank requires 3-D Secure, the server returns a link to finish payment.
Who it is for. For Lavka users who want to put together grocery orders through an agent.
Good fit when
- You want to build a cart from a shopping list
- You want to compare prices and availability across addresses
- You want to check the status of an active order
Not a fit when
- You cannot risk breaking Yandex terms of service
- The same account is used at the same time in the Lavka app or another client
Example request
Build a Lavka cart with milk, eggs, bread and bananas, show the total but do not place the orderLimitations
Lavka has no public API; the project uses the site's private API, which may change or be blocked, and use may break Yandex terms. It needs browser session cookies, which expire and must be refreshed by hand. Confirming an order charges the saved card. Requires Python 3.12.
How to disable. Remove the yandex-lavka server from your client config and delete ~/.config/yandex-lavka-mcp/config.json with the cookies. To be safe, sign out of the Yandex session in the browser.
MCP
- Transport
- stdio, http
- Authentication
- not required
| Environment variables | |
|---|---|
| YANDEX_LAVKA_MCP_TRANSPORT | stdio by default or streamable-http |
| YANDEX_LAVKA_MCP_CONFIG_JSON secret | The whole config.json with cookies as one variable instead of a file |
| YANDEX_LAVKA_MCP_OAUTH_ISSUER | OIDC provider issuer, enables OAuth for HTTP mode |
Security check
- Places real orders and charges the saved card
- Stores Yandex account session cookies
- Uses a private API, which may break Yandex terms
README in short
The README opens with warnings about unofficial status and real charges. It then lists tools marked by whether they charge money and explains the two-step checkout and 3-D Secure. Setup uses uv, cookie import from Chrome on macOS or from a DevTools header, and connection to Claude Code and Claude Desktop. Remote Docker deployment with OAuth is covered separately. MIT licensed.
FAQ
Can the agent place an order by accident?
confirm_order refuses unless a preview was just run and the passed total matches it. Any cart change requires a new preview.
Can I order from my phone?
Yes, the server can be deployed over HTTP in Docker and added as a claude.ai connector. For network mode the author requires OAuth through any OIDC provider.
Related
A CLI for every Google Workspace API with JSON output and agent skills: Drive, Gmail, Calendar, Sheets and more
Local search over Markdown notes, docs and meeting transcripts: keywords, semantic search and reranking, with an MCP server
A task manager for AI-driven development: breaks a PRD into dependent tasks and guides the agent through them via MCP or CLI
Anthropic's official plugins for knowledge work roles: sales, support, product, marketing, legal, finance, data and enterprise search