MCP-RAG: a modular RAG pipeline with an MCP server

MCP-RAG: a modular RAG pipeline with an MCP server

mcp-rag-sujithadr•bysujithadr

An MCP server that orchestrates GroundX semantic search, PDF ingestion, and OpenAI-based response generation for a retrieval-augmented generation pipeline.

License: MIT•Runtime: Awaiting documentation review•Category: ai agents-models

WHAT IT DOES

  • •Offers document and search tools discoverable and invocable through the MCP server interface.
  • •Ingests PDF files into a GroundX vector store.
  • •Performs semantic search through the GroundX Search Tool and generates responses with OpenAI.
  • •Renders retrieved snippets through YAML-based Jinja2 prompt templates.

BEST FOR

  • •Teams building AI-driven applications that need reusable, modular RAG components.
  • •Searchers wanting to ingest a PDF and query its content through MCP tools.

ABOUT MCP-RAG-SUJITHADR

MCP-RAG: a modular RAG pipeline with an MCP server is cataloged as an MCP server attributed to sujithadr. An MCP server that orchestrates GroundX semantic search, PDF ingestion, and OpenAI-based response generation for a retrieval-augmented generation pipeline. It is categorized under ai agents-models. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for MCP-RAG: a modular RAG pipeline with an MCP server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

How does a query flow through the system?

The MCP server receives the query, routes it to the Search Tool, which queries GroundX; snippets are rendered via a YAML prompt and OpenAI generates the final response.

What external services does it rely on?

It uses GroundX for semantic search, ingestion and vector store operations, and OpenAI GPT-4 for response generation.

Upstream README

View this exact version on GitHub

README.md · 8e4390a73cff · Fetched 2026-11-13 11:03:40 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

MCP-RAG: Modular RAG Pipeline using MCP & GroundX

A production-ready Retrieval-Augmented Generation setup

License Python

🚀 Overview

MCP-RAG is a modular, production-grade implementation of a Retrieval-Augmented Generation (RAG) system, powered by:

  • 🧠 MCP (Model Context Protocol) for standardized tool orchestration
  • 🔍 GroundX for semantic search, ingestion, and vector store operations
  • 🤖 OpenAI GPT-4 for LLM-powered contextual response generation

It allows clean separation of responsibilities across ingestion, search, generation, and tool discovery — making it scalable, flexible, and enterprise-ready.

📌 Developed by Sujith Somanunnithan for teams building AI-driven applications with reusable components.


📦 Features

  • 🔧 Modular Tool Design using MCP server interface
  • 🧩 YAML-Based Prompt Templates with Jinja2 rendering
  • 📂 PDF File Ingestion into GroundX vector store
  • 🔍 Real-Time Semantic Search via GroundX Search Tool
  • 🤝 Plug-and-Play API Integration for new tools and services

📁 Project Structure

mcp-rag/
├── server.py                     # MCP Server initialization
├── config.py                     # Environment and config management
├── ingestion.py                  # File ingestion tool logic
├── search.py                     # Search + LLM generation logic
├── prompts.yaml                  # Prompt template in Jinja2
├── models.py                     # Pydantic models for configs
├── .env                          # API keys (excluded from version control)
├── pyproject.toml                # Project config for uv / MCP
├── README.md                     # This file

🧠 Architectural Flow

  1. User query arrives at the MCP server
  2. Server routes it to the Search Tool
  3. Search Tool queries GroundX API
  4. Snippets are rendered via YAML prompt
  5. OpenAI API generates final LLM response

🔄 All tools are discoverable and invocable via MCP dynamically.


🔑 Environment Setup

Create .env with your keys:

OPENAI_API_KEY=your-openai-key
GROUNDEX_API_KEY=your-groundx-key

Install using uv:

uv pip install -r pyproject.toml

⚙️ Usage

Start the server:

mcp dev server.py

Ingest a PDF:

mcp call ingest_documents --args '{"file_path": "data/sample.pdf"}'

Search with a query:

mcp call process_search_query --args '{"query": "What is explained in section 3?"}'

📌 Clean Separation of Concerns

RoleComponent
Tool discovery/invokeMCP Server
Search executionGroundX API
Response generationOpenAI API
File uploadIngest Tool (MCP)

📚 License

This project is licensed under the MIT License.


👨‍💻 Author

Sujith Somanunnithan
Cloud & AI Architect | sujith.de


💬 Feedback & Contributions

Feel free to raise issues, pull requests, or connect with the author for improvements or extensions (like multi-file ingestion, RAG fallback chains, etc).

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for MCP-RAG: a modular RAG pipeline with an MCP server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-rag-sujithadr)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related ai agents-models MCP Servers

Alternative and complementary servers in the same category

View all in ai agents-models →
Knowledge Graph Memory
@modelcontextprotocol/server-memory•Model Context Protocol

Store and retrieve entities, relations and observations in a persistent local knowledge graph.

create_entitiescreate_relationsadd_observations+6 more
92K
AI & Multi-Agent
Sequential Thinking
@modelcontextprotocol/server-sequential-thinking•Model Context Protocol

Organize problem solving into revisable, branching thought steps through an MCP tool.

sequential_thinking
92K
AI & Multi-Agent

Query-aware context compression with an MCP plugin for coding agents, plus Python and HTTP interfaces for reducing the context sent to a language model.

146
AI & Multi-Agent