1. Conduid
  2. RAG
  3. Rag Demo
MCP server · RAG

Rag Demo

simple rag with fastMCP, azure ai search, azure openai

Unclaimed last commit a year ago rag
34Low

Scored 12 days ago · breakdown

About Rag Demo

Rag Demo is an MCP server published by juichiache in the RAG category: simple rag with fastMCP, azure ai search, azure openai.

The repository has 1 stars and 0 forks, with the last commit a year ago. Six months or more without a commit doesn't mean the server is broken, but check the open issues before depending on it in production.

Install

From source
git clone https://github.com/juichiache/mcp-rag-demo

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Ask AI

✦

Ask AI about Rag Demo

Powered by Claude · Grounded in docs

I know everything about Rag Demo. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

RAG Demo with Azure MCP

This repository demonstrates a simple Retrieval-Augmented Generation (RAG) workflow using Model Context Protocol (MCP) for Azure search and Azure OpenAI for generation.

Summary

This demo application:

  1. Spins up a simple SSE-based MCP search server (mcp_server.py) that wraps your document index.
  2. Provides a CLI client script (demo.py) that:
    • Connects over SSE to the MCP server
    • Sends a user query
    • Retrieves the top N matching document chunks
    • Feeds those chunks as context to Azure OpenAI
    • Prints out a grounded, concise answer (or “I don’t know.”)

Getting Started

Prerequisites

  • Python 3.8+
  • Azure subscription with Azure AI Search and Azure OpenAI resources
  • A working Azure AI Search index (text or hybrid with integrated vectorization configured)
  • Environment variables

Setup

  1. Clone the repo

    git clone https://github.com/juichiache/mcp-rag-demo
    
    
  2. Install dependencies

pip install -r requirements.txt

Start MCP Server with environment variables loaded

In a new terminal, run mcp_server script

python mcp_server.py

Sample output from mcp_server.py:

alt text

Run RAG

python demo.py

Tech Stack Summary

  1. Language & Runtime: Python 3.8+ with asyncio
  2. Config: python-dotenv
  3. MCP Framework: mcp.server.fastmcp + mcp.client.sse
  4. Search: Azure Cognitive Search (azure-search-documents)
  5. LLM: Azure OpenAI (openai SDK)
  6. Transport: Server-Sent Events (SSE)
  7. Utilities: logging, json, pprint

[ demo.py CLI ] | | SSE → “search” { query, top:3 } ↓ [ MCP FastMCP server (mcp_server.py) ] | | Azure Search query → get top‐N hits ↓ Stream back JSONRPC “content” chunks over SSE | [ demo.py assembles chunks ] | | Azure OpenAI ChatCompletion(prompt with context) ↓ Final answer printed to console

Python & Asyncio

Runs the whole thing as async code (both the demo CLI and the SSE‐based search server). Uses asyncio for concurrency and streaming.

Client side (demo.py)

mcp.client.sse.sse_client for opening an SSE (Server-Sent-Events) connection mcp.client.session.ClientSession to talk the MCP “search” tool

Server side (mcp_server.py)

mcp.server.fastmcp.FastMCP to expose an SSE endpoint and route “search” calls

Azure AI Search

azure.search.documents.aio.SearchClient to query a search index azure.search.documents.indexes.aio.SearchIndexClient to build or update that index Powers the retrieval of document “chunks” (PDF pages, etc.)

Azure OpenAI

openai.AzureOpenAI client against your Azure OpenAI deployment (GPT-4.1) Takes the top N retrieved chunks, concatenates their "content" fields, and feeds them into a chat‐completion prompt

Server-Sent Events (SSE)

A lightweight streaming over HTTP mechanism so the client can send a prompt and incrementally receive back search hits

dotenv for configuration

python-dotenv to pull your Azure Search service name/key, Azure OpenAI endpoint/key, index name, etc. out of a .env file

Standard Python tooling

  • logging for debug output
  • pprint / json for introspecting responses
  • asyncio.run(...) to kick off the async CLI

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About Rag Demo

How do I install Rag Demo?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Rag Demo safe to use with an AI agent?

Its trust score is 34 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Rag Demo still maintained?

The last commit was a year ago. That's long enough that you should check whether the maintainer is responding to issues before depending on it.