Pyaterochka MCP Tool
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Pyaterochka MCP Toolfind discounted products at the nearest Pyaterochka store"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π Pyaterochka MCP Tool
MCP server and AI bot for the Pyaterochka catalog β search for stores, products, promotions, and prices across Russia right from your neural network.
β¨ What this is
The project turns the public catalog of 5ka.ru into tools for LLMs:
Component | What it does |
π§© MCP stdio server | Connects to Claude Desktop, Cursor, opencode, and any MCP client |
π HTTP MCP server | The same set of tools at |
π€ AI Telegram bot | A full-fledged agent: finds a store on its own, searches for products, shows photos and prices, remembers your preferences |
Capabilities:
π find a physical store by address or geolocation;
ποΈ get categories of a specific store;
π search products with filters: price (min/max), brand, promotions only;
π sort by price / discount size / popularity;
π³ show the card price, "buy N items" promotions, the old price;
π return availability, stock, nutritional values, ingredients, PLU, and a product link;
πΈ send a photo album of found products in Telegram.
β οΈ The project is unofficial and not affiliated with X5 Group. It uses the open web catalog without login or password. For educational purposes only.
Related MCP server: E-Commerce MCP Server
ποΈ Architecture
ββββββββββββββββββββββββ
β Claude / Cursor / β
β ChatGPT / Telegram β
ββββββββββββ¬ββββββββββββ
β
ββββββββββββββββββ΄βββββββββββββββββ
β β
MCP stdio / HTTP MCP OpenAI-compatible API
β β
βββββββββββΌββββββββββ βββββββββββΌββββββββββ
β mcp/mcp_server β β llm_client β
β + mcp_http_serverβ β (ΡΠΎΠ»Π±ΡΠΊ ΠΌΠ΅ΠΆΠ΄Ρ β
βββββββββββ¬ββββββββββ β ΠΏΡΠΎΠ²Π°ΠΉΠ΄Π΅ΡΠ°ΠΌΠΈ) β
β βββββββββββ¬ββββββββββ
βββββββββββΌβββββββββββββββββββββββββββββββββββΌββββββββββ
β pyaterochka_store_api β
β Π±ΡΠ°ΡΠ·Π΅Ρ Camoufox ΠΠΠ aiohttp + cookies.json β
ββββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββ
β
π 5d.5ka.ru APIπ Quick start
1. Installation
git clone https://github.com/<you>/pyaterochka-mcp-tool.git
cd pyaterochka-mcp-tool
python -m venv .venv
# Windows:
.venv\Scripts\activate
# Linux/macOS:
source .venv/bin/activate
pip install -r requirements.txtIt works without it too β via cookies (see below). With it, cookies are not needed at all:
pip install "camoufox[geoip]"
python -m camoufox fetch # ΠΎΠ΄ΠΈΠ½ ΡΠ°Π· ΡΠΊΠ°ΡΠ°ΡΡ Π±ΡΠ°ΡΠ·Π΅Ρ (~150 ΠΠ)2. Setting up .env
cp .env.example .envThe minimum for the MCP server to work is nothing (only cookies, if you didn't install camoufox). The minimum for the bot:
TELEGRAM_BOT_TOKEN=123456:AA... # ΠΎΡ @BotFather
LLM_API_URL=https://api.openai.com/v1
LLM_API_KEY=sk-...
LLM_MODEL=gpt-4o-miniAny OpenAI-compatible provider will work: OpenAI, OpenRouter, Groq,
DeepSeek, NVIDIA NIM, Together AI, local vLLM/Ollama (http://localhost:11434/v1).
Variable | Default | Description | ||||
| β | Bot token from @BotFather (required for the bot) | ||||
|
| You can specify a local Telegram Bot API Server β then response streaming is enabled |
| β | SOCKS5 proxy for Telegram | |
|
| Main LLM (OpenAI-compatible | ||||
| β | Main LLM key | ||||
|
| Main provider model | ||||
| β | Reserve #1 (auto-fallback on failures/429/5xx) | ||||
| β | Reserve #2 (last line of defense) | ||||
| β | Keys for the inline | ||||
| β | Path to cookies.json (if no browser mode) | ||||
| β | SOCKS5 proxy for requests to 5ka.ru | ||||
|
| HTTP MCP server address |
π·πΊ For users in Russia: if the official
api.telegram.orgis unavailable, you can use a public Telegram Bot API mirror β just add to.env:TELEGRAM_API_BASE_URL=https://telegram.ebalo.lol
π§© Running the MCP server
Option A: stdio (for desktop clients)
No need to run anything manually β the client starts the process itself. Add the server to the client config:
Claude Desktop β claude_desktop_config.json:
{
"mcpServers": {
"pyaterochka": {
"command": "python",
"args": ["C:/absolute/path/to/pyaterochka-mcp-tool/mcp/mcp_server.py"],
"env": {
"PYATEROCHKA_COOKIES_FILE": "C:/secrets/pyaterochka/cookies.json"
}
}
}
}Cursor / any client with mcpServers β the format is the same.
You can check manually like this:
python mcp/mcp_server.py # ΡΠ»ΡΡΠ°Π΅Ρ JSON-RPC Π² stdin/stdout
# ΠΈΠ»ΠΈ ΠΏΠΎΡΠ»Π΅ pip install -e . :
pyaterochka-mcpOption B: HTTP (Streamable HTTP)
python mcp_http_server.py # β http://127.0.0.1:8765/mcpEndpoints: POST /mcp (JSON-RPC), GET /health, GET / (info + list of tools).
Example request:
curl -X POST http://127.0.0.1:8765/mcp \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"find_store","arguments":{"address":"ΠΠΎΡΠΊΠ²Π°, ΠΠΈΡΠΎΠ²ΠΎΠ³ΡΠ°Π΄ΡΠΊΠ°Ρ ΡΠ»ΠΈΡΠ°, 17"}}}'π§° Available tools (12)
Tool | Description |
| Find a store by address β |
| Nearest stores by coordinates |
| Store card and opening hours |
| Stores in a rectangular map area |
| Store category tree |
| Product search: price, brand, promotions, sorting |
| Category products with filters |
| Universal search by address or |
| Promotion terms for a product |
| Product card: ingredients, calories, nutritional values |
| Refresh the 5ka.ru web session |
More details in mcp/README.md.
π€ Running the Telegram bot
python bot.py # ΡΠΎΠ»ΡΠΊΠΎ Π±ΠΎΡ
python run.py # Π±ΠΎΡ + HTTP MCP-ΡΠ΅ΡΠ²Π΅Ρ Π²ΠΌΠ΅ΡΡΠ΅ (ΠΆΠΈΠ²ΠΎΠΉ Π²ΡΠ²ΠΎΠ΄ Π² ΠΊΠΎΠ½ΡΠΎΠ»Ρ)How to use:
/startβ send the bot your geolocation (paperclip β π Location) or type an address;choose your favorite store with the buttons;
ask: "find milk under 100 β½", "what's on sale for coffee?", "opening hours?";
commands:
/resetβ reset memory,/stopβ interrupt execution,/modelβ switch models on the fly.
The bot behaves like an agent: it calls tools in a chain on its own (find store β search products β check promotions β show photos and the summary).
πͺ Cookies: are they needed and why
There are two transports for accessing the catalog β pick one:
π¦ Browser mode (camoufox) | π aiohttp + cookies.json | |
Manual cookies | β not needed | β needed |
Reliability against 403/anti-bot | higher | lower |
Dependencies | heavy (~150 MB browser) | light |
How to get cookies.json (for the second option):
Open 5ka.ru in Chrome/Firefox β no login needed, just open the site;
Export cookies with an extension like Get cookies.txt LOCALLY (JSON or Netscape format);
Save the file outside the repository, e.g.
C:\secrets\pyaterochka\cookies.json;Specify the path:
PYATEROCHKA_COOKIES_FILE=C:\secrets\pyaterochka\cookies.json.
On startup, the client first opens 5ka.ru to accept fresh protective
cookies (spjs/spsc and others), then updates them automatically.
π Never publish cookies.json β it's your live web session. The file is already added to
.gitignore. If it leaks β clear the cookies on the site.
π Public access: connecting ChatGPT / Claude via a tunnel
The HTTP MCP server listens on 127.0.0.1:8765 β for external neural networks (ChatGPT,
Claude, and any clients with remote MCP support) to reach it,
wrap the port in a tunnel:
ngrok:
ngrok http 8765
# ΠΏΠΎΠ»ΡΡΠΈΡΠ΅ Π°Π΄ΡΠ΅Ρ Π²ΠΈΠ΄Π° https://a1b2-...ngrok-free.appcloudflared (no registration):
cloudflared tunnel --url http://localhost:8765
# ΠΏΠΎΠ»ΡΡΠΈΡΠ΅ Π°Π΄ΡΠ΅Ρ Π²ΠΈΠ΄Π° https://....trycloudflare.comThen add the URL to the client:
Client | Where to specify |
Claude Desktop / Claude Web | Settings β Connectors β Add custom connector β |
ChatGPT | Settings β Apps & Connectors β Create (Developer Mode) β URL |
Cursor | MCP settings β Add server β URL/SSE type |
MCP Inspector |
|
β οΈ Security: the endpoint is public and without authentication β anyone who learns the address can use your tools. For permanent use, protect the tunnel with basic authentication on a reverse proxy or use ngrok with IP restrictions. SSH tunnels/keys are deliberately not included in the project code.
π‘ Example queries
ΠΠ°ΠΉΠ΄ΠΈ Π² ΠΡΡΡΡΠΎΡΠΊΠ΅ ΠΏΠΎ Π°Π΄ΡΠ΅ΡΡ ΠΠΎΡΠΊΠ²Π°, ΠΠΈΡΠΎΠ²ΠΎΠ³ΡΠ°Π΄ΡΠΊΠ°Ρ ΡΠ»ΠΈΡΠ°, 17
ΠΌΠΎΠ»ΠΎΠΊΠΎ Π΄Π΅ΡΠ΅Π²Π»Π΅ 200 ΡΡΠ±Π»Π΅ΠΉ ΠΈ ΠΎΡΡΠΎΡΡΠΈΡΡΠΉ ΠΏΠΎ ΡΠ΅Π½Π΅.Π§ΡΠΎ ΠΈΠ· ΠΊΠΎΡΠ΅ ΡΠ΅ΠΉΡΠ°Ρ ΠΏΠΎ Π°ΠΊΡΠΈΠΈ ΡΡΠ΄ΠΎΠΌ ΡΠΎ ΠΌΠ½ΠΎΠΉ? ΠΡΠΈΡΠ»ΠΈ ΡΠΎΡΠΎ ΡΠΎΠΏ-5.Via CLI (without a neural network):
python pyaterochka_store_api.py resolve --address "ΠΠΎΡΠΊΠ²Π°, ΠΠΈΡΠΎΠ²ΠΎΠ³ΡΠ°Π΄ΡΠΊΠ°Ρ ΡΠ»ΠΈΡΠ°, 17"
python pyaterochka_store_api.py products --address "ΠΠΎΡΠΊΠ²Π°, ΠΠΈΡΠΎΠ²ΠΎΠ³ΡΠ°Π΄ΡΠΊΠ°Ρ ΡΠ»ΠΈΡΠ°, 17" \
--store-id S105 --query "ΠΌΠΎΠ»ΠΎΠΊΠΎ" --price-max 200 --sort price_asc --limit 20π Project structure
pyaterochka-mcp-tool/
βββ mcp/
β βββ mcp_server.py # MCP stdio-ΡΠ΅ΡΠ²Π΅Ρ (12 ΠΈΠ½ΡΡΡΡΠΌΠ΅Π½ΡΠΎΠ²)
β βββ README.md # Π΄Π΅ΡΠ°Π»ΠΈ ΠΏΠΎΠ΄ΠΊΠ»ΡΡΠ΅Π½ΠΈΡ MCP-ΠΊΠ»ΠΈΠ΅Π½ΡΠΎΠ²
βββ mcp_http_server.py # HTTP (Streamable HTTP) ΡΡΠ°Π½ΡΠΏΠΎΡΡ MCP
βββ pyaterochka_store_api.py # API-ΡΠ»ΠΎΠΉ ΠΊΠ°ΡΠ°Π»ΠΎΠ³Π° 5ka.ru (+CLI)
βββ bot.py # Telegram-Π±ΠΎΡ (aiogram)
βββ run.py # Π±ΠΎΡ + HTTP MCP ΠΎΠ΄Π½ΠΈΠΌ ΠΏΡΠΎΡΠ΅ΡΡΠΎΠΌ
βββ agent.py # Π°Π³Π΅Π½ΡΡΠΊΠΈΠΉ ΡΠΈΠΊΠ»: LLM β ΠΈΠ½ΡΡΡΡΠΌΠ΅Π½ΡΡ
βββ llm_client.py # OpenAI-ΡΠΎΠ²ΠΌΠ΅ΡΡΠΈΠΌΡΠΉ ΠΊΠ»ΠΈΠ΅Π½Ρ Ρ ΡΠΎΠ»Π±ΡΠΊΠΎΠΌ
βββ providers.py # ΠΊΠ°ΡΠ°Π»ΠΎΠ³ LLM-ΠΏΡΠΎΠ²Π°ΠΉΠ΄Π΅ΡΠΎΠ² Π΄Π»Ρ /model
βββ config.py # ΠΊΠΎΠ½ΡΠΈΠ³ ΠΈΠ· ΠΏΠ΅ΡΠ΅ΠΌΠ΅Π½Π½ΡΡ
ΠΎΠΊΡΡΠΆΠ΅Π½ΠΈΡ
βββ stats.py / live_timer.py # ΡΡΠ°ΡΠΈΡΡΠΈΠΊΠ° ΠΈ ΠΊΠΎΠ½ΡΠΎΠ»ΡΠ½ΡΠ΅ ΡΠΊΡΠ°ΡΠ΅Π½ΠΈΡ
βββ requirements.txt
βββ pyproject.toml
βββ .env.exampleπ‘οΈ Security
All keys and tokens β only via
.env(never gets into git).cookies.json,sessions.json, logs β in.gitignore.Model responses never contain internal ids (
sap_code, PLU).Don't publish cookies, proxies, or tokens β see the Cookies section.
βοΈ License
MIT. The project is not affiliated with X5 Group (Pyaterochka); all trademarks belong to their owners.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityFmaintenanceEnables interaction with the Rami Levy Online Grocery Store API, allowing users to perform product searches, add or remove items from their cart, and prepare for checkout, all while integrating with MCP-enabled LLMs.11MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage products, shopping carts, and orders in an online store through a well-defined MCP API.
- FlicenseBqualityCmaintenanceProvides MCP tools for searching and comparing products on Wildberries (and Ozon planned), including product search, detailed card retrieval, and review fetching, normalized for LLM consumption.32
- AlicenseAqualityCmaintenanceAn unofficial MCP server for interacting with Pyaterochka (5ka.ru) grocery store, enabling product search, cart management, and order delivery.24MIT
Related MCP Connectors
100+ MCP tools for AI agents: content metadata, trade intelligence, business-expertise analysis.
Pocket Agent (aipocketagent.com) MCP server β read tools for personas, apps, and product info.
Connect e-commerce and marketing data to AI assistants via MCP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dreamcatchered/pyaterochka-mcp-tool'
If you have feedback or need assistance with the MCP directory API, please join our Discord server