mcp-rag-bridge
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-rag-bridgeHow does our authentication system work?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π mcp-rag-bridge
Connect any AI agent to your document knowledge base via MCP (Model Context Protocol).
This server wraps a RAG (Retrieval-Augmented Generation) pipeline as MCP tools β so Claude, Qwen Code, or any MCP client can query your documents, add new ones, and get grounded answers with citations.
Why this exists
"A RAG pipeline without an agent interface is just a search engine. An agent without RAG is just a chatbot. The bridge makes both smarter."
This project connects the two worlds: your documents become the agent's knowledge, and the agent becomes the interface to that knowledge.
Related MCP server: mcp-rag-agent
Architecture
βββββββββββββββββββββββ
β MCP Client (AI) β
β Claude / Qwen Code β
ββββββββββββ¬βββββββββββ
β stdio (JSON-RPC)
ββββββββββββΌβββββββββββ
β MCP RAG Bridge β
β β
β query_kb βββββββββββββββ
β add_document ββββββ β
β list_sources βββ β β
β delete_doc ββ β β β
β search βββ β β β β
ββββββββββββΌβββΌβββΌβββΌβββββ
β β β β
βββββββΌβββΌβββΌβββΌβββββ
β ChromaDB + β
β Embeddings β
βββββββββββββββββββββTools (6)
Tool | What it does |
| Search documents + optional LLM-generated answer with citations |
| List all indexed documents with chunk counts |
| Index a file (txt, md, pdf, csv, json) into the knowledge base |
| Index raw text (notes, snippets, API responses) |
| Remove a document from the knowledge base |
| Find documents similar to a given text |
Quick start
git clone https://github.com/zyay/mcp-rag-bridge.git
cd mcp-rag-bridge
python -m venv venv && venv\Scripts\activate
pip install -r requirements.txt
# Start the MCP server
python server.py
# Or test with the included client
python client_test.pyConnect an MCP client
Qwen Code
qwen mcp add rag-bridge -- python /full/path/to/mcp-rag-bridge/server.pyClaude Code
claude mcp add rag-bridge -- python /full/path/to/mcp-rag-bridge/server.pyClaude Desktop
{
"mcpServers": {
"rag-bridge": {
"command": "python",
"args": ["/full/path/to/mcp-rag-bridge/server.py"]
}
}
}Usage examples
Once connected, the agent can interact with your knowledge base naturally:
User: "What documents do you know about?"
Agent: [calls list_sources()]
User: "Index the file at ./docs/architecture.md"
Agent: [calls add_document("./docs/architecture.md")]
User: "How does our authentication system work?"
Agent: [calls query_knowledge_base("authentication system", use_llm=True)]
User: "Find documents similar to 'database migration strategy'"
Agent: [calls search_similar("database migration strategy")]LLM generation
Set use_llm=True in query_knowledge_base to get grounded answers:
Ollama (default): Local, free, no API key. Set
OLLAMA_MODEL=llama3.2.OpenAI fallback: Set
LLM_PROVIDER=openaiandOPENAI_API_KEY=sk-...
The bridge tries the primary provider first, then falls back automatically.
Environment variables
Variable | Default | Description |
|
| Document directory |
|
| Vector store path |
|
| ChromaDB collection name |
|
| Text chunk size (chars) |
|
| Overlap between chunks |
|
| LLM provider (ollama/openai) |
|
| Ollama server URL |
|
| Ollama model name |
| (empty) | OpenAI API key |
|
| OpenAI model name |
Design decisions
Decision | Why |
Self-contained | No dependency on rag-docs-assistant β works as a standalone project |
Hybrid search | 70% semantic + 30% lexical for better recall |
Two-step LLM | Retrieve first, then generate β grounded answers with citations |
ChromaDB | Zero-config, persistent, no separate server needed |
stdio transport | Works with any MCP client, no HTTP server needed |
Relationship to other projects
rag-docs-assistant β Full RAG pipeline with web UI, evals, reranking. This project shares the same core concepts but is self-contained.
mcp-agent-tools β General-purpose MCP tools (file, MySQL, web, calc). This project is the RAG-specific counterpart.
Together, these three projects demonstrate a complete AI agent ecosystem: general tools + knowledge retrieval + the bridge between them.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Knowledge base MCP for AI agents on iknow.dev. Search, read, and maintain via OAuth.
Make your knowledge agent-ready. One MCP endpoint, 5 connectors, 3 search modes.
- docs2mcpOAuthcom.docs2mcp
Query your own PDFs and documents from any MCP client. Every answer cites the page it came from.
Team docs served to AI agents over MCP - search, Markdown reads, version pinning, read audit.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to search, deep-read, and build knowledge bases from Markdown, PDF, DOCX, and PPTX documents via MCP tools for retrieval, document navigation, and ingestion.16631MIT
- AlicenseNot gradedqualityBmaintenanceEnables document-based Q&A with multi-modal RAG, hybrid retrieval, knowledge graph reasoning, and multi-agent orchestration via MCP tools.4MIT
- FlicenseNot gradedqualityCmaintenanceEnables querying company knowledge base using RAG, providing accurate answers from internal documents via MCP.-
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to securely search and ingest corporate documents via MCP, offering hybrid retrieval, PII sanitization, role-based access control, and citation validation.MIT