MCP-RAG-Knowledge-Base-Server
Verified Safeby azharlabs
Overview
A FastAPI and MCP server designed to expose Retrieval-Augmented Generation (RAG) knowledge bases for chat interactions and document ingestion.
Installation
python serve.pyEnvironment Variables
- MODEL_API_KEY
- MODEL_BASE_URL
- QDRANT_URL
- GCS_BUCKET_NAME
- MONGO_URL
- MAX_UPLOAD_BYTES
- APP_ENV
- HOST
- PORT
- MCP_HOST
- MCP_PORT
Security Notes
The server demonstrates good security practices: sensitive configurations like API keys and database URLs are loaded from environment variables or a configuration file, not hardcoded. User passwords are hashed using `hashlib.sha256`, and API keys are generated securely with `secrets.token_urlsafe`. File uploads are size-limited and use temporary UUIDs to prevent path traversal. Frontend markdown rendering is sanitized using `DOMPurify` to mitigate XSS risks. Authentication and authorization checks are implemented for API endpoints. The primary remaining risk would involve potential vulnerabilities within third-party libraries (e.g., `extractanything` or `MarkItDown`) for document parsing, but the direct application code is robust.
Similar Servers
context-portal
Manages structured project context for AI assistants and developer tools, enabling Retrieval Augmented Generation (RAG) and prompt caching within IDEs.
qdrant-loader
A Model Context Protocol (MCP) server that provides advanced Retrieval-Augmented Generation (RAG) capabilities to AI development tools by bridging a QDrant knowledge base for intelligent, context-aware search.
mcp-raganything
Provides a FastAPI REST API and MCP server for Retrieval Augmented Generation (RAG) capabilities, integrating with the RAG-Anything and LightRAG libraries for multi-modal document processing and knowledge graph operations.
concept-rag
This MCP server provides conceptual search, document analysis, and library exploration capabilities over a knowledge base using LanceDB and LLM-based concept extraction.