- Explore MCP Servers
- platform-context-exporter
Platform Context Exporter
What is Platform Context Exporter
The platform-context-exporter is a console application designed for developers working with the BSL (Business Specific Language) and the 1C:Enterprise ecosystem. It enables structured extraction of information from the help file shcntx_ru.hbk
, exporting it into various formats such as JSON, XML, Markdown, and context files for use with large language models (LLMs). Additionally, it provides an MCP (Model Context Protocol) server for real-time API access for AI assistants.
Use cases
This application can be used for several purposes, including providing contextual information for LLMs, assisting in code autocompletion in IDEs and editors, analyzing the structure of the 1C platform, and integrating with other development tools. The MCP server component enables AI assistants to search documentation and retrieve detailed API information in real-time.
How to use
To export platform context, use the command: java -jar platform-context-exporter-<version>.jar platform <path_to_shcntx_ru_hbk_dir> <output_directory>
. Replace the placeholders with the actual paths. Use --format <format>
to specify the output format. To run the MCP server for AI assistants, use: java -jar platform-context-exporter-<version>.jar mcp-server --platform-path <path_to_1C_platform>
. Include --verbose
for debug logging.
Key features
The platform-context-exporter offers structured context export from the shcntx_ru.hbk
file into multiple formats, integration for AI assistants via the MCP server, and support for searching and retrieving detailed API information. It is built with Spring Boot for robust server capabilities and utilizes Picocli for an intuitive CLI experience.
Where to use
This application is suitable for developers in the 1C:Enterprise ecosystem, especially those working with BSL. It can be integrated into development environments for enhanced productivity, utilized in IDEs for code support, or deployed as a service for AI assistants requiring access to 1C platform documentation and API details.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Platform Context Exporter
The platform-context-exporter is a console application designed for developers working with the BSL (Business Specific Language) and the 1C:Enterprise ecosystem. It enables structured extraction of information from the help file shcntx_ru.hbk
, exporting it into various formats such as JSON, XML, Markdown, and context files for use with large language models (LLMs). Additionally, it provides an MCP (Model Context Protocol) server for real-time API access for AI assistants.
Use cases
This application can be used for several purposes, including providing contextual information for LLMs, assisting in code autocompletion in IDEs and editors, analyzing the structure of the 1C platform, and integrating with other development tools. The MCP server component enables AI assistants to search documentation and retrieve detailed API information in real-time.
How to use
To export platform context, use the command: java -jar platform-context-exporter-<version>.jar platform <path_to_shcntx_ru_hbk_dir> <output_directory>
. Replace the placeholders with the actual paths. Use --format <format>
to specify the output format. To run the MCP server for AI assistants, use: java -jar platform-context-exporter-<version>.jar mcp-server --platform-path <path_to_1C_platform>
. Include --verbose
for debug logging.
Key features
The platform-context-exporter offers structured context export from the shcntx_ru.hbk
file into multiple formats, integration for AI assistants via the MCP server, and support for searching and retrieving detailed API information. It is built with Spring Boot for robust server capabilities and utilizes Picocli for an intuitive CLI experience.
Where to use
This application is suitable for developers in the 1C:Enterprise ecosystem, especially those working with BSL. It can be integrated into development environments for enhanced productivity, utilized in IDEs for code support, or deployed as a service for AI assistants requiring access to 1C platform documentation and API details.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
platform-context-exporter
Консольное приложение для экспорта информации о контексте платформы 1С:Предприятие (BSL) из файла справки shcntx_ru.hbk
в форматы JSON, XML, Markdown и context
для использования с LLM.
Обзор
Приложение platform-context-exporter
предназначено для разработчиков, работающих с языком BSL (Business Specific Language) и экосистемой 1С:Предприятие. Оно предоставляет два основных режима работы:
🔄 Экспорт контекста платформы
Извлечение структурированной информации о глобальных свойствах, глобальных методах и типах платформы из стандартного файла справки shcntx_ru.hbk
. Эта информация экспортируется в файлы различных форматов для использования в:
- Предоставлении контекста для больших языковых моделей (LLM) с помощью формата
context
- Автодополнении кода в IDE и редакторах
- Анализе структуры платформы
- Интеграции с другими инструментами разработки
🤖 MCP сервер для AI ассистентов
Интерактивный сервер, предоставляющий стандартизированный доступ к API платформы 1С Предприятие через протокол MCP (Model Context Protocol). Позволяет AI ассистентам выполнять поиск по документации и получать детальную информацию об элементах API в реальном времени.
Проект использует Picocli для создания удобного CLI-интерфейса и Spring Boot для MCP сервера.
Требования
Системные требования
- Java: версия 17 или выше
- Операционная система: Linux, macOS, Windows
- Память: минимум 512 МБ RAM для работы приложения
- Место на диске: 100 МБ для установки приложения
Для экспорта контекста платформы
- Платформа 1С Предприятие: любая версия (для доступа к файлу
shcntx_ru.hbk
) - Файл справки:
shcntx_ru.hbk
должен быть доступен в каталоге установки платформы
Для MCP сервера
- Платформа 1С Предприятие: версия 8.3.20 или выше (рекомендуется)
- MCP клиент: Claude Desktop, Cursor IDE или другой совместимый MCP клиент
- Сетевое подключение: для загрузки зависимостей при первом запуске
Зависимости времени выполнения
Все необходимые зависимости включены в исполняемый JAR-файл:
- Spring Boot 3.5.0
- Spring AI 1.0.0
- Jackson 2.15.2
- BSL Context Parser
- Picocli 4.7.5
Сборка
Проект собирается с помощью Gradle. Для сборки выполните следующую команду в корневой директории проекта:
./gradlew build
После успешной сборки исполняемый JAR-файл будет находиться в директории build/libs/
.
Использование
Приложение предоставляет два основных режима работы:
Экспорт контекста платформы (команда platform
)
java -jar platform-context-exporter-<версия>.jar platform <путь_к_shcntx_ru_hbk_dir> <путь_к_выходной_директории>
Аргументы:
platform
- основная команда для запуска экспорта<путь_к_shcntx_ru_hbk_dir>
(обязательный) - путь к директории, в которой находится файл справкиshcntx_ru.hbk
. Приложение будет искать этот файл внутри указанной директории (включая поддиректории)<путь_к_выходной_директории>
(обязательный) - путь к директории, в которую будут сохранены сгенерированные файлы. Если директория не существует, она будет создана
Опции:
--format <формат>
- задает формат выходных файлов. Возможные значения:json
(по умолчанию) - экспорт в файлы JSONxml
- экспорт в файлы XMLmarkdown
- экспорт в файлы формата Markdowncontext
- экспорт в файлы форматаcontext
для LLM
Пример:
java -jar platform-context-exporter-0.1.0.jar platform /path/to/onec/help/ /output/context/ --format context
MCP сервер для AI ассистентов (команда mcp-server
)
Приложение также предоставляет MCP (Model Context Protocol) сервер для интеграции с AI ассистентами, такими как Claude Desktop.
java -jar platform-context-exporter-<версия>.jar mcp-server --platform-path <путь_к_платформе_1С>
Параметры:
mcp-server
- команда для запуска MCP сервера--platform-path
(обязательный) - путь к каталогу установки 1С Предприятия--verbose
- включить отладочное логирование
Пример:
java -jar platform-context-exporter-0.1.0.jar mcp-server --platform-path "/opt/1cv8/x86_64/8.3.25.1257" --verbose
Возможности MCP сервера:
- Поиск по API платформы - нечеткий поиск по глобальным методам, свойствам и типам данных
- Детальная информация - получение полной информации об элементах API с сигнатурами и описаниями
- Интеграция с AI - стандартизированный доступ для AI ассистентов через MCP протокол
Подробная документация по использованию MCP сервера доступна в MCP_SERVER_USAGE.md.
Форматы вывода
Подробное описание форматов вывода и структуры генерируемых файлов вынесено в отдельную документацию.
Зависимости
Основные зависимости проекта:
- Spring Boot
- Picocli (для CLI)
- Jackson (для работы с JSON)
- bsl-context (от 1c-syntax)
- bsl-help-toc-parser (от 1c-syntax) для парсинга
shcntx_ru.hbk
- Lombok
Лицензия
Этот проект распространяется под лицензией MIT. Подробную информацию смотрите в файле LICENSE.
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.