Skip to main content
Glama

MCP-RAG Server

by felixscherz

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

使用模型上下文协议 (MCP) 将 RAG 应用程序连接到 open-webui,通过服务器发送事件 (SSE) 实现服务器到客户端通信,以便在远程环境中检索上下文和使用工具。

  1. 1. MCP PoC 基本框架 / Hello World
    1. 写作
    2. 目标
  2. 2. 实现基本的知识库
    1. 3. MCP 客户端 + Open-WebUI

      Related MCP Servers

      • -
        security
        F
        license
        -
        quality
        Enables interaction with a TrueRAG system through a GraphQL API using the Model Context Protocol (MCP), facilitating access to policies with a Python SDK and GQL library integration.
        Last updated -
        2
        • Apple
        • Linux
      • -
        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 -
        33
        Python
        • Linux
        • Apple
      • -
        security
        A
        license
        -
        quality
        A server that enables interaction with any API that has a Swagger/OpenAPI specification through Model Context Protocol (MCP), automatically generating tools from API endpoints and supporting multiple authentication methods.
        Last updated -
        22
        95
        TypeScript
        Apache 2.0
      • A
        security
        F
        license
        A
        quality
        A Model Context Protocol server that provides access to Magic UI components, allowing AI assistants and other MCP clients to discover and use UI components from the Magic UI design system.
        Last updated -
        2
        9
        TypeScript

      View all related MCP servers

      MCP directory API

      We provide all the information about MCP servers via our MCP API.

      curl -X GET 'https://glama.ai/api/mcp/v1/servers/felixscherz/mcp-rag'

      If you have feedback or need assistance with the MCP directory API, please join our Discord server