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. - : Intelligent page-by-page processing with table detection - : Paragraph and table extraction with formatting preservation - : Sheet-aware processing with column context (.xlsx/.xls) - : Smart row batching with header preservation - : Support for PPTX - : Suppport for jpeg , png , webp , gif etc and OCR - : Different strategies based on file size - : Streaming processing for 50MB+ files - : Real-time progress indicators - : Graceful handling of long-running operations - : Vector similarity with confidence scores - : Search across multiple documents simultaneously - : Citations with similarity scores - : Combine semantic and keyword search - : Standardized AI-to-tool communication - : LangChain agents automatically find and use tools - : Built-in permission controls - : Easy to add...
README
以下为原文 README 节选,完整内容请查看原文。
📚 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
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →