- Explore MCP Servers
- mcp-1c-v1
Mcp 1c V1
What is Mcp 1c V1
MCP Server is a multi-component system designed to facilitate the extraction and querying of configuration data from 1C applications using a Retrieval-Augmented Generation (RAG) approach. It leverages various services like an Embedding Service for generating vector representations, a Loader for uploading data, and a Qdrant vector database for efficient querying and retrieval.
Use cases
MCP Server can be utilized for developing applications that require seamless integration with 1C configurations, allowing developers to query contextually relevant information from the configuration files. Use cases include building AI-driven tools for 1C developers, automating documentation retrieval, and enhancing code completion capabilities in IDEs.
How to use
To use MCP Server, first run all services using the provided start.sh
script. Then, export the configuration structure from 1C using the ПолучитьТекстСтруктурыКонфигурацииФайлами.epf
file. Afterwards, access the Loader web interface to upload the resulting archive. After processing, the data will be accessible for querying via the MCP Server.
Key features
Key features of MCP Server include a web interface for easy data uploads, an API for generating embeddings, integration with Qdrant for vector storage, and support for various environments and tools through environment variables. It also offers debugging capabilities and a dedicated inspector interface for monitoring server activities.
Where to use
MCP Server is best suited for development environments focused on 1C applications, particularly where interaction with configuration files is required. It’s ideal for integration with tools like VSCode and Cursor that support streaming HTTP protocols, enabling enhanced development features and AI assistants.
Overview
What is Mcp 1c V1
MCP Server is a multi-component system designed to facilitate the extraction and querying of configuration data from 1C applications using a Retrieval-Augmented Generation (RAG) approach. It leverages various services like an Embedding Service for generating vector representations, a Loader for uploading data, and a Qdrant vector database for efficient querying and retrieval.
Use cases
MCP Server can be utilized for developing applications that require seamless integration with 1C configurations, allowing developers to query contextually relevant information from the configuration files. Use cases include building AI-driven tools for 1C developers, automating documentation retrieval, and enhancing code completion capabilities in IDEs.
How to use
To use MCP Server, first run all services using the provided start.sh
script. Then, export the configuration structure from 1C using the ПолучитьТекстСтруктурыКонфигурацииФайлами.epf
file. Afterwards, access the Loader web interface to upload the resulting archive. After processing, the data will be accessible for querying via the MCP Server.
Key features
Key features of MCP Server include a web interface for easy data uploads, an API for generating embeddings, integration with Qdrant for vector storage, and support for various environments and tools through environment variables. It also offers debugging capabilities and a dedicated inspector interface for monitoring server activities.
Where to use
MCP Server is best suited for development environments focused on 1C applications, particularly where interaction with configuration files is required. It’s ideal for integration with tools like VSCode and Cursor that support streaming HTTP protocols, enabling enhanced development features and AI assistants.
Content
MCP сервер с RAG описанием структуры конфигурации 1С
Демонстрация запуска и использования на Youtube:
Проект состоит из нескольких сервисов для работы с векторной базой данных на основе документации 1C:
- Embedding Service - сервис генерации векторных представлений
- ПолучитьТекстСтруктурыКонфигурацииФайлами.epf - обработка для выгрузки структуры конфигурации 1С
- Loader - веб-интерфейс для загрузки архива выгрузки из 1С в векторную БД Qdrant
- MCP Server - сервер для ответов на вопросы с использованием RAG
Быстрый запуск
Запуск всех сервисов
chmod +x start.sh && chmod +x stop.sh
# Запуск всех сервисов
./start.sh
# Или вручную
docker-compose up --build
Остановка сервисов
# Остановка всех сервисов
./stop.sh
# Или вручную
docker-compose down
Доступные сервисы
После запуска будут доступны:
- Loader (Streamlit): http://localhost:8501 - веб-интерфейс для загрузки файлов
- Embedding Service: http://localhost:5000 - API для генерации эмбеддингов
- Qdrant: http://localhost:6333/dashboard - векторная база данных
- MCP Server: http://localhost:8000/mcp - сервер для ответов на вопросы
- MCP Inspector: http://localhost:6274 - веб-интерфейс проверки/отладки MCP серверов
Структура проекта
mcp-1c-v1/ ├── embeddings/ # Сервис генерации эмбеддингов │ ├── Dockerfile │ ├── embedding_service.py │ ├── config.json │ └── requirements.txt ├── loader/ # Веб-интерфейс для загрузки данных │ ├── Dockerfile │ ├── loader.py │ ├── config.py │ └── requirements.txt ├── mcp/ # MCP 1С RAG сервер │ ├── Dockerfile │ ├── mcp_server.py │ ├── config.py │ └── requirements.txt ├── inspector/ # MCP Inspector │ ├── Dockerfile │ ├── mcp_server.py │ ├── config.py │ └── requirements.txt ├── ПолучитьТекстСтруктурыКонфигурацииФайлами.epf # Обработка для 1С для выгрузки структуры ├── docker-compose.yml # Конфигурация всех сервисов ├── start.sh # Скрипт запуска └── stop.sh # Скрипт остановки
Использование
- Запустите все сервисы:
./start.sh
- Выгрузите описание структуры конфигурации из 1С:
ПолучитьТекстСтруктурыКонфигурацииФайлами.epf
- Откройте веб-интерфейс загрузчика: http://youraddress:8501
- Загрузите ZIP-архив с markdown файлами и файлом objects.csv
- Нажмите “Начать обработку”
- После загрузки данные будут доступны в Qdrant для поиска через MCP Server
Для агентов (Cursor, RooCode) поддерживающих современный протокол Streamable HTTP, указываем: http://youaddress:8000/mcp
Для VSCode Copilot, хоть и заявлена поддержка Streamable HTTP, но у меня работает только как SSE, поэтому указывал: http://youraddress:8000/mcp/sse
Для VSCode Copilot …/YourProject/.vscode/mcp.json
{
"servers": {
"my-1c-mcp-server": {
"url": "http://youraddress:8000/mcp/sse"
}
}
}
Для Cursor …/YourProject/.cursor/mcp.json
{
"servers": {
"my-1c-mcp-server": {
"url": "http://youraddress:8000/mcp"
}
}
}
Переменные окружения
Можно настроить через переменные окружения:
EMBEDDING_SERVICE_URL
- URL сервиса эмбеддингов (по умолчанию: http://localhost:5000)QDRANT_HOST
- хост Qdrant (по умолчанию: localhost)QDRANT_PORT
- порт Qdrant (по умолчанию: 6333)COLLECTION_NAME
- имя коллекции в Qdrant (по умолчанию: 1c_rag)ROW_BATCH_SIZE
- размер батча строк (по умолчанию: 250)EMBEDDING_BATCH_SIZE
- размер батча эмбеддингов (по умолчанию: 50)
Отладка
Для просмотра логов отдельного сервиса:
# Логи конкретного сервиса
docker-compose logs -f loader
docker-compose logs -f embedding-service
docker-compose logs -f qdrant
docker-compose logs -f mcp-server
# Логи всех сервисов
docker-compose logs -f