RAG
- python
1
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"nsantra-rag-mcp-server": {
"command": "C:/Users/<yourusername>/anaconda3/envs/MCP/python.exe",
"args": [
"<absolute to the Main.py>"
],
"env": {
"DEVICE": "cuda",
"DOCUMENT_DIR": "C:/Users/you/Documents/RAG-MCP-Server/Documents",
"RERANKER_MODEL": "C:/Users/you/Documents/RAG-MCP-Server/Models/MiniLM-Reranker",
"EMBEDDING_MODEL": "C:/Users/you/Documents/RAG-MCP-Server/Models/MiniLM",
"CHROMA_DB_PERSIST_DIR": "C:/Users/you/Documents/RAG-MCP-Server/Databases"
}
}
}
}You run a Retrieval-Augmented Generation (RAG) MCP Server powered by LangChain wrappers over ChromaDB and HuggingFace models. It enables domain-aware answering with citations for Claude Desktop and Cursor IDE, using a single persistent Chroma vector store with multiple collections and a reranking model to improve relevance.
How to use
You integrate the MCP Server with your MCP client (such as Claude Desktop or Cursor IDE) by registering an MCP server entry that points to the local Python runtime running the Main.py entry point. The server exposes LangChain-based retrieval tools that fetch and rank context from domain collections before generating responses.
How to install
Prerequisites include having a compatible Python environment and, optionally, Anaconda for environment management.
conda create -n MCP python=3.11.13 -y
conda activate MCP
git clone https://github.com/NSANTRA/RAG-MCP-Server.git
cd RAG-MCP-Server
pip install -r requirements.txt
# Example environment configuration (fill in your paths)
# DEVICE = "cuda" or "cpu"
# DOCUMENT_DIR = "C:/Users/<yourusername>/Projects/RAG-MCP-Server/Documents"
# CHROMA_DB_PERSIST_DIR = "C:/Users/<yourusername>/Projects/RAG-MCP-Server/Databases"
# EMBEDDING_MODEL = "C:/Users/<yourusername>/Projects/RAG-MCP-Server/Models/MiniLM"
# RERANKER_MODEL = "C:/Users/<yourusername>/Projects/RAG-MCP-Server/Models/MiniLM-Reranker"
Note: Use absolute paths for directory and model locations. You can adjust the paths to match your machine. You can download local models if needed and replace the paths accordingly.
## Additional sections
Configuration and startup notes help you tailor the server to your environment and ensure reliable operation.
MCP Client setup snippets are provided for Claude Desktop and Cursor IDE to register the local MCP server and point to the starting script. Refer to the client-specific sections for exact JSON config blocks.
## Configuration
The MCP server uses a single persistent ChromaDB database with multiple collections, each representing a knowledge domain. You can embed PDFs, add documents via URL, and manage collections and documents via the server tools.
Environment variables influence the embedding and document handling workflows, including device selection and model paths.
## Troubleshooting
If the MCP server does not start in Claude Desktop or Cursor IDE, verify that your Python path points to the correct Conda environment and that Main.py runs without syntax errors. Ensure the working directory (cwd) matches your project root.
## Tools and capabilities
The server exposes tools for embedding, retrieval, metadata management, and citation generation. A dynamic inspector tool describeTools() reveals available MCP tools for introspection.
## Security and access
Keep your environment secure by restricting access to the local machine hosting the MCP server. Use environment controls for model weights and embeddings, and prefer local embeddings with offline models when possible.
## Notes
The MCP server is designed for seamless integration with Claude Desktop and Cursor IDE, automatically starting when registered in the respective MCP configuration. You should not run the Python script manually if the client handles registration.
## Available tools
### describeTools
Dynamically lists all available MCP tools for introspection and testing