--- title: Invoice RAG with MCP emoji: 📄 colorFrom: blue colorTo: green sdk: gradio sdk_version: 5.33.1 app_file: app.py tags: - Agents-MCP-Hackathon - mcp-server-track pinned: false license: mit --- # 📄 Invoice RAG System with MCP Integration An intelligent system for processing and querying invoice data using RAG (Retrieval Augmented Generation) with MCP (Model Context Protocol) support. ## DEMO [DemoVideo](https://drive.google.com/file/d/1R6LG7qwtsaHLWZMv02NeJK_cqXaa8e-n/view?usp=sharing) ## 🚀 Features - **PDF Invoice Processing**: Extract and analyze invoice data - **RAG System**: Intelligent document retrieval and question answering - **Multiple LLM Support**: Groq integration with various models - **MCP Integration**: Expose tools via Model Context Protocol - **Interactive UI**: Clean Gradio interface ## 🔧 Setup 1. **Set API Keys**: Add your `GROQ_API_KEY` in the Space settings 2. **Upload Invoices**: Use the training tab to process your PDFs 3. **Query Data**: Ask questions about your invoices 4. **MCP Tools**: Access structured data extraction tools ## 📝 Usage 1. **Train**: Upload invoice PDFs to train the RAG system 2. **Query**: Ask natural language questions about your invoices 3. **Extract**: Use MCP tools for structured data extraction ## 🔑 Required Environment Variables - `GROQ_API_KEY`: Your Groq API key for LLM access ## 🛠️ MCP Integration The system exposes these MCP tools: - `query_invoice_info`: Extract information from invoices - `get_invoice_summary`: Get summary of processed invoices - `extract_specific_field`: Extract specific fields - `list_available_invoices`: List available invoice sources