📚 MCP-RAG
MCP-RAG system built with the Model Context Protocol (MCP) that handles large files (up to 200MB) using intelligent chunking strategies, multi-format document support, and enterprise-grade reliability.
🌟 Features
📄 Multi-Format Document Support
- PDF: Intelligent page-by-page processing with table detection
- DOCX: Paragraph and table extraction with formatting preservation
- Excel: Sheet-aware processing with column context (.xlsx/.xls)
- CSV: Smart row batching with header preservation
- PPTX: Support for PPTX
- IMAGE: Suppport for jpeg , png , webp , gif etc and OCR
🚀 Large File Processing
- Adaptive chunking: Different strategies based on file size
- Memory management: Streaming processing for 50MB+ files
- Progress tracking: Real-time progress indicators
- Timeout handling: Graceful handling of long-running operations
🧠 Advanced RAG Capabilities
- Semantic search: Vector similarity with confidence scores
- Cross-document queries: Search across multiple documents simultaneously
- Source attribution: Citations with similarity scores
- Hybrid retrieval: Combine semantic and keyword search
🔌 Model Context Protocol (MCP) Integration
- Universal tool interface: Standardized AI-to-tool communication
- Auto-discovery: LangChain agents automatically find and use tools
- Secure communication: Built-in permission controls
- Extensible architecture: Easy to add new document processors
🏢 Enterprise Ready
- Custom LLM endpoints: Support for any OpenAI-compatible API
- Vector database options: ChromaDB (local) + Milvus (production)
- Batch processing: Handles API rate limits and batch size constraints
- Error recovery: Retry logic and graceful degradation
🏗️ Architecture
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐ │ Streamlit │ │ LangChain │ │ MCP Server │ │ Frontend │◄──►│ Agent │◄──►│ (Tools) │ └─────────────────┘ └──────────────────┘ └─────────────────┘ │ ┌────────────────────────┼────────────────────────┐ │ ▼ │ ┌───────▼────────┐ ┌─────────────────┐ ┌──────▼──────┐ │ Document │ │ Vector Database │ │ LLM API │ │ Processors │ │ (ChromaDB) │ │ Endpoint │ └────────────────┘ └─────────────────┘ └─────────────┘
🚀 Quick Start
Prerequisites
- Python 3.11+
- OpenAI API key or compatible LLM endpoint
- 8GB+ RAM (for large file processing)
Installation
Clone the repository
git clone https://github.com/yourusername/rag-large-file-processor.git
cd rag-large-file-processor
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
# Create .env file
cat > .env << EOF
OPENAI_API_KEY=your_openai_api_key_here
BASE_URL=https://api.openai.com/v1
MODEL_NAME=gpt-4o
VECTOR_DB_TYPE=chromadb
streamlit run streamlit_app.py
Metadata
Release files for iflow-mcp_anuragb7-mcp-rag 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| iflow_mcp_anuragb7_mcp_rag-0.1.1.tar.gz | 31.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| iflow_mcp_anuragb7_mcp_rag-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 77.6 kB
Release files / iflow_mcp_anuragb7_mcp_rag-0.1.1.tar.gz
| Download URL | iflow_mcp_anuragb7_mcp_rag-0.1.1.tar.gz |
|---|---|
| Size | 31.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc611f7fcd773592c5aa24e7a097817f7992d2e102a0c17ba7f8e100316966f7
|
|
BLAKE2b-256 checksum How to use checksums |
7c70dc85b217282b5d5559cad5d6fe91aedf68d3142e4b2cf7c77fc6eb0e5060
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / iflow_mcp_anuragb7_mcp_rag-0.1.1-py3-none-any.whl
| Download URL | iflow_mcp_anuragb7_mcp_rag-0.1.1-py3-none-any.whl |
|---|---|
| Size | 45.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a57ff33b8e6f950b6149594c1ee1ea99a88c6745ba1d2e66a0c63211607c6238
|
|
BLAKE2b-256 checksum How to use checksums |
5876a0230e882859b193871077e4bb98734754defafc2f7edac044bacb15a679
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|