Skip to main content
Glama

MCP-сервер для Честного Знака — проверка маркировки товаров через ИИ

Если вы искали, как проверить код маркировки Честного Знака не заходя в личный кабинет, подключить True API ЦРПТ к нейросети или узнать статус товара прямо в чате — это оно. 5 инструментов: публичные проверки кодов работают сразу, без регистрации и токена; данные True API — по токену. Присылаете код DataMatrix — получаете статус, владельца и историю вместо вкладки с формой.

npm License: MIT

Часть серии WWmcp (46 серверов) by @theYahia.

Установка

Claude Desktop

{
  "mcpServers": {
    "chestnyznak": {
      "command": "npx",
      "args": ["-y", "@theyahia/chestnyznak-mcp"]
    }
  }
}

Claude Desktop (с авторизацией)

{
  "mcpServers": {
    "chestnyznak": {
      "command": "npx",
      "args": ["-y", "@theyahia/chestnyznak-mcp"],
      "env": {
        "CHESTNYZNAK_TOKEN": "ваш-токен"
      }
    }
  }
}

Claude Code

claude mcp add chestnyznak -- npx -y @theyahia/chestnyznak-mcp

# С авторизацией
CHESTNYZNAK_TOKEN=ваш-токен claude mcp add chestnyznak -- npx -y @theyahia/chestnyznak-mcp

Streamable HTTP

npx @theyahia/chestnyznak-mcp --http --port=3000
# Endpoint: POST http://127.0.0.1:3000/mcp
# Health:   GET  http://127.0.0.1:3000/health

По умолчанию HTTP-сервер слушает только 127.0.0.1 и проверяет заголовок Host (защита от DNS-rebinding). Чтобы открыть наружу — --host=0.0.0.0 (на свой риск, аутентификации на /mcp нет).

Related MCP server: Kettu Marketplace Intelligence

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

Переменная

Обязательна

Описание

CHESTNYZNAK_TOKEN

Нет

Токен True API для инструментов search_products, get_cis_info. См. «Авторизация».

CHESTNYZNAK_BASE_URL

Нет

Origin авторизованного API (по умолчанию https://markirovka.crpt.ru). Допускаются только https хосты *.crpt.ru / *.crptech.ru.

CHESTNYZNAK_PUBLIC_BASE_URL

Нет

Базовый URL публичного API (по умолчанию https://mobile.api.crpt.ru/mobile). Удобно для моков в тестах.

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

Публичные (без авторизации)

Инструмент

Аргументы

Описание

check_marking_code

code, codeType?

Проверка подлинности по коду маркировки

get_product_info

code, codeType?

Подробная информация: название, группа, производитель, владелец

check_batch

codes[], codeType?

Пакетная проверка до 50 кодов (параллелизм ограничен)

codeType — datamatrix (по умолчанию), qr или ean13.

Авторизованные (CHESTNYZNAK_TOKEN)

Инструмент

Аргументы

Описание

search_products

query (GTIN)

Информация о товаре по GTIN из True API

get_cis_info

cis

Информация о CIS (коде идентификации) из True API

Поиск по названию/бренду — это Национальный каталог (nk.crpt.ru), отдельный API; здесь не поддерживается. search_products работает по GTIN.

Формат ответа

check_marking_code:

{ "code": "0104600702028445", "found": true, "valid": true, "status": "INTRODUCED" }

get_product_info (поля producer/owner/status берутся из вложенного объекта группы товара, при отсутствии — null):

{
  "code": "0104600702028445",
  "found": true,
  "valid": true,
  "status": "INTRODUCED",
  "productName": "Молоко 3.2%",
  "category": "milk",
  "producerName": "АО \"Данон Россия\"",
  "ownerName": "ООО Магнит",
  "ownerInn": "2309085638"
}

status — строковый enum: EMITTED / APPLIED / INTRODUCED / RETIRED / WRITTEN_OFF / DISAGGREGATION и др.

Каждый инструмент дополнительно возвращает structuredContent (типизированный объект по outputSchema), помимо текстового JSON.

Примеры

Проверь код маркировки 0104600702028445
Расскажи подробнее о товаре с кодом 010460070202844521
Проверь пачку кодов: 0104600702028445, 0104600702028446
Информация о товаре с GTIN 04600702028445
Информация о CIS 0104600702028445

Авторизация (True API)

⚠️ Важно: у True API (ГИС МТ) нет статичного «вечного» токена. Токен получают по схеме «запрос-подпись» сертификатом УКЭП (ГОСТ):

  1. GET /api/v3/true-api/auth/key → { uuid, data }

  2. Подписать data сертификатом УКЭП (CAdES-BES, base64).

  3. POST /api/v3/true-api/auth/simpleSignIn { uuid, data: <подпись> } → токен.

  4. Срок жизни токена — не более ~10 часов, далее повторная авторизация.

Этот сервер использует CHESTNYZNAK_TOKEN как уже полученный таким образом токен (он отправляется как Authorization: Bearer). Подпись УКЭП выполняется вне сервера (например, через КриптоПро) — встроенного ГОСТ-подписания здесь нет. Регистрация доступна юрлицам/ИП на markirovka.crpt.ru.

Эндпоинты/методы авторизованной части (пути, тело запроса) выверены по официальной документации и открытым клиентам, но не проверены против живого токена из-за требования УКЭП. Если ЦРПТ изменит контракт — поправьте через CHESTNYZNAK_BASE_URL.

Skills

Skill

Триггер

skill-check-product

«Проверь маркировку товара по коду»

skill-search

«Найди товар по GTIN»

Troubleshooting

Симптом

Причина / решение

CHESTNYZNAK_TOKEN не задан

Инструменты search_products/get_cis_info требуют токен (см. «Авторизация»).

таймаут запроса / все попытки исчерпаны

Сеть/недоступность API; сервер делает до 3 попыток с backoff. Публичный API может не отвечать с не-РФ IP.

HTTP 401 / HTTP 403

Токен невалиден или истёк (~10ч) — получите заново.

HTTP 429

Рейт-лимит; сервер повторяет автоматически. Для batch уменьшите размер пачки.

CHESTNYZNAK_BASE_URL отклонён

Override должен быть https и хостом *.crpt.ru/*.crptech.ru.

API

  • Публичный (без авторизации): GET https://mobile.api.crpt.ru/mobile/check?code=<код>&codeType=<тип> — недокументированный эндпоинт мобильного приложения.

  • Авторизованный (Bearer): https://markirovka.crpt.ru/api/v3/true-api/... — True API (ГИС МТ).

Разработка

npm ci
npm run typecheck   # tsc --noEmit (src + tests)
npm test            # vitest
npm run build       # tsc -> dist/
npm run dev         # tsx watch (stdio)
npm run dev:http    # tsx watch (HTTP)

Лицензия

MIT


Часть WWmcp · Telegram: @vhodvai

Available Tools

5 tools
check_batchA

Пакетная проверка до 50 кодов маркировки за один запрос.

ParametersJSON Schema
NameRequiredDescriptionDefault
codesYesМассив кодов маркировки (до 50 штук) для пакетной проверки
codeTypeNoТип кода: datamatrix (по умолчанию), qr или ean13datamatrix

Output Schema

ParametersJSON Schema
NameRequiredDescription
totalYes
resultsYes

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full disclosure burden. It reveals only the batch-size ceiling and the one-request behavior, but does not state whether checking is read-only, whether codes are consulted against an external registry, what happens on partial failure, or any result-shape caveats. The 50-code limit mostly restates maxItems from the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence that leads with the most decision-relevant facts: batch operation, the 50-code limit, and the one-request scope. Every word carries information and there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple (two params, one enum, output schema present) and the schema covers parameters well. However, with zero annotations, the absence of behavioral detail and the lack of an explicit routing rule against check_marking_code leave a meaningful gap for an agent deciding which tool to invoke.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%: both 'codes' (min/max items) and 'codeType' (enum with default) are fully documented in the schema. The description restates the 50-code cap without adding new semantic meaning, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb+resource combination: batch checking of marking codes, with a hard limit of 50 per request. The 'Пакетная' (batch) qualifier and the explicit count distinguish it from the sibling check_marking_code, which by naming convention implies single-code checking.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The batch framing implies this tool is for checking multiple codes at once, but there is no explicit when/when-not guidance. It never names the single-code alternative check_marking_code, nor states conditions such as 'use this for ≤50 codes; use check_marking_code for a single code'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

check_marking_codeA

Проверка подлинности товара по коду маркировки Честный ЗНАК.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYesКод маркировки товара (DataMatrix, QR, штрихкод EAN-13)
codeTypeNoТип кода: datamatrix (по умолчанию), qr или ean13datamatrix

Output Schema

ParametersJSON Schema
NameRequiredDescription
codeYes
foundYes
validYes
statusYes

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the full burden of disclosing behavior. It only states 'verification of authenticity' without revealing whether the tool performs a remote lookup, reads from a database, or has any side effects or limitations. This is a significant gap for a tool with no annotation safety hints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no filler or repetition. It efficiently communicates the core purpose in minimal words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity, the schema and output schema cover parameters and return values. However, the description lacks usage context and sibling differentiation, so an agent may not know when to choose this over get_cis_info, which also operates on codes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3; both parameters are already documented with descriptions and the codeType enum. The tool description adds no additional parameter guidance beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Проверка' – verification) and a specific resource ('подлинность товара по коду маркировки Честный ЗНАК' – product authenticity by Honest Sign marking code). This clearly distinguishes it from siblings like get_product_info or check_batch, which target different operations and data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is for verifying product authenticity by a marking code, but it does not explicitly state when to use it instead of siblings such as get_cis_info or check_batch. There are no exclusions or alternative routes mentioned, leaving the agent to infer usage from the purpose statement.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_cis_infoB

Информация о CIS (коде идентификации) из True API. Требует CHESTNYZNAK_TOKEN.

ParametersJSON Schema
NameRequiredDescriptionDefault
cisYesCIS (код идентификации) для получения информации из True API

Output Schema

ParametersJSON Schema
NameRequiredDescription
cisYes
gtinYes
statusYes
producerInnYes
productNameYes
producerNameYes

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It usefully mentions the CHESTNYZNAK_TOKEN requirement, but it does not state whether the operation is read-only, what errors may occur, or how the response is structured.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is one short, front-loaded sentence that states the tool's purpose and the token requirement without any filler or redundant information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple single-parameter getter with an output schema, the description provides the essential context: the data source and the authentication requirement. It lacks sibling differentiation, but that is not critical for invoking the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already describes the cis parameter fully (100% coverage), so the description adds no additional meaning about the parameter's format, constraints, or usage beyond what the schema provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states that the tool provides information about a CIS from True API and names the required authentication token. It identifies the resource and source, but does not explicitly use a verb or differentiate itself from siblings like check_marking_code.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives no guidance on when to use this tool versus sibling tools such as check_marking_code or get_product_info. It only implies use when a CIS is available and True API information is needed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_product_infoA

Подробная информация о товаре по коду маркировки: название, группа, производитель, владелец.

ParametersJSON Schema
NameRequiredDescriptionDefault
codeYesКод маркировки товара (DataMatrix, QR, штрихкод EAN-13)
codeTypeNoТип кода: datamatrix (по умолчанию), qr или ean13datamatrix

Output Schema

ParametersJSON Schema
NameRequiredDescription
codeYes
foundYes
validYes
statusYes
categoryYes
ownerInnYes
ownerNameYes
productNameYes
producerNameYes

TDQS

A3.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

There are no annotations, so the description carries the full burden of behavioral disclosure. The word 'информация' clearly indicates a read-only lookup, and the description enumerates the returned attributes. It does not mention auth, rate limits, or error behavior, but for a non-mutating information retrieval tool the core behavior is adequately disclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence that immediately states the tool's purpose and key output fields. There is no filler or redundant content, and it is well-structured for quick parsing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the low complexity, complete parameter schema, and presence of an output schema, the description is largely sufficient for invocation. The main gap is not clarifying how it differs from get_cis_info, but that is more of a usage-guidance gap than a completeness gap for a simple read tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%: both 'code' and 'codeType' have descriptive text and enum definitions. The description adds no new parameter-level meaning beyond restating that the input is a marking code, which is already in the schema, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific action — retrieving detailed product information — and the resource (product by marking code). It lists the returned fields (name, group, manufacturer, owner), which helps distinguish it from batch or code validation tools. However, it does not explicitly differentiate it from the sibling tool get_cis_info, so it stops short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided about when to use this tool instead of alternatives like check_marking_code, check_batch, or get_cis_info. The description only defines what the tool does, with no exclusions or recommendations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_productsA

Информация о товаре по GTIN из True API. Требует CHESTNYZNAK_TOKEN. (Поиск по названию — Нацкаталог, вне API.)

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesGTIN товара (14 цифр). Поиск по названию/бренду требует Нацкаталог — вне API.

Output Schema

ParametersJSON Schema
NameRequiredDescription
queryYes
totalYes
resultsYes

TDQS

A3.7/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries the full burden. It discloses the authentication requirement and the data source, which is useful context beyond the schema. It does not mention behavior such as response shape, errors, or rate limits, though an output schema exists to cover the return format.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two short sentences with no filler: purpose first, then authentication, then an exclusion. Every clause earns its place and the most identifying fact (GTIN lookup from True API) is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter lookup with an output schema, the description covers purpose, auth, and a key limitation. The main gap is the lack of disambiguation from sibling tools, particularly get_product_info, which may overlap in purpose. This leaves tool selection partially incomplete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%; the input schema already documents query as a 14-digit GTIN and warns that name/brand search is outside the API. The tool description only restates this same information without adding any new parameter-level semantics, so the baseline score of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description's first phrase 'Информация о товаре по GTIN из True API' gives a specific operation: look up product information by GTIN from a specific API. It also explicitly excludes name/brand search, but it does not differentiate from the sibling get_product_info, so an agent may still be unsure which product-info tool to choose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states the prerequisite CHESTNYZNAK_TOKEN and gives an explicit when-not-to-use condition: name/brand searching requires the National Catalog outside the API. However, it does not point to any sibling tool as an alternative, so the guidance is clear but not fully tied to the available toolset.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 5 tool updatesv1.2.0
    • First observedcheck_batch
    • First observedcheck_marking_code
    • First observedget_cis_info
    • First observedget_product_info
    • First observedsearch_products

TDQS

A3.6/5.0

Scored across 5 tools

Disambiguation2/5

check_marking_code, check_batch, and get_cis_info have unclear boundaries: all appear to work with marking/CIS codes and return overlapping verification/information data. get_product_info also overlaps with get_cis_info for code-based product details; only search_products is clearly distinct via GTIN.

Naming Consistency5/5

All tool names follow a consistent snake_case verb_noun pattern: check/get/search + resource. The naming is predictable and easy to navigate.

Tool Count5/5

Five tools form a compact, well-scoped set for a marking-code verification and product information service. There is no bloat or obvious redundancy in count.

Completeness4/5

Core operations are covered: single-code verification, detailed product info, batch checks, GTIN lookup, and CIS info. Minor gaps exist, such as no batch-level product details or GTIN lookup without a token, but the main workflow is supported.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    MCP server for Russia's Chestnyi Znak product labelling system, allowing AI assistants to query marking codes, documents, warehouse balances, and participant data via natural language.
    10
    45 npm
    3
    -
  • F
    license
    A
    quality
    D
    maintenance
    Enables querying authoritative product data from GS1 Brasil's Verified by GS1 API via GTIN, including brand, description, classifications, images, weights, dimensions, and licensee details, with support for national and international bases and batch enrichment.
    4
    -