onec-odata-mcp
This server provides natural language read (and optionally write) access to a 1C:Enterprise database via its standard OData endpoint — no manual URL construction needed.
Check connection (
odata_config): Verify the 1C OData connection is configured correctly and view setup instructions.List entities (
odata_list_entities): Discover all available OData entities (catalogs, documents, registers, etc.) published by the 1C database.Fetch metadata (
odata_metadata): Retrieve entity types and sets from the$metadataendpoint, with built-in caching (default TTL: 1 hour) and optional forced refresh.Explain an entity (
odata_explain_entity): Get detailed field definitions, data types, primary keys, and navigation/relation properties for a specific entity.Build validated queries (
odata_build_query): Construct and validate OData query parameters ($filter,$select,$orderby,$expand,$top, date periods) from structured intent.Query data (
odata_query): Execute queries against a 1C OData entity with full support for filtering, field selection, sorting, pagination, and expanding navigation properties.Count records (
odata_count): Get the number of records in any entity, optionally filtered by an OData$filterexpression.Financial summary (
odata_financial_summary): Auto-detect common 1C financial entities (accounts, sales, counterparties, orders) and display record counts as a quick overview.Write data (
odata_write— disabled by default): Create, update, or delete entities via POST/PATCH/DELETE. Always previews as a dry-run first; real writes require bothONEC_WRITABLE=trueand explicitdryRun: false.
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., "@onec-odata-mcp List invoices from last week"
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.
onec-odata-mcp
Подключи 1С к Claude за 5 минут
Даёт Claude (Desktop, Code, любой MCP-клиент) доступ на чтение к базе 1С:Предприятие через стандартный OData. Вместо выгрузки в Excel или ручного написания OData-урлов — спрашиваешь по-русски, получаешь структурированные данные из справочников и документов.
Работает с любой конфигурацией 1С, где опубликован OData (Бухгалтерия, ERP, Управление торговлей, самописные конфигурации).
📸 TODO: скриншот/видео 5-минутной настройки — добавить после первого прогона с реальной базой.
Шаг 1 — установка
Ничего ставить локально не нужно, npx подтянет пакет при первом запуске:
One-liner (after npm publish):
npx -y onec-odata-mcpSet ONEC_BASE_URL, ONEC_USERNAME, and ONEC_PASSWORD in your MCP client config (see below).
From source:
npx -y onec-odata-mcp(Для разработки из исходников: npm install && npm run build.)
Шаг 2 — подключи к Claude
Вариант А — командой claude mcp add (Claude Code):
claude mcp add onec-odata \
-e ONEC_BASE_URL=https://1c.example.com/your_db/odata/standard.odata \
-e ONEC_USERNAME=odata_user \
-e ONEC_PASSWORD=your_password \
-- npx -y onec-odata-mcpВариант Б — вручную в claude_desktop_config.json (Claude Desktop: Settings → Developer → Edit Config):
{
"mcpServers": {
"onec-odata": {
"command": "npx",
"args": ["-y", "onec-odata-mcp"],
"env": {
"ONEC_BASE_URL": "https://1c.example.com/your_db/odata/standard.odata",
"ONEC_USERNAME": "odata_user",
"ONEC_PASSWORD": "your_password"
}
}
}
}Готовый сниппет лежит в examples/claude_desktop_config.json.
Опционально: ONEC_DATABASE (подсказка имени базы), ONEC_METADATA_CACHE_TTL_MS (TTL кэша метаданных, по умолчанию 1 час), ONEC_WRITABLE=true (разрешить реальную запись через odata_write; по умолчанию false). Либо вместо переменных окружения — JSON-файл ~/.onec-odata/onec-config.json с полями baseUrl, username, password (и опционально "writable": true), путь к которому задаётся через ONEC_CONFIG_PATH.
Шаг 3 — первый запрос
Перезапусти Claude и спроси:
«Какие справочники и документы есть в базе 1С?»
Claude вызовет odata_list_entities, увидит список и дальше сам подберёт нужные инструменты под конкретный вопрос — без знания синтаксиса OData с твоей стороны.
Больше готовых промптов — в examples/prompts.md.
Related MCP server: bas-mcp-server
Инструменты
Инструмент | Что делает | Пример вопроса |
| Проверяет статус подключения и настройки | «Проверь, подключена ли 1С» |
| Список всех доступных OData-сущностей | «Какие справочники и документы есть в базе?» |
| Типы и наборы сущностей из | вызывается автоматически перед сложными запросами |
| Поля, типы, ключи, связи конкретной сущности | «Какие поля у справочника Контрагенты?» |
| Строит и проверяет | вызывается автоматически — Claude сам переводит «за июнь» в даты, тул собирает и валидирует фильтр |
| Запрос к сущности с готовыми OData-параметрами | «Покажи остатки по счёту 51 за июнь» |
| Количество записей, опционально с фильтром | «Сколько контрагентов зарегистрировано в этом году?» |
| Создание/изменение/удаление сущности (POST/PATCH/DELETE) | «Создай контрагента…» — сначала dry-run-превью |
| Автообнаружение типовых финансовых сущностей + счётчики | «Дай сводку по счетам, реализациям и контрагентам» |
Обычно агент сам комбинирует odata_build_query → odata_query/odata_count, тебе достаточно спросить своими словами.
Безопасность
По умолчанию только чтение. Флаг
writableв конфиге базы (envONEC_WRITABLE=true/"writable": trueв~/.onec-odata/onec-config.json) по умолчанию false. Без него реальныеPOST/PATCH/DELETEне уходят в 1С.Запись — только через
odata_write. У инструментаdryRunпо умолчанию true: всегда сначала превью{dryRun: true, wouldExecute: …}без сетевого вызова. Реальная запись требует иwritable: trueна этой базе, и явногоdryRun: false.Пароль передаётся Basic Auth (base64 в заголовке каждого запроса — как требует OData) и хранится либо в env-переменных конфига твоего MCP-клиента (рекомендуется), либо в локальном файле
~/.onec-odata/onec-config.json. Сервер не логирует и не возвращает пароль в ответах инструментов.Поля-секреты (
password,token,apikey,secretи т.п. в названиях) автоматически исключены из подсказок «возможно, вы имели в виду» (src/query/fuzzy.ts), чтобы агент не подсвечивал их случайно.Рекомендация: заведи в 1С отдельного OData-пользователя с ролью только на чтение для обычной работы; writable-учётку и
ONEC_WRITABLE=trueвключай только осознанно.
Требования
Node.js ≥ 18
1С:Предприятие с опубликованным OData-интерфейсом (веб-публикация →
standard.odata)
Разработка
npm install
npm run build # type-check + сборка в dist/
npm testДетали и правила вклада — в CONTRIBUTING.md.
License
MIT
English (short)
MCP server giving Claude (or any MCP client) access to a 1C:Enterprise database via its standard OData endpoint. Read-only by default (writable: false); writes go through odata_write and always dry-run first unless you explicitly enable writable: true and pass dryRun: false. No spreadsheet exports, no hand-written OData URLs — ask in natural language, get structured data from catalogs and documents.
npx -y onec-odata-mcpConfigure via ONEC_BASE_URL / ONEC_USERNAME / ONEC_PASSWORD env vars (see the Russian quick-start above for claude mcp add and claude_desktop_config.json snippets — the JSON is language-agnostic). Optional: ONEC_WRITABLE=true to allow real writes. Published on npm as onec-odata-mcp and listed in the official MCP Registry as io.github.alexgrebeshok-coder/onec-odata-mcp.
Available Tools
8 toolsodata_build_queryA
Build validated OData query parameters from structured intent (filters, date period, sort, top). Returns params for odata_query + human explanation.
Inputs: entity (required), top, expand, select, +3 more.
odata_configA
Check 1С OData configuration status and setup instructions
Inputs: no named parameters.
odata_countB
Count records in an OData entity, optionally with filter
Inputs: entity (required), filter.
odata_explain_entityB
Describe entity fields, types, keys and navigation properties from metadata
Inputs: entity (required).
odata_financial_summaryA
Auto-detect common 1С financial entities (счета, реализации, контрагенты, заявки) and show counts
Inputs: no named parameters.
odata_list_entitiesB
List all available OData entities from 1С
Inputs: no named parameters.
odata_metadataA
Get entity types and entity sets from 1С metadata (cached, TTL default 1h)
Inputs: refresh.
odata_queryA
Query 1С OData entity with filter, select, top, orderBy, expand. Example: entity="Catalog_Контрагенты" filter="Description eq 'ООО Ромашка'"
Inputs: entity (required), top, expand, filter, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
All eight tools have clearly distinct purposes: building query parameters, counting records, explaining entity fields, summarizing financial entities, listing entities, retrieving metadata, checking configuration, and executing queries. There is no overlap or ambiguity between tools.
All tools use the consistent 'odata_' prefix in snake_case, but the second part mixes verbs (build, count, explain, list, query) and nouns (config, financial_summary, metadata). A fully consistent pattern would use verbs consistently (e.g., odata_get_config, odata_get_metadata).
With 8 tools, the set is well-scoped for interacting with 1C OData services. It covers listing, querying, metadata retrieval, configuration check, and specialized financial summarization without being bloated or too sparse.
The set covers core read operations (list, query, count, metadata, config) and adds a specialized financial summary. Missing are create/update/delete operations, but these may be out of scope. A minor gap is the lack of a direct 'get entity by ID' tool, though query with filter can achieve this.
Maintenance
Related MCP Connectors
Read-only access to a company's ERP for Claude, ChatGPT and Gemini, with OAuth and an audit trail.
Odoo ERP for AI agents: hosted OAuth endpoint, gated writes, one endpoint for every instance.
Вопросы ИИ о данных ваших баз 1С:Предприятие — с вашими правами пользователя 1С.
AI agents for CRM, mail, calendar, ERP and accounting - you approve. EU-hosted, OAuth.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with 1C:Enterprise databases through natural language, providing metadata retrieval, configuration analysis, and code generation.9-
- AlicenseAqualityDmaintenanceEnables AI agents to interact with 1С:Enterprise and BAS ERP systems through REST and HTTP services, providing tools for searching catalogs, creating documents, and querying stock balances.6ISC
- AlicenseNot gradedqualityDmaintenanceGive an AI agent eyes into your 1C:Enterprise 8.3 base — read metadata & data, run queries, and diagnose why a document won't post — over one extension HTTP service.MIT
- AlicenseNot gradedqualityBmaintenanceEnables users to ask natural-language questions about live 1C:Enterprise data and receive answers from read-only OData sources, covering sales, inventory, items, and counterparties; supports direct connections or an SSH tunnel for IP-allowlisted installations.9MIT