Back to Home
bluewings1211 icon

codebase-RAG

Verified Safe

by bluewings1211

Overview

A Retrieval-Augmented Generation (RAG) server designed to assist AI agents and developers in understanding and navigating codebases through semantic search.

Installation

Run Command
uv run python src/run_mcp.py

Environment Variables

  • QDRANT_HOST
  • QDRANT_PORT
  • OLLAMA_HOST
  • OLLAMA_DEFAULT_EMBEDDING_MODEL
  • MLX_SERVER_URL
  • RERANKER_ENABLED

Security Notes

The server's core functionality involves extensive file system access (`os.walk`, file I/O) to read and index codebases. This is an inherent risk for any code analysis tool. However, the system includes mitigations such as respecting `.ragignore` files and internal exclusion lists (`exclude_dirs`, `exclude_patterns` in `ProjectAnalysisService`). Input validation (`PromptValidator`) specifically checks for dangerous directory patterns (e.g., path traversal attempts) in user-provided paths. Network connections are primarily to configurable local services (Qdrant, Ollama, MLX Server), reducing exposure to arbitrary external network risks. No direct `eval()` or `exec()` on untrusted user input was observed. The main residual risk is the potential exposure of sensitive internal code if an untrusted codebase is indexed and then queried by an LLM, or if internal code could be misused through generated LLM responses. Overall, it appears robust against common remote execution vulnerabilities, but careful deployment and use with trusted codebases are recommended.

Similar Servers

Stats

Interest Score38
Security Score8
Cost ClassHigh
Avg Tokens80000
Stars11
Forks4
Last Update2025-12-11

Tags

RAGCode AnalysisSemantic SearchAI AgentsTree-sitter