Skip to main content
Glama
retailcrm-mcp

retailcrm-mcp

by theYahia

MCP-сервер для RetailCRM — заказы, клиенты и товары интернет-магазина через ИИ

Если вы искали, как подключить RetailCRM к нейросети, поднять заказ или карточку клиента и не собирать отчёты руками — это оно. 39 инструментов и 2 навыка поверх API v5: заказы, клиенты, товары, складские остатки, оплаты, задачи, справочники и аналитика. Спрашиваете «что с заказом 12345» — получаете статус, состав и оплату одним ответом.

Промышленный MCP-сервер для e-commerce CRM RetailCRM. 39 инструментов + 2 навыка-промпта для работы с заказами, клиентами, товарами, остатками, оплатами, задачами, справочниками и аналитикой через API v5.

npm Smithery

Ответы экономят токены по умолчанию

Читающие инструменты возвращают компактную структурированную сводку только из тех полей, которые нужны агенту, а не весь ответ RetailCRM. Подробность настраивается на каждый вызов:

Параметр

Что делает

(по умолчанию)

detail:"summary" — ключевые поля + блок pagination

detail:"full"

Все структурированные поля (позиции, доставка, оплаты, адрес…)

raw:true

Нетронутый ответ RetailCRM (для отладки)

⚠️ v3 ломает совместимость с v2: по умолчанию отдаётся структурированная сводка, а не сырой JSON. Передайте raw:true, чтобы вернуть прежний формат.

Related MCP server: MoySklad MCP Server

Инструменты (39)

Заказы

Инструмент

Описание

list_orders

Список заказов по статусу, клиенту, номеру, периоду

get_order

Один заказ по ID или externalId

create_order

Создать заказ; привязать существующего клиента (customer_id/customer_external_id) или завести нового прямо в вызове

update_order

Изменить статус, клиента, доставку, комментарии

orders_history

История изменений заказов, включая смены статусов (инкрементальная синхронизация)

Клиенты

Инструмент

Описание

list_customers

Поиск клиентов по имени, e-mail, телефону, дате

get_customer

Один клиент по ID или externalId

create_customer

Создать клиента

update_customer

Изменить существующего клиента

merge_customers

Объединить дубли (разрушающая операция)

customers_history

Лог изменений клиентов (прирост/отток, инкрементальная синхронизация)

Товары и остатки

Инструмент

Описание

list_products

Товары каталога по названию, группе, активности, цене

list_product_groups

Дерево товарных категорий

store_inventories

Остатки и себестоимость по торговым предложениям и складам

Оплаты

Инструмент

Описание

order_payment_create

Зафиксировать оплату по заказу

order_payment_edit

Изменить оплату

order_payment_delete

Удалить оплату (разрушающая операция)

Заметки и задачи

Инструмент

Описание

customer_notes_list / customer_notes_create / customer_notes_delete

Произвольные заметки по клиенту

tasks_list / tasks_create / tasks_edit

Задачи и напоминания

Маркетинг и финансы

Инструмент

Описание

list_segments

Сегменты клиентов (RFM и маркетинговые когорты)

list_costs / create_cost

Записи расходов для аналитики маржи

Файлы

Инструмент

Описание

files_list / files_get / files_upload

Прикрепление и получение файлов (загрузка сырым octet-stream)

Справочники

Инструмент

Описание

list_statuses / list_delivery_types / list_payment_types / list_stores

Справочники статусов, доставок, оплат и магазинов

list_sites

Сайты, доступные ключу API (для заполнения параметра site)

list_countries / list_order_types / list_order_methods

Справочники адресов и заказов

Аналитика

Инструмент

Описание

get_orders_summary

Статистика заказов за период: точное количество и выручка, средний чек, распределение по статусам

get_customers_summary

Количество новых клиентов за период

Навыки-промпты (2)

Навык

Описание

new-orders

Быстрый ежедневный обзор сегодняшних заказов

customer-search

Найти клиента по имени, e-mail или телефону

Настройка

  1. В RetailCRM откройте Настройки → Интеграция → Ключи API.

  2. Создайте ключ API с нужными правами (заказы, клиенты, склад, справочники). Для мультисайтового ключа передавайте код site в инструментах создания и изменения (см. list_sites).

  3. Запомните свой домен (часть yourstore из yourstore.retailcrm.ru).

Переменные окружения

Переменная

Обяз.

Описание

RETAILCRM_DOMAIN

да

Домен вашего RetailCRM (например, yourstore.retailcrm.ru)

RETAILCRM_API_KEY

да

Ключ API (передаётся в заголовке X-API-KEY)

RETAILCRM_READONLY

нет

1 — оставить только читающие инструменты (скрыть create/update/merge/delete)

RETAILCRM_RATE_LIMIT

нет

Клиентское ограничение запросов в секунду (RetailCRM допускает ~10/с)

PORT / HOST

нет

Привязка HTTP-сервера (по умолчанию 3000 / 127.0.0.1, только в режиме --http)

RETAILCRM_HTTP_ALLOWED_HOSTS

нет

Разрешённые значения Host через запятую для защиты от DNS-rebinding

RETAILCRM_DNS_PROTECTION

нет

off — отключить защиту от DNS-rebinding (HTTP-режим)

RETAILCRM_URL по-прежнему принимается как запасной вариант для RETAILCRM_DOMAIN.

Подключение к Claude Desktop

{
  "mcpServers": {
    "retailcrm": {
      "command": "npx",
      "args": ["-y", "@theyahia/retailcrm-mcp"],
      "env": {
        "RETAILCRM_DOMAIN": "yourstore.retailcrm.ru",
        "RETAILCRM_API_KEY": "your-api-key"
      }
    }
  }
}

Режим Streamable HTTP

Запуск в виде HTTP-сервера вместо stdio:

RETAILCRM_DOMAIN=yourstore.retailcrm.ru \
RETAILCRM_API_KEY=your-key \
npx @theyahia/retailcrm-mcp --http
  • POST /mcp — эндпоинт MCP Streamable HTTP (stateless: на каждый запрос создаётся новый сервер)

  • GET /health — проверка состояния (JSON с версией и числом инструментов)

  • GET/DELETE /mcp — 405 (в stateless-режиме не используются)

  • Привязка по умолчанию: 127.0.0.1:3000. Защита от DNS-rebinding для локальных привязок включена по умолчанию.

Smithery

npx @smithery/cli install @theyahia/retailcrm-mcp

Демо-промпты

1. Обзор заказов за день: «Покажи все заказы, созданные сегодня, в статусе „новый“. Дай итоговое количество и выручку.»

2. Клиент и его история заказов: «Найди клиента с почтой anna@example.com. Покажи полный профиль и последние заказы.»

3. Проверка остатков: «Есть ли товар с externalId SKU-42 в наличии и на каком складе?»

Вебхуки и триггеры

RetailCRM не умеет создавать вебхуки через API. Используйте Триггеры в админке (Настройки → Триггеры), чтобы отправлять HTTP-запросы на внешние эндпоинты по событиям заказов и клиентов.

Обработка ошибок

  • Лимиты запросов и 5xx: автоматический повтор с экспоненциальной задержкой и джиттером (до 3 попыток).

  • Ошибки API: детали ошибки RetailCRM разбираются и возвращаются модели как результат инструмента с isError: true, чтобы агент мог исправиться сам (например, повторить с by:"externalId").

  • Таймауты: 15 секунд на запрос с повтором.

Разработка

npm install
npm test          # vitest (на моках; живой ключ API не нужен)
npm run lint      # eslint
npm run typecheck # tsc --noEmit
npm run dev       # dev-режим stdio (tsx)
npm run build     # очистка + сборка в dist/

Лицензия

MIT


Часть WWmcp · Telegram: @vhodvai

Available Tools

39 tools
create_costA

Create an expense record, optionally attributed to an order. Returns {success, id}.

Inputs: summ (required), cost_item (required), date_from (required), site, +3 more.

create_customerA

Create a customer with name, contacts, address, optional externalId. Returns {success, id}.

Inputs: first_name (required), site, email, phones, +6 more.

create_orderA

Create an order with line items and delivery. Link an existing customer via customer_id/customer_external_id, or pass first_name (+phone/email) to create one inline. Returns {success, id, order?}.

Inputs: items (required), site, email, phone, +9 more.

customer_notes_createA

Add a note to a customer (by id or externalId). Returns {success, id}.

Inputs: text (required), site, manager_id, customer_id, +1 more.

customer_notes_deleteA
Destructive

Delete a customer note by id. Returns {success}.

Inputs: id (required).

customer_notes_listA
Read-only

List free-text notes attached to customers. Returns {notes[], pagination}.

Inputs: page, limit, filter_customer_id, filter_customer_external_id.

customers_historyA
Read-only

Customer field-change log for growth/churn signals and incremental sync. Returns {history[], pagination}.

Inputs: raw, page, limit, filter_date_to, +2 more.

files_getA
Read-only

Get a file's metadata by id. Returns {file}.

Inputs: id (required).

files_listA
Read-only

List files attached to orders/customers. Returns {files[], pagination}.

Inputs: page, limit, filter_filename, filter_order_id, +1 more.

files_uploadA

Upload a file (UTF-8 text or base64 binary). Returns {success, file}.

Inputs: content (required), filename (required), base64, content_type.

get_customerA
Read-only

Get a single customer by id or externalId. Returns a shaped customer; detail:'full' adds address and contact details.

Inputs: id (required), by, raw, detail.

get_customers_summaryA
Read-only

Period-scoped new-customer count for a date range. Returns {period, newCustomers}.

Inputs: date_to (required), date_from (required).

get_orderA
Read-only

Get a single order by RetailCRM id or externalId. Returns a shaped order; detail:'full' adds items, delivery, payments, comments.

Inputs: id (required), by, raw, detail.

get_orders_summaryA
Read-only

Period-scoped order summary: exact totalCount for the date range plus revenue, average order value, and status distribution aggregated over up to max_pages×100 orders (partial:true if the window exceeds that).

Inputs: date_to (required), date_from (required), max_pages, filter_status.

list_costsA
Read-only

List expense records (for margin/profit analytics) by date and cost group. Returns {costs[], pagination}.

Inputs: page, limit, filter_date_to, filter_date_from, +1 more.

list_countriesB
Read-only

Valid country ISO codes for addresses/delivery.

Inputs: raw.

list_customersA
Read-only

List/search customers by name, email, phone, created-date. Returns (summary): pagination + array of {id, name, email, phone, ordersCount, totalSpent}. detail:'full' adds address/externalId/all phones.

Inputs: raw, page, limit, detail, +5 more.

list_delivery_typesA
Read-only

All delivery types with codes, names, default costs.

Inputs: raw.

list_order_methodsB
Read-only

All order methods (acquisition channels).

Inputs: raw.

list_ordersA
Read-only

List orders with filters by status, customer name, number, and created-date range. Returns (summary): pagination + array of {id, number, status, total, customer, phone, itemCount, createdAt}. Use detail:'full' for line items/delivery/payments, raw:true for the untouched payload.

Inputs: raw, page, limit, detail, +5 more.

list_order_typesA
Read-only

All order types (codes/names) — valid values for create_order's order_type.

Inputs: raw.

list_payment_typesB
Read-only

All payment types with codes and names.

Inputs: raw.

list_product_groupsA
Read-only

List product groups (category tree). Returns {productGroup[], pagination}.

Inputs: page, limit, filter_active, filter_parent_group.

list_productsA
Read-only

List catalog products with filters by name, active, group, price range. Returns pagination + array of {id, name, article, active, url, groups, offers}.

Inputs: raw, page, limit, filter_name, +4 more.

list_segmentsA
Read-only

List customer segments (RFM/marketing cohorts). Returns {segments[], pagination}.

Inputs: page, limit, filter_type, filter_active.

list_sitesA
Read-only

All sites/stores the API key can act on — use the returned code as the site param on multi-site create/edit.

Inputs: raw.

list_statusesA
Read-only

All order statuses (codes, names, groups, ordering). Call before filtering/updating orders by status.

Inputs: raw.

list_storesB
Read-only

All warehouses/stores (codes, names, types).

Inputs: raw.

merge_customersA
Destructive

Merge duplicate customers into a target; merged records are DELETED. Returns {success}.

Inputs: result_customer_id (required), merged_customer_ids (required).

order_payment_createA

Record a payment against an order (amount, type, status, paid_at). Returns {success, id}.

Inputs: type (required), amount (required), site, status, +3 more.

order_payment_deleteA
Destructive

Delete an order payment by id. Returns {success}.

Inputs: id (required).

order_payment_editA

Edit an existing order payment (amount/status/paid_at). Returns {success}.

Inputs: id (required), by, site, amount, +2 more.

orders_historyA
Read-only

Order change history incl. status transitions; supports incremental sync via filter_since_id and a date window. Returns {history[], pagination}.

Inputs: raw, page, limit, filter_date_to, +3 more.

store_inventoriesA
Read-only

Stock levels (and cost prices) per offer/warehouse. Use details:true for the per-store breakdown. Returns {offers[], pagination}.

Inputs: page, site, limit, details, +2 more.

tasks_createA

Create a task (text, due datetime, performer, linked order/customer). Returns {success, id}.

Inputs: text (required), site, datetime, order_id, +3 more.

tasks_editA

Edit a task or mark it complete. Returns {success}.

Inputs: id (required), site, text, complete, +3 more.

tasks_listA
Read-only

List follow-up tasks/reminders, filterable by status/performer/customer. Returns {tasks[], pagination}.

Inputs: page, limit, filter_status, filter_customer, +1 more.

update_customerA

Edit an existing customer (name, email, phones, address) by id or externalId. Only the fields you pass are sent. Returns {success}.

Inputs: id (required), by, site, email, +7 more.

update_orderA

Update an order (status, customer, delivery, comments). Only the fields you pass are sent. Returns {success}.

Inputs: id (required), by, site, email, +11 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 39 tools

    Disambiguation5/5

    Each tool targets a distinct operation (list, get, create, update, delete, history, summary) on a specific entity (orders, customers, products, payments, etc.). Descriptions clearly differentiate them, even where naming patterns vary.

    Naming Consistency3/5

    Tool names mix verb-first (e.g., list_orders, create_customer) and noun-first patterns (e.g., orders_history, customer_notes_list, order_payment_create). While readable, the inconsistency in naming convention increases ambiguity.

    Tool Count2/5

    With 39 tools, the surface is heavy. Many reference data tools (list_statuses, list_delivery_types) add bulk without deepening functionality. The count is unnecessarily high for the scope.

    Completeness2/5

    Several fundamental CRUD operations are missing: no order delete, no customer delete, no product create/update/delete, no note update, no task delete, no file delete. These gaps will hinder autonomous agent workflows in a retail CRM.

    Maintenance

    ActivityStale
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      MCP server for managing WooCommerce stores through AI assistants like Claude. Provides 101 tools covering products, orders, customers, coupons, shipping, taxes, webhooks, settings, reports, and more.
      100
      112 npm
      2
      MIT
    • A
      license
      C
      quality
      B
      maintenance
      MCP server for MoySklad (МойСклад) warehouse and CRM management API. 21 tools covering the full order lifecycle: products, stock, counterparties, customer orders, shipments, supplies, warehouses, organizations, reports, and webhooks.
      60
      70 npm
      10
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A production-ready MCP server for Method CRM API integration. It enables LLMs to interact with Method CRM data through tools for tables, files, users, events, and API key management.
      3
      MIT
    • A
      license
      B
      quality
      D
      maintenance
      Self-hosted MCP server that connects AI assistants to Kommo CRM (API v4), enabling real-time CRM actions such as creating/managing leads, tasks, notes, and more through 29 tools.
      29
      1
      MIT