diadoc-mcp-ru
Lets AI assistants explore and execute Kontur Diadoc API operations for electronic document flow, with safety-gated reads, writes, and destructive calls.
Discover the API: list sections, search 114 methods in Russian/English, view capability map and endpoint details.
Work with Diadoc documents: incoming/outgoing documents, document actions, statuses, print forms.
Manage counterparties, employees/users, organizations/boxes, messages, events, document shelf, and document flow.
Handle signing and machine-readable powers of attorney (MChD).
Generate and parse XML.
Execute read endpoints without confirmation; writes require confirm_write; destructive deletes require confirm_write plus i_understand_this_modifies_data.
Call arbitrary raw API paths: safe GET/HEAD/OPTIONS reads, POST/PUT/PATCH writes, DELETE destructive calls.
Auto-paginate read endpoints and fetch all rows with caps.
Check credentials and manage local cabinets: list, add, set/rotate key, switch, remove; secrets are not returned.
diadoc-mcp-ru
API Диадока для ИИ-ассистентов: входящие и исходящие документы, статусы документооборота, контрагенты и приглашения к ЭДО, подписание, МЧД, печатные формы.
Каталог собран из первоисточника (документация developer.kontur.ru/doc/diadoc-api) и лежит в репозитории как
diadoc_mcp/endpoints.yaml: 114 методов, из них 78 на чтение,
29 на запись и 7 необратимых. Сервер исполняет ровно этот файл,
поэтому таблица ниже не может разойтись с кодом.
Установка
Два пути, выбирайте по тому, есть ли у вас терминал.
Без терминала: файл .mcpb
Скачайте diadoc-mcp-ru-vX.Y.Z.mcpb со страницы релизов
и откройте двойным щелчком. Claude Desktop поставит сервер сам и спросит ключи
в отдельном окне, в конфиг лезть не придётся. Нужен Python 3.10 или новее:
зависимости сервер доставит себе при первом запуске.
В терминале
uvx diadoc-mcp-ruClaude Desktop, claude_desktop_config.json:
{
"mcpServers": {
"diadoc-mcp": {
"command": "uvx",
"args": ["diadoc-mcp-ru"],
"env": { "DIADOC_CLIENT_ID": "...", "DIADOC_TOKEN": "..." }
}
}
}Related MCP server: chestny-znak-mcp-ru
Ключи
Идентификатор приложения запрашивается у Контура письмом, для продуктива нужна лицензия, для проб есть тестовый контур. Токен пользователя выдаёт метод Authenticate по логину и паролю или по сертификату.
переменная | секрет | что это |
| нет | Идентификатор приложения Диадок, выдаёт Контур. |
| да | Токен пользователя Диадок, выдаёт метод Authenticate. |
Ключи можно не держать в окружении: сервер умеет кабинеты и кладёт их в
~/.ru-mcp/cabinets.json с правами 600, вне репозитория.
Карта методов
раздел | методов | чтение | запись | необратимое |
Документы | 17 | 10 | 5 | 2 |
Контрагенты | 14 | 8 | 4 | 2 |
Сотрудники и пользователи | 14 | 8 | 4 | 2 |
Сообщения | 11 | 6 | 5 | 0 |
Организации и ящики | 11 | 9 | 2 | 0 |
Машиночитаемая доверенность | 8 | 4 | 3 | 1 |
Подписание | 8 | 6 | 2 | 0 |
Генерация и разбор XML | 8 | 8 | 0 | 0 |
События | 7 | 6 | 1 | 0 |
Печатные формы | 6 | 6 | 0 | 0 |
Полка документов | 6 | 3 | 3 | 0 |
Документооборот | 4 | 4 | 0 | 0 |
всего | 114 | 78 | 29 | 7 |
Как это выглядит в чате
Вы: входящие документы
diadoc_search_methods("входящие документы")
diadoc_get_document GET /V3/GetDocument чтение
diadoc_get_documents GET /V3/GetDocuments чтение
diadoc_get_document_actions GET /GetDocumentActions чтение
diadoc_describe_method("diadoc_get_document")
Возвращает данные документа по указанному идентификатору.
GET diadoc-api.kontur.ru/V3/GetDocument
параметры: нет
класс доступа: чтение
diadoc_call_method("diadoc_get_document", {})Три инструмента вместо 114 функций: агент ищет метод словами, читает его карточку и вызывает. Запись и необратимое спрашивают подтверждение.
Что обычно просят:
Показать входящие документы, по которым нужно действие.
Свести документооборот с контрагентом за период.
Найти контрагента по ИНН и КПП и проверить, подключён ли он к ЭДО.
Скачать печатную форму документа для бухгалтерии.
Безопасность
Сервер работает на машине пользователя, ключи наружу не уходят. У методов три класса доступа: чтение идёт сразу, запись и необратимые действия требуют подтверждения. Заголовок авторизации не покидает домены сервиса даже при вызове произвольного пути.
Проверить установку
uvx diadoc-mcp-ru doctorПечатает, сколько методов загрузилось, найдены ли ключи и откуда. Секреты не
показывает. С --live делает один дешёвый реальный вызов на чтение.
Родня
Ядро вынесено в schema-mcp-core. Соседние серверы: vk-mcp-ru, sbis-mcp-ru, chestny-znak-mcp-ru. Маркетплейсы живут отдельно: marketplaces-mcp-ru.
MIT. Автор Илья Утов.
Все проекты одним списком, разобранные по назначению: ilyautov.github.io.
Privacy Policy
diadoc-mcp-ru не собирает и не передаёт ваши данные: ключи лежат локально в
~/.ru-mcp/cabinets.json, запросы идут только в API Диадок (Контур), телеметрии нет.
Полный текст: PRIVACY_POLICY.md.
Available Tools
18 toolsdiadoc_add_cabinetAIdempotent
Add or update a cabinet (a named set of API credentials), from chat.
⚠️ This puts the key into the chat transcript — requires i_understand_key_goes_to_chat=true. The terminal-free safe alternative is the installer (install.py / double-click), where the key never enters chat.
Args: credentials: dict with the required fields for this service ({fields}). For Ozon: {{"client_id": "...", "api_key": "..."}}; for WB: {{"token": "..."}}. name: optional label. If omitted, the cabinet is named after the real shop name fetched from the marketplace (falls back to "main"). i_understand_key_goes_to_chat: must be true to proceed. Saved to ~/.marketplace-mcp/cabinets.json (local, chmod 600), never echoed.
Inputs: credentials (required), name, i_understand_key_goes_to_chat. Returns: result
diadoc_call_methodARead-only
Execute one READ endpoint from the catalog by operation_id.
Target API: https://developer.kontur.ru/doc/diadoc-api.
Reads only: nothing here changes data, so it runs without confirmation. To change data use diadoc_write_method, to delete use diadoc_delete_method.
Args: operation_id: id from the catalog (see diadoc_search_methods). path_values: values for {placeholders} in the path. query: query-string parameters. body: JSON request body (a few read endpoints take one). Returns JSON: {"ok": true, "status", "data"} or the error envelope.
Inputs: operation_id (required), body, query, path_values. Returns: result
diadoc_check_authARead-only
Check whether the required credentials are present in the environment.
Does NOT reveal secret values — only reports which variables are set. Returns JSON: {"ready": bool, "missing": [str], "required": [str]}.
Inputs: no named parameters. Returns: result
diadoc_delete_methodADestructive
Execute one DESTRUCTIVE endpoint: deletes or irreversibly changes data.
Target API: https://developer.kontur.ru/doc/diadoc-api.
Both confirm_write=true and i_understand_this_modifies_data=true are required; nothing is sent without both.
Args: operation_id: id from the catalog (see diadoc_search_methods). path_values: values for {placeholders} in the path. query: query-string parameters. body: JSON request body. confirm_write: must be true. i_understand_this_modifies_data: must be true. Returns JSON: {"ok": true, "status", "data"} or the error envelope.
Inputs: operation_id (required), body, query, path_values, +2 more. Returns: result
diadoc_delete_rawADestructive
Delete data at ANY path, including paths not in the catalog.
Target API: https://developer.kontur.ru/doc/diadoc-api.
DELETE only. Both confirm_write=true and i_understand_this_modifies_data=true are required.
Args: path: full path beginning with '/'. method: DELETE. host: host override; defaults to the service's default host. query: query-string parameters. body: JSON request body. confirm_write: must be true. i_understand_this_modifies_data: must be true. Returns JSON: {"ok": true, "status", "data"} or the error envelope.
Inputs: path (required), body, host, query, +3 more. Returns: result
diadoc_describe_methodARead-only
Return the full catalog record for one endpoint: method, host, path, scope, safety level, pagination style, rate limit, params and doc URL.
Inputs: operation_id (required). Returns: result
diadoc_fetch_allARead-only
Auto-paginate a read endpoint and return every row in one response.
Handles offset, last_id, cursor (Ozon v4/v5), page and WB lastChangeDate styles. The array path is taken from the catalog automatically.
Args: operation_id: a read endpoint from the catalog. query / body / path_values: base parameters (cursor fields are managed). items_path: override the array path (default: the endpoint's own). limit: page size to request. max_items: hard cap to protect context (default 10000). Returns JSON: {"ok", "items", "total_fetched", "pages_fetched", "truncated"}.
Inputs: operation_id (required), body, limit, query, +3 more. Returns: result
diadoc_get_rawARead-only
Read ANY endpoint by path, including ones missing from the catalog.
Target API: https://developer.kontur.ru/doc/diadoc-api.
Safe verbs only (GET, HEAD, OPTIONS). To change data use diadoc_write_raw, to delete use diadoc_delete_raw.
Args: path: full path beginning with '/', e.g. "/GetBox". method: safe verb, GET by default. host: host override; defaults to the service's default host. query: query-string parameters. body: JSON request body (rare on reads; some APIs want one). Returns JSON: {"ok": true, "status", "data"} or the error envelope.
Inputs: path (required), body, host, query, +1 more. Returns: result
diadoc_get_sectionARead-only
List all endpoints in one section.
Args: section: section name (see diadoc_list_sections), e.g. "statistics". Returns JSON list of {operation_id, method, path, safety, summary}.
Inputs: section (required). Returns: result
diadoc_list_cabinetsARead-only
List configured cabinets for this marketplace and which one is active.
Returns JSON: {"active": str|null, "cabinets": [names], "fields_needed": [...]}. Secret values are never returned.
Inputs: no named parameters. Returns: result
diadoc_list_sectionsARead-only
List API sections and how many catalog endpoints each contains.
Inputs: no named parameters. Returns: result
diadoc_mapARead-only
The big picture: business entities this API covers and the go-to methods for each. Call with no args to see the whole map ("you are here"); pass entity="reviews" (or stocks/prices/orders/…) to list every method of one entity. Use this before guessing — it orients you fast.
Inputs: entity. Returns: result
diadoc_remove_cabinetADestructive
Delete a stored cabinet. If it was active, another becomes active.
Args: name: the cabinet to remove.
Inputs: name (required). Returns: result
diadoc_search_methodsARead-only
Search the endpoint catalog by keyword (works in Russian and English).
Args: query: free text, e.g. "остатки", "stocks", "update price". limit: max results (1-50). Returns JSON list of matching endpoints (best first).
Inputs: query (required), limit. Returns: result
diadoc_set_keyAIdempotent
Change / rotate the API key from chat (e.g. the old one expired or leaked).
⚠️ The key goes into the chat transcript — requires i_understand_key_goes_to_chat=true. The safe, terminal-free alternative is the installer, where the key never enters chat. Use a scoped key and rotate it in the seller cabinet if it was exposed.
Args: credentials: dict with the required fields ({fields}). cabinet: which cabinet to update. Default: the active one (so "my key expired" just works). If there is none, the cabinet is named from the marketplace's shop name, else "main". i_understand_key_goes_to_chat: must be true to proceed. On success the key is validated against the marketplace and the shop name is reported. Saved locally (chmod 600), never echoed back.
Inputs: credentials (required), cabinet, i_understand_key_goes_to_chat. Returns: result
diadoc_use_cabinetAIdempotent
Switch the active cabinet. Subsequent API calls use its credentials.
Args: name: the cabinet to activate (see diadoc_list_cabinets).
Inputs: name (required). Returns: result
diadoc_write_methodA
Execute one WRITE endpoint from the catalog: create or update data.
Target API: https://developer.kontur.ru/doc/diadoc-api.
Requires confirm_write=true; nothing is sent without it. Irreversible operations live in diadoc_delete_method, reads in diadoc_call_method.
Args: operation_id: id from the catalog (see diadoc_search_methods). path_values: values for {placeholders} in the path. query: query-string parameters. body: JSON request body. confirm_write: must be true. Returns JSON: {"ok": true, "status", "data"} or the error envelope.
Inputs: operation_id (required), body, query, path_values, +1 more. Returns: result
diadoc_write_rawA
Create or update data at ANY path, including paths not in the catalog.
Target API: https://developer.kontur.ru/doc/diadoc-api.
POST, PUT and PATCH only; requires confirm_write=true.
Args: method: POST, PUT or PATCH. path: full path beginning with '/'. host: host override; defaults to the service's default host. query: query-string parameters. body: JSON request body. confirm_write: must be true. Returns JSON: {"ok": true, "status", "data"} or the error envelope.
Inputs: path (required), method (required), body, host, +2 more. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 18 tools
There is meaningful overlap among the catalog discovery tools (list_sections, get_section, search_methods, map, describe_method) and between the catalog execution methods and raw-path execution methods (call_method vs get_raw, write_method vs write_raw). Descriptions do clarify the differences, but an agent could easily hesitate or misselect when deciding which discovery or execution tool to use.
The tools all share the diadoc_ prefix and mostly follow a verb_noun pattern (list_sections, add_cabinet, delete_method). A few deviations exist, such as diadoc_map (no verb) and diadoc_fetch_all, but overall the naming is predictable and readable.
18 tools is on the heavier side but each tool serves a distinct layer: catalog discovery, safe execution, destructive execution, raw fallback, pagination, and cabinet/auth management. The count is slightly over the ideal range but justified by the server's broad scope.
The tool surface covers the full lifecycle: credential checking, cabinet management, key rotation, catalog exploration, read/write/delete operations, raw endpoint access for uncataloged paths, and pagination. The raw execution tools guarantee that no API endpoint is unreachable, making the surface effectively complete for the stated purpose.
Maintenance
Related MCP Connectors
Document API for AI-native software: render PDFs, e-sign, PAdES-seal, and verify.
Create documents and reusable templates, request signatures, and track approvals — for AI agents.
Document AI and headless DMS: OCR, IDP, search, workflows, signatures. EU-hosted, OAuth 2.1.
Document sharing, invoicing, and personal finance platform. 15+ AI tools via OAuth 2.1.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI assistants to manage document signing workflows via natural language, including creating envelopes, uploading documents, analyzing contracts, and verifying blockchain anchors.12252 npm1MIT
- AlicenseAqualityBmaintenanceChestny ZNAK (Russian mandatory product marking, GIS MT and SUZ) API for AI assistants: marking codes, emission orders, circulation documents and code checks. 33 methods, each with a read/write/destructive safety class.184MIT
- AlicenseAqualityBmaintenanceSBIS (Saby) API for AI assistants: documents and their workflow stages, electronic signature, certificates, employees and organizations. 45 methods, each with a read/write/destructive safety class.186MIT
- AlicenseAqualityBmaintenanceVK API for AI assistants: wall posts, communities, messages, market items, ads and stats. 373 methods in one catalog, each with a read/write/destructive safety class; the agent searches methods in plain language instead of receiving 373 tools.183MIT