Implements environment variable configuration through .env files, enabling secure storage of API keys and other sensitive information
Provides Git-based workflows for contribution and version control, supporting feature branch development and pull request processes
Supports Jupyter notebook functionality through ipykernel, allowing interactive development and visualization of RAG operations
Integrates with OpenAI's API for model generation capabilities, enabling use of models like GPT-4 for retrieval-augmented generation tasks
Utilizes Pydantic for type-safe operations, providing robust type checking and validation throughout the RAG implementation
Built on Python with specific version requirements (3.12+), leveraging the language's capabilities for document processing and retrieval tasks
MCP-RAG: Model Context Protocol with RAG 🚀
A powerful and efficient RAG (Retrieval-Augmented Generation) implementation using GroundX and OpenAI, built with Modern Context Processing (MCP).
🌟 Features
Advanced RAG Implementation: Utilizes GroundX for high-accuracy document retrieval
Model Context Protocol: Seamless integration with MCP for enhanced context handling
Type-Safe: Built with Pydantic for robust type checking and validation
Flexible Configuration: Easy-to-customize settings through environment variables
Document Ingestion: Support for PDF document ingestion and processing
Intelligent Search: Semantic search capabilities with scoring
Related MCP server: RAG_MCP
🛠️ Prerequisites
Python 3.12 or higher
OpenAI API key
GroundX API key
MCP CLI tools
📦 Installation
Clone the repository:
Create and activate a virtual environment:
⚙️ Configuration
Copy the example environment file:
Configure your environment variables in
.env:
🚀 Usage
Starting the Server
Run the inspect server using:
Document Ingestion
To ingest new documents:
Performing Searches
Basic search query:
With custom configuration:
📚 Dependencies
groundx(≥2.3.0): Core RAG functionalityopenai(≥1.75.0): OpenAI API integrationmcp[cli](≥1.6.0): Modern Context Processing toolsipykernel(≥6.29.5): Jupyter notebook support
🔒 Security
Never commit your
.envfile containing API keysUse environment variables for all sensitive information
Regularly rotate your API keys
Monitor API usage for any unauthorized access
🤝 Contributing
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add some amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request