Back to Home
azharlabs icon

MCP-RAG-Knowledge-Base-Server

Verified Safe

by azharlabs

Overview

A FastAPI and MCP server designed to expose Retrieval-Augmented Generation (RAG) knowledge bases for chat interactions and document ingestion.

Installation

Run Command
python serve.py

Environment 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

Stats

Interest Score0
Security Score9
Cost ClassMedium
Avg Tokens1500
Stars0
Forks0
Last Update2026-01-03

Tags

RAGFastAPIKnowledge BaseLLMVector Search