mcp-demo

mindover-me/mcp-demo

3.2

If you are the rightful owner of mcp-demo and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

This demonstration project shows how to implement a Model Context Protocol (MCP) server with Retrieval-Augmented Generation (RAG) capabilities.

The MCP with RAG Demo is a project designed to showcase the implementation of a Model Context Protocol (MCP) server integrated with Retrieval-Augmented Generation (RAG) capabilities. This demo allows AI models to interact with a knowledge base, search for information, and add new documents. It supports both SSE (HTTP) and stdio communication modes, providing flexibility in how clients can connect and interact with the server. The project includes a client example to demonstrate interaction with the MCP server, and it supports simple prompt templates for ease of use. The demo is built with Python and requires Python 3.8+ and pip for installation. The project structure is organized to facilitate easy understanding and modification, with separate files for server implementation, client examples, and tools.

Features

  • MCP server with tool and resource support
  • RAG implementation with fallback to in-memory storage
  • Client example for interacting with the MCP server
  • Support for both SSE (HTTP) and stdio communication modes
  • Simple prompt templates

Tools

  1. echo

    A simple tool that echoes back the provided message

  2. add

    A tool that adds two numbers together

  3. add_document

    Adds a document to the knowledge base

  4. rag_search

    Searches the knowledge base for information related to a query

  5. list_documents

    Lists all documents in the knowledge base