AgentsOpen Source 🇷🇺 24.07.2026 05:03

How I Taught Claude to Order Groceries from Yandex Lavka via an Unofficial MCP Server

AnthropicAnthropic
A developer built an MCP server to order groceries from Yandex Lavka through an AI assistant. This involved reverse-engineering the private API, tackling CSRF issues, cart race conditions, unavailable items from a different warehouse, and empty payment methods. The code is open-sourced under the MIT license.
A developer created an MCP (Model Context Protocol) server for ordering products from Yandex Lavka via the Claude AI assistant. Since the service has no public API, he analyzed the web interface's network traffic and reconstructed endpoints for search, cart, checkout, and more. Main challenges: CSRF protection (token extracted from the main page HTML), race conditions for the shared cart (solved with asyncio.Lock locking and retry on version conflicts), items from "Bolshaya Lavka" marked as unavailable in the cart (human-readable warnings added), and empty payment method (automatic card selection). For safety, checkout is split into two steps: preview with version and cart total verification, and only after confirmation, the charge. The server supports remote deployment with OAuth and verifies user identity. The code is published on GitHub.
Source: Habr — хаб ИИ — original
Our earlier posts on this topic ↓
Fresh news