MCP-RAG Server

by felixscherz

Integrations

  • Integrates a knowledge base into the MCP server to provide context for RAG (Retrieval-Augmented Generation) applications

mcp-rag

Connecting a RAG application to open-webui by means of MCP

1. Bare bones MCP PoC / Hello World

pip install mcp[cli]
  • look up documentation on sse snippets
  • run server using uvicorn
  • doesnt work -> look up documentation in SseServerTranpsort class which differs from MCP website
  • change Route -> Mount for starlette_app, then it works
  • starlette gives 307 temporary redirect, testing it with curl shows that it is due to a missing trailing slash
  • looked up on github repo, there the routes end with trailing slash for server code, especially the sse = SseServerTransport("/messages/") part which I guess tells the client what to call
  • add some prompts and check on client side

Writeup

  • I want to try out the model context protocol because I have been experimenting with RAG prototypes for use with open-webui. MCP looks similar to LSP. Since server and client won't be on the same machine, we have to use the SSE transport.
  • MCP comes with some snippets on the official documentation, I had to adapt them a bit following the docstrings provided by the mcp python library. Took me a while to get things working, initially dealt with 307 Temporary Redirect errors since the server was sending the wrong endpoint.
  • Test it! Build a small REPL that can interact with the server

Goal

  1. understand what MCP is
  2. implement a simple server and client
  3. try out function calling / tool usage

2. Implement a basic KnowlegdeBase

  • I want to build a simple KnowledgeBase that we can stick into the MCP server and call through the client to retrieve some context.

3. MCP Client + Open-WebUI

-
security - not tested
F
license - not found
-
quality - not tested

Connects a RAG application to open-webui using Model Context Protocol (MCP), enabling server-to-client communication for context retrieval and tool usage in remote environments through Server-Sent Events (SSE).

  1. 1. Bare bones MCP PoC / Hello World
    1. Writeup
    2. Goal
  2. 2. Implement a basic KnowlegdeBase
    1. 3. MCP Client + Open-WebUI

      Related MCP Servers

      • -
        security
        F
        license
        -
        quality
        This MCP server implementation allows users to manage and expose actions as tools from their Integration App workspace through the Model Context Protocol.
        Last updated -
        10
        14
        JavaScript
      • -
        security
        F
        license
        -
        quality
        A Model Context Protocol server that integrates with Cursor IDE, providing real-time communication, modern web dashboards, and extensible tools via SSE and WebSocket connections.
        Last updated -
        1,261
        1
        Python
      • -
        security
        A
        license
        -
        quality
        An MCP server that exposes HTTP methods defined in an OpenAPI specification as tools, enabling interaction with APIs via the Model Context Protocol.
        Last updated -
        2
        Python
        MIT License
      • -
        security
        F
        license
        -
        quality
        A Model Context Protocol server implementation that enables connection between OpenAI APIs and MCP clients for coding assistance with features like CLI interaction, web API integration, and tool-based architecture.
        Last updated -
        9
        Python
        • Linux
        • Apple

      View all related MCP servers

      ID: cni0rqrp11