MCP RAG server
Project description
MCP Server RAG
RAG (Retrieval-Augmented Generation) server for MCP (Model Control Protocol). This server provides vector-based document retrieval functionality to enhance LLM interactions with contextual information.
Overview
The MCP Server RAG implementation provides a bridge between your LLM applications and document collections, offering:
- Vector-based document search using ChromaDB and Sentence Transformers
- Multiple specialized collections (liv, ken, ufa, sap commerce)
- Strongly typed API responses
- Integration with the MCP server infrastructure
Installation
pip install rag-mcp-server
Usage
After installation, you can run the server with:
mcp-server-rag
Or using Python module syntax:
python -m mcp_server_rag
Features
- Vector-based search for contextual document retrieval
- Persistent storage of document embeddings via ChromaDB
- Multiple collection support for domain-specific searches
- Configurable via environment variables
- Fully typed response objects with detailed metadata
- Seamless integration with the MCP protocol
Available Collections
The server provides access to four specialized collections:
liv-rag: LIV document collection (retrieve_liv_contexttool)ken-rag: Kennametal document collection (retrieve_ken_contexttool)ufa-rag: UFA document collection (retrieve_ufa_contexttool)sap-comm-rag: SAP Commerce document collection (retrieve_sap_comm_contexttool)
Configuration
The following environment variables can be used to configure the server:
| Variable | Description | Default |
|---|---|---|
RAG_PERSIST_DIR |
Directory where ChromaDB will store its data | ~/Documents/chroma_db |
RAG_EMBEDDING_MODEL |
Path or name of the Sentence Transformer model | ~/LLM/huggingface/hub/models--sentence-transformers--all-MiniLM-L6-v2/... |
RAG_N_RESULTS |
Default number of results to return from searches | 5 |
Dependencies
- click
- mcp (version 1.2.0 or higher)
- chromadb
- sentence-transformers
Development
Building and Publishing
The repo includes a publish.sh script that helps with building and publishing the package.
./publish.sh
This script will clean previous build artifacts, install build dependencies, build the package, and check it before providing instructions for publishing to PyPI.
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_server_rag-0.2.0.tar.gz.
File metadata
- Download URL: mcp_server_rag-0.2.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d72502682deecde696c94e9bc3313b1a32aba90d85a70bb6ba796a23523e875
|
|
| MD5 |
e7912c8228a87d5390b167cbee0f193a
|
|
| BLAKE2b-256 |
1dbbc990c80ea7a24a4ec323ddc9505937844ce43a4601bb96931d68d4486488
|
File details
Details for the file mcp_server_rag-0.2.0-py3-none-any.whl.
File metadata
- Download URL: mcp_server_rag-0.2.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffc64b7be689c4c03ea703c15770fbb7a6318d9aeddec163b0100119a4287a46
|
|
| MD5 |
f693a67b18e252f8065f72c3a65fb742
|
|
| BLAKE2b-256 |
1e9ae587e419d7ef992a9598e874f02859874dc263ab7d3cddf9c2662f4bcaab
|