
MCP-RAG Server
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).
felixscherz
README
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
- understand what MCP is
- implement a simple server and client
- 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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
MCP Package Docs Server
Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.
Claude Code MCP
An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.
@kazuph/mcp-taskmanager
Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.
Apple MCP Server
Enables interaction with Apple apps like Messages, Notes, and Contacts through the MCP protocol to send messages, search, and open app content using natural language.
DuckDuckGo MCP Server
A Model Context Protocol (MCP) server that provides web search capabilities through DuckDuckGo, with additional features for content fetching and parsing.
Linear MCP Server
Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.
YouTube Transcript MCP Server
This server retrieves transcripts for given YouTube video URLs, enabling integration with Goose CLI or Goose Desktop for transcript extraction and processing.