dns-customer-mcp
Click on "Deploy 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., "@dns-customer-mcp найди смартфоны Xiaomi и покажи наличие в Казани"
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.
dns-customer-mcp
MCP-сервер для DNS Shop (сторона покупателя): поиск, карточки товаров, отзывы, характеристики, каталоги, наличие по городу и список магазинов через Model Context Protocol.
Репозиторий: dns-customer-mcp. Имя MCP-сервера и Docker-образа совпадает.
Работает в Cursor, Claude Desktop, VS Code и других MCP-клиентах.
Зачем
У DNS нет публичного consumer API. Сайт защищён Qrator — анонимный curl/requests с датацентрового IP получает HTTP 401.
Этот сервер держит сессию anti-detect браузера Camoufox, один раз проходит JS-челлендж и дальше читает страницы через in-page fetch (часто с X-Requested-With: XMLHttpRequest → { html }) или DOM-парсинг. Цены и наличие зависят от города сессии.
Архитектура: Node MCP (stdio) → Python Camoufox.
Related MCP server: ru-marketplace-mcp
Инструменты
Tool | Назначение |
| Поиск товаров |
| Пакетный поиск (1–10 запросов) |
| Карточка (+ location) |
| Пакет 1–40 карточек |
| Отзывы ( |
| Характеристики |
| Конфигурации на карточке |
| Наличие по городу/магазинам |
| Магазины города |
| Аналоги / аксессуары |
| Сравнение 2–8 товаров |
| Товары в категории |
| Живое дерево категорий |
| Витрина / поиск по бренду |
| Фильтры поиска |
| Текущий город сессии |
| Поиск городов |
| Сменить город |
Seller/offers маркетплейса нет — DNS один продавец. Q&A не реализован.
Город
По умолчанию анонимная сессия ≈ Москва (cookie current_path / city_path).
dns_get_location
dns_search_cities({ query: "Каз" })
dns_set_city({ city: "Казань" })
dns_product_availability({ product: id })Идентификаторы
Товар: 16-hex id (
b7a1667f9b19ed20) или URLhttps://www.dns-shop.ru/product/{id}/Категория: slug из
dns_list_categories— не выдумывать путь
Быстрый старт
git clone <repo> dns-customer-mcp
cd dns-customer-mcp
docker build -t dns-customer-mcp:latest .MCP-конфиг (Docker)
Скопируйте docs/mcp.example.json в конфиг клиента или используйте .cursor/mcp.json:
{
"mcpServers": {
"dns-customer": {
"command": "docker",
"args": [
"run", "-i", "--rm", "--init",
"--stop-timeout=10",
"--shm-size=1g",
"--label", "dns-customer-mcp=1",
"dns-customer-mcp:latest"
]
}
}
}--shm-size=1g обязателен для браузера. Контейнер живёт пока открыт MCP-сеанс (--rm убирает его после выхода).
Локальный запуск (без Docker)
npm install
pip install -r python/requirements.txt
python -m camoufox fetch
npm startWindows: задайте DNS_PYTHON=python при необходимости.
Переменные окружения
Var | Default | Purpose |
|
| Camoufox headless |
|
| Camoufox geoip |
|
| Ожидание Qrator |
|
| Таймаут навигации |
|
| Пауза между запросами |
|
| Idle браузера (Python; выровнен с Node) |
|
| Idle Node → exit (Docker |
|
| Интерпретатор bridge |
| on | Background warmup ( |
|
| Базовый URL сайта |
|
| REST API отзывов |
|
| Allowlist для fetch_url (SSRF) |
|
| Таймаут MCP tool по умолчанию |
|
| Параллельные MCP handlers (очередь вне timeout) |
|
| Auto-retry SESSION_DROP + warmup |
|
| Token bucket на tool calls ( |
|
| Перезапуски Python bridge |
|
| Таймаут dns_search |
|
| TTL кэша product meta |
| — | Прокси (RU IP при бане Qrator) |
Разработка
npm test # node:test — парсеры + config allowlist
npm run test:parse # alias для npm test
npm run smoke:warmup # Camoufox + Qrator
npm run discover # снять XHR/DOM после warmup
npm run smoke # search → details → specs → reviews
npm run smoke:location # города (+ --set для смены)Маршруты зафиксированы в src/dns/ по live discovery (Aug 2026):
Cookie
current_path:{ city: UUID, cityName }(Москва =30b7c1f3-03fb-11dc-95ee-00151716f9f5)/catalog/+ XHR → JSON{ html, data, … }/search/— in-page fetch (XHR часто 302); цены черезPOST /ajax-state/product-buy/Карточка товара — Vue SPA (hydrate wait) + meta/og fallback
REST_API_URLиз Pinia:https://restapi.dns-shop.ru(снаружи за Qrator)/product/characteristics/{id}/может 404 — specs с карточки после hydrate
Парсер
Плитка: точный класс
.catalog-productЦена в SSR-HTML пустая — догрузка через AjaxState; в DOM —
.product-buy__price(не рассрочка «от N ₽/мес»)При срыве селекторов —
parser_drift: true, неprice: 0
Разработка
Тесты и CI
npm test # Node unit tests (parse, errors, bridge protocol, config parity)
npm run test:python # pytest (config, locations, shared config parity)
npm run test:all # оба набора
npm run lint # ESLint (JS)
npm run lint:python # Ruff (Python) — pip install -r python/requirements-dev.txt
npm run build:config # проверка parity shared/config.json ↔ runtime
npm run build:selectors # генерация python/dns_selectors.py из src/selectors.jsGitHub Actions (.github/workflows/test.yml): npm test, pytest, docker build на каждый push/PR.
Smoke-тесты (живой Camoufox + сеть):
npm run smoke
npm run smoke:warmup
npm run smoke:location
npm run discoverDiscovery-скрипты
Одноразовые скрипты для reverse-engineering HTML/API DNS лежат в tools/discovery/ (не входят в CI). Основные smoke/discover — в scripts/.
Протокол Node↔Python: docs/bridge-protocol.md.
Переменные окружения (доп.)
Переменная | По умолчанию | Назначение |
|
| Token bucket на MCP tool calls ( |
|
| Сериализация MCP handlers (таймаут не тикает в очереди) |
| on | Фоновый прогрев Camoufox при старте ( |
Ограничения
Только публичный каталог (не корзина / профиль / заказы)
Без CDP к локальному Chrome и без Parse/Apify
При бане Qrator — RU residential proxy через
HTTPS_PROXY
Лицензия
MIT
Available Tools
18 toolsdns_brand_catalogBrowse DNS brand productsBRead-onlyIdempotent
Products for a brand name (brand page or search fallback).
Inputs: brand (required), page, rich, sort, +2 more.
dns_category_browseBrowse DNS categoryARead-onlyIdempotent
Products inside a category. Prefer slug from dns_list_categories ({uuid}/name); short aliases (videokarty, noutbuki, processory) resolve via search fallback. sort=price_desc works within the category (not the whole catalog).
Inputs: category (required), page, rich, sort, +4 more.
dns_compare_productsCompare DNS productsARead-onlyIdempotent
Compare 2–8 products: matrix of shared characteristics + slim product rows. Prefer this over parallel dns_product_specs. Prices follow session city.
Inputs: products (required), rich, compact.
dns_get_locationGet DNS session cityARead-onlyIdempotent
Current city for this browser session (from current_path cookie). Anonymous default ≈ Москва. Affects prices and availability.
Inputs: no named parameters.
dns_list_categoriesList DNS categoriesARead-onlyIdempotent
Live category directory from dns-shop.ru. No args → top-level. parent=slug → children. query=text → related cats.
Inputs: rich, limit, query, parent, +1 more.
dns_list_storesList DNS storesARead-onlyIdempotent
Physical stores for a city (/shops/{city}/). Pass city name or slug; defaults to session city.
Inputs: city, rich, limit, compact.
dns_product_availabilityGet DNS product availabilityARead-onlyIdempotent
Stock / pickup availability for the current city (dns_get_location). DNS is a single retailer — use this instead of marketplace offers. Returns stock enum: in_stock|tomorrow|order|out_of_stock|unknown. When SKU-level store list is empty, returns city shop addresses (storesSource=city_shops). Set includeStores=false to skip city shops fallback.
Inputs: no named parameters.
dns_product_detailsGet DNS product detailsARead-onlyIdempotent
Product card: price, oldPrice, rating, article, availability, stock enum, images, imageDataUri, delivery hints, location. Product id is 16-hex. For full specs use dns_product_specs. For 2+ cards prefer dns_products_batch.
Inputs: no named parameters.
dns_product_reviewsGet DNS product reviewsARead-onlyIdempotent
Buyer reviews via restapi opinions (product GUID). score, comment, pros, cons, date. Falls back to opinion page HTML; does not hang on product scrape.
Inputs: no named parameters.
dns_products_batchBatch DNS product detailsARead-onlyIdempotent
Fetch 1–40 product cards in one call (preferred over parallel dns_product_details). Each row includes location and stock.
Inputs: products (required), rich, compact.
dns_product_specsGet DNS product specificationsARead-onlyIdempotent
Technical characteristics from /product/characteristics/{id}/. When parser_drift or sparse, do not invent values. Default compact=true.
Inputs: no named parameters.
dns_product_variantsGet DNS product variantsARead-onlyIdempotent
Configuration options on the product card (color, memory, etc.). Each variant has its own 16-hex id. Default compact=true.
Inputs: no named parameters.
dns_searchSearch DNS Shop productsARead-onlyIdempotent
Search products on dns-shop.ru. Returns id (16-hex), name, price, rating, stock (in_stock|tomorrow|order|out_of_stock|unknown), url. Prices and stock depend on session city (dns_get_location / dns_set_city). sort=price_desc ranks only the current query results (DNS order=price-desc), not the entire DNS catalog. For 3+ queries use dns_search_multi (one round-trip, shared session — avoids burst SESSION_DROP). Default compact=true. Prefer limit 5–8. Next: dns_product_details / dns_compare_products / dns_products_batch.
Inputs: query (required), page, rich, sort, +5 more.
dns_search_citiesSearch DNS citiesARead-onlyIdempotent
City lookup for delivery/store region. Show options to user, then dns_set_city.
Inputs: query (required), limit.
dns_search_filtersGet DNS search filtersARead-onlyIdempotent
Available filters and sort options for a search query or category. Does not return products. Pass query or category (one required).
Inputs: no named parameters.
dns_search_multiBatch DNS product searchARead-onlyIdempotent
PREFERRED for PC builds / price scans: run 1–10 search queries in one call (shared browser session). Avoids parallel dns_search bursts that cause SESSION_DROP. Each result block has query, count, items with stock enum.
Inputs: queries (required), page, rich, sort, +5 more.
dns_set_citySet DNS session cityA
Change city for the session (cookie / UI). Call dns_search_cities first. Affects prices and stock in all subsequent tools. May take 15–40s.
Inputs: city (required), cityId, citySlug.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
Most tools map cleanly to separate resources or actions—search, product details, specs, reviews, variants, availability, stores, categories, brands, and city state—and the descriptions call out intended use cases. A few pairs require careful reading, especially product_details vs products_batch and product_availability vs list_stores, but the boundaries are drawable.
All names share the dns_ prefix and snake_case, but the internal convention is mixed: verb-first names like list_stores and get_location coexist with noun-first names like product_details and category_browse, plus adjective-noun forms like related_products. There is also singular/plural inconsistency between product_details and products_batch, making the scheme readable but not uniform.
18 tools sits within the 16–25 range that starts to feel heavy for a single server, even though the domain is fairly broad. The count is somewhat justified by purpose-built batching tools like search_multi, products_batch, and compare_products, but several product-data tools could potentially be consolidated.
The read-only shopping surface is nearly comprehensive: city selection, search, category and brand browsing, product cards, specs, reviews, variants, availability, stores, related products, and comparison are all covered. The main gap is that dns_search_filters exposes filters but no tool clearly documents how to apply those filters back into a search or category query.
Maintenance
Related MCP Connectors
Read-only product catalog for shopping agents: search, details, compatibility, shop answers.
Read-only product catalog for shopping agents: search, details, compatibility, shop answers.
Read-only product catalog for shopping agents: search, details, compatibility, shop answers.
Read-only product catalog for shopping agents: search, details, compatibility, shop answers.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables querying and comparing prices, availability, ratings, reviews, and seller details from major Russian and Chinese marketplaces (Wildberries, Ozon, Yandex Market, and others) without requiring API keys, via a unified MCP interface.2425MIT
- AlicenseAqualityAmaintenanceMCP server that reads product data from Russian and Chinese marketplaces (Wildberries, Ozon, Yandex Market, Avito, etc.) — prices, availability, ratings, reviews, and seller details — with price comparison across sources. Requires no API keys; some sources use your Chrome session for anti-bot access.391,083 PyPI202MIT
- AlicenseAqualityDmaintenanceEnables Ozon marketplace customer-side operations including product search, detailed product cards, reviews, seller comparisons, and delivery city selection via MCP.19MIT
- AlicenseAqualityCmaintenanceEnables LLM agents to retrieve live, accurately labeled data from DNS (dns-shop.ru) — city-specific pricing, product search with filters, ratings, reviews, store stock, and price history — while avoiding common data misinterpretations.51MIT