Back to Home
Kaiohz icon

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

Run Command
docker-compose up -d

Environment 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

Stats

Interest Score19
Security Score6
Cost ClassHigh
Avg Tokens5000
Stars8
Forks1
Last Update2025-12-15

Tags

RAGFastAPILLMKnowledge GraphMulti-modalMCP Server