blyzenko-mcp
# blyzenko-mcp
Unofficial **Model Context Protocol (MCP)** server for **Blyzenko** (`delivery2.blyzenko.com.ua`), powered by [`blyzenko-api`](https://github.com/ArturLys/blyzenko-api). Lets Claude and other AI assistants search real grocery stock, compute per-kg/per-L prices, scan discounts, calculate baskets, and inspect past orders without emulators or browsers.
> **Educational & Community Wrapper**
> Built on top of reverse-engineered mobile API endpoints. Store APIs can change whenever the upstream app updates; tools return plain, structured error messages when endpoints shift or authentication expires. Cash-on-pickup ordering (`submit_pickup_order`) and cancellation (`cancel_order`) require explicit `confirm_purchase=True` / `confirm_cancel=True` after staging and reviewing totals.
## Tools
| Tool | Purpose | Auth Required |
|---|---|---|
| `search_products` | Search products with price, normalized UAH/kg or UAH/L unit cost, discount, and stock (`md`, `html`, or `json`) | No (guest) / Optional (store) |
| `search_multi` | Batch search multiple grocery items in a single call for fast cross-store optimization | No / Optional |
| `get_promos` | List discounted products sorted by percent off | No / Optional |
| `browse_categories` | List store aisles and categories with SKU counts | No / Optional |
| `get_product` | Get full details by `productId` or EAN barcode | No / Optional |
| `find_stores` | Search Blyzenko stores by street/city or coordinates | Yes |
| `set_store` | Pin a store Mongo `_id` locally in `~/.config/blyzenko/session.json` | Yes (for store catalog) |
| `preview_basket` | Calculate order total, discounts, and loyalty bonuses (`POST /orders/calculate`, read-only) | Yes |
| `get_profile_and_orders` | Read account profile, saved addresses, active orders, and order history | Yes |
| `get_order_details` | Inspect one order's live status label, prep timings, pickup hold window, items, and receipt | Yes |
| `submit_pickup_order` | Stage or submit cash-on-pickup order (`Оплата на касі`) behind `confirm_purchase=True` | Yes |
| `cancel_order` | Fetch cancel reasons or cancel an active order behind `confirm_cancel=True` | Yes |
## Quick Setup
### 1. Run via `uvx` or local install
```bash
pip install git+https://github.com/ArturLys/blyzenko-mcp.git
```
Or run directly:
```json
{
"mcpServers": {
"blyzenko": {
"command": "blyzenko-mcp",
"env": {
"BLYZENKO_STORE_ID": "<optional-store-mongo-id>"
}
}
}
}
```
### 2. Optional Login (for store-specific catalog, stores list, and basket preview)
Guest catalog search and promos work immediately with zero credentials. To unlock your neighborhood store catalog, basket calculations, and order history, sign in once via the `blyzenko` CLI:
```bash
blyzenko login --phone +380XXXXXXXXX
blyzenko stores --lat 49.84 --lng 24.00
blyzenko set-store <MONGO_STORE_ID>
```
Tokens stay in `~/.config/blyzenko/session.json` on your machine.
TDQS
Scored across 12 tools
Most tools target distinct actions (searching products, browsing categories, finding stores, order lifecycle), and descriptions clarify boundaries. The main soft spots are search_products vs search_multi (batch variant) and preview_basket vs submit_pickup_order's confirm_purchase=False preview mode, which conceptually overlap but are described well enough to choose correctly.
Nearly all tools follow a clean snake_case verb_noun pattern (search_products, get_promos, browse_categories, get_product, find_stores, set_store, preview_basket, get_order_details, submit_pickup_order, cancel_order). The only outlier is search_multi, which drops the noun and the meaning is less obvious from the name alone.
Twelve tools is well within the sweet spot for a grocery shopping/ordering server, and each one maps to a meaningful step (discovery, store selection, basket calc, checkout, order management). No tool feels redundant padding.
The surface covers discovery, store selection, basket preview, ordering, and cancellation, but there is no explicit cart/basket mutation tool (add/remove/update item) — you can preview a basket and submit an order, yet building the basket is implicit. Favorites/reorder and any delivery-address or profile-edit operations are also absent, which will force workarounds for common grocery workflows.