mcp-raganything
by Kaiohz
Overview
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.
Installation
docker-compose up -dEnvironment Variables
- OPEN_ROUTER_API_KEY
Security Notes
The server has several potential security concerns: - **Arbitrary File Uploads:** The `/api/v1/file/index` endpoint allows users to upload arbitrary files to a temporary directory (`/tmp/output`). While basic path traversal for the file path is mitigated, there is no explicit content validation or type checking. Maliciously crafted documents (e.g., PDFs, DOCX) could exploit vulnerabilities in the underlying `Docling` or `raganything` parsing libraries, potentially leading to denial-of-service, resource exhaustion, or remote code execution. - **Permissive CORS:** The `ALLOWED_ORIGINS` defaults to `"*"`, which is overly permissive for a production environment and could expose the API to unintended cross-origin requests. - **Untrusted LightRAG API URL:** The application fetches and merges the LightRAG server's OpenAPI specification from `LIGHTRAG_API_URL` during startup. If this URL is controlled by an attacker, it could be used to inject malicious content into the API documentation, cause denial-of-service during startup (if the URL points to a slow/malicious server), or potentially leak information. - **Proxying Authorization Headers:** The application forwards `Authorization` and `api_key_header_value` headers to the LightRAG server. While intended functionality, this means the security of the overall system is dependent on the trustworthiness and security of the configured LightRAG server.
Similar Servers
ragflow-claude-desktop-local-mcp
This server integrates RAGFlow's knowledge base and document management APIs with LLMs like Claude Desktop, providing enriched context and enhanced retrieval capabilities through a Model Context Protocol (MCP) interface.
textrawl
Serves as a personal knowledge base allowing AI models (e.g., Claude) to search, retrieve, and add documents, emails, notes, and web pages from a user's collection.
fastmcp-r2r-openapi-integration
FastMCP server for R2R API, facilitating advanced RAG, document management, knowledge graph interactions, and AI-powered conversational agents.
MCP-RAG-Knowledge-Base-Server
A FastAPI and MCP server designed to expose Retrieval-Augmented Generation (RAG) knowledge bases for chat interactions and document ingestion.