rag-mcp
Click on "Deploy 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., "@rag-mcp Search our knowledge base for the latest product specifications"
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.
Multimodal RAG Service
Production-minded retrieval for text, tables, images, and PDFs. Sentence-transformer text vectors and CLIP image vectors are stored in separate FAISS indexes; BM25 sparse results are combined using weighted reciprocal-rank fusion.
Run locally
python -m venv .venv
.venv\\Scripts\\Activate.ps1
pip install -e ".[dev]"
Copy-Item .env.example .env
uvicorn app.main:app --reloadThe API documentation is available at http://localhost:8000/docs. Models download automatically at their first embedding request.
Related MCP server: mcp-rag-agent
API
curl -F "files=@report.pdf" http://localhost:8000/v1/documents
curl -X POST http://localhost:8000/v1/search -H "Content-Type: application/json" -d "{\"query\":\"revenue trend\",\"top_k\":5}"
curl -N -X POST http://localhost:8000/v1/chat/stream -H "Content-Type: application/json" -d "{\"query\":\"Summarize the report\"}"MCP integration
Run the REST API, then start the stdio MCP bridge:
rag-mcpSet RAG_API_URL to point at a non-default API address. The bridge provides search_knowledge_base, ask_knowledge_base, list_documents, and service_health tools to MCP clients.
Evaluation
Supply JSONL rows containing query, relevant_document_ids, and optionally reference_answer:
python -m app.evaluation --dataset eval/golden.jsonlReported metrics include Recall@K, Precision@K, MRR, p50/p95 retrieval latency, ROUGE-L, and BLEU-1.
Container deployment
docker compose up --buildThe compose configuration mounts a persistent named volume at /service/data.
Available Tools
4 toolsask_knowledge_baseB
Answer a question from the knowledge base and return its source citations.
Inputs: question (required), top_k.
list_documentsA
List all documents currently indexed by the RAG service.
Inputs: no named parameters. Returns: result
search_knowledge_baseA
Search text, tables, and images in the indexed knowledge base, returning grounded chunks.
Inputs: query (required), top_k, modality.
service_healthA
Check whether the linked RAG API is available and return index counts.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: searching returns chunks, asking returns an answer with citations, listing documents provides an index, and health checks API availability. No overlap or ambiguity.
Most tools follow a verb_noun pattern (search_knowledge_base, ask_knowledge_base, list_documents), but service_health breaks the pattern by using a noun phrase. The naming is still clear and consistent in snake_case.
With only 4 tools, the server is tightly scoped for a RAG query service. Each tool is essential and there is no bloat or redundancy.
The core query workflow (search, ask, list) is covered, and health monitoring is included. However, there is no tool to add or remove documents, which may be a gap if the server is expected to manage the index, but it might be intentionally read-only.
Maintenance
Related MCP Connectors
Cloud or self-hosted knowledge for AI agents: hybrid search, reranking, GraphRAG, scoped MCP tools.
Make your knowledge agent-ready. One MCP endpoint, 5 connectors, 3 search modes.
Search and manage your team's knowledge from MCP clients.
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceMulti-modal RAG service exposing a REST API and MCP server for document indexing and knowledge-base querying, powered by RAGAnything and LightRAG.15-
- AlicenseNot gradedqualityCmaintenanceEnables document-based Q&A with multi-modal RAG, hybrid retrieval, knowledge graph reasoning, and multi-agent orchestration via MCP tools.4MIT
- FlicenseNot gradedqualityDmaintenanceExposes an existing RAG API as MCP tools, enabling health checks and document-based question answering with source evidence.-
- AlicenseNot gradedqualityDmaintenanceEnables MCP clients to query a modular RAG knowledge hub with hybrid dense/sparse retrieval, reranking, multimodal image support, and traceable observability, all through natural language tools.MIT