Content
# MCP Server with RAG Description of 1C Configuration Structure
Demonstration of launch and usage on Youtube:
[](http://www.youtube.com/watch?v=74kYcK6bvGk)
[**More details in the article**](https://github.com/FSerg/mcp-1c-v1/blob/main/article/article.md ).
The project consists of several services for working with a vector database based on 1C documentation:
1. **Embedding Service** - service for generating vector representations
2. **ПолучитьТекстСтруктурыКонфигурацииФайлами.epf** - processing for unloading the 1C configuration structure
3. **Loader** - web interface for loading the upload archive from 1C into the Qdrant vector database
4. **MCP Server** - server for answering questions using RAG
## New features
### 🚀 Multivector search
MCP server now supports multivector search using RRF (Reciprocal Rank Fusion):
- **Two vector representations**: `object_name` and `friendly_name` for each object
- **RRF algorithm**: automatic merging of search results across different vectors
- **Improved accuracy**: more relevant search results
- **Backward compatibility**: ability to disable multivector search
📖 [More about multivector search](mcp/MULTIVECTOR_SEARCH.md)
## Quick start
### Launching all services
```bash
chmod +x start.sh && chmod +x stop.sh
# Launching all services
./start.sh
# Or manually
docker-compose up --build
```
### Stopping services
```bash
# Stopping all services
./stop.sh
# Or manually
docker-compose down
```
## Available services
After launch, the following will be available:
- **Loader (Streamlit)**: http://localhost:8501 - web interface for loading files
- **Embedding Service**: http://localhost:5000 - API for generating embeddings
- **Qdrant**: http://localhost:6333/dashboard - vector database
- **MCP Server**: http://localhost:8000/mcp - server for answering questions
- **MCP Inspector**: http://localhost:6274 - web interface for checking/debugging MCP servers
## Project structure
```
mcp-1c-v1/
├── embeddings/ # Embedding generation service
│ ├── Dockerfile
│ ├── embedding_service.py
│ ├── config.json
│ └── requirements.txt
├── loader/ # Web interface for loading data
│ ├── Dockerfile
│ ├── loader.py
│ ├── config.py
│ └── requirements.txt
├── mcp/ # MCP 1C RAG server
│ ├── Dockerfile
│ ├── mcp_server.py
│ ├── config.py
│ └── requirements.txt
├── inspector/ # MCP Inspector
│ ├── Dockerfile
│ ├── mcp_server.py
│ ├── config.py
│ └── requirements.txt
├── ПолучитьТекстСтруктурыКонфигурацииФайлами.epf # 1C processing for unloading the structure
├── docker-compose.yml # Configuration of all services
├── start.sh # Startup script
└── stop.sh # Shutdown script
```
## Usage
1. Launch all services: `./start.sh`
2. Unload the configuration structure description from 1C: `ПолучитьТекстСтруктурыКонфигурацииФайлами.epf`
3. Open the web interface of the loader: http://youraddress:8501
4. Upload the ZIP archive with markdown files and the objects.csv file
5. Click "Start processing"
6. After loading, the data will be available in Qdrant for searching via MCP Server
For agents (Cursor, RooCode) that support the modern Streamable HTTP protocol, specify: http://youaddress:8000/mcp
For VSCode Copilot, although Streamable HTTP support is declared, it only works for me as SSE, so I specified: http://youraddress:8000/mcp/sse
**For VSCode Copilot .../YourProject/.vscode/mcp.json**
```json
{
"servers": {
"my-1c-mcp-server": {
"headers": {
"x-collection-name": "my_vector_collection"
},
"url": "http://youraddress:8000/mcp/sse"
}
}
}
```
**For Cursor .../YourProject/.cursor/mcp.json**
```json
{
"servers": {
"my-1c-mcp-server": {
"headers": {
"x-collection-name": "my_vector_collection"
},
"url": "http://youraddress:8000/mcp"
}
}
}
```
Through the `x-collection-name` header, you can specify the name of the collection in Qdrant instead of the default `1c_rag`. Since MCP settings can be specified at the project level almost everywhere, this allows you to use the same MCP server instance for different projects with different collections (for different 1C configurations).
## Environment variables
Can be configured via environment variables:
- `EMBEDDING_SERVICE_URL` - URL of the embedding service (default: http://youraddress:5000)
- `QDRANT_HOST` - Qdrant host (default: localhost)
- `QDRANT_PORT` - Qdrant port (default: 6333)
- `COLLECTION_NAME` - the name of the collection in Qdrant (default: 1c_rag), which can be overridden in the `x-collection-name` header in the MCP server connection settings
- `ROW_BATCH_SIZE` - row batch size (default: 250)
- `EMBEDDING_BATCH_SIZE` - embedding batch size (default: 50)
## Debugging
To view the logs of a separate service:
```bash
# Logs of a specific service
docker-compose logs -f loader
docker-compose logs -f embedding-service
docker-compose logs -f qdrant
docker-compose logs -f mcp-server
# Logs of all services
docker-compose logs -f
```
Connection Info
You Might Also Like
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
servers
Model Context Protocol Servers
Time
A Model Context Protocol server for time and timezone conversions.
Filesystem
Node.js MCP Server for filesystem operations with dynamic access control.
Sequential Thinking
A structured MCP server for dynamic problem-solving and reflective thinking.
git
A Model Context Protocol server for Git automation and interaction.