codebase-RAG
Verified Safeby bluewings1211
Overview
A Retrieval-Augmented Generation (RAG) server designed to assist AI agents and developers in understanding and navigating codebases through semantic search.
Installation
uv run python src/run_mcp.pyEnvironment 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
Context-Engine
Self-improving code search and context engine for IDEs and AI agents, providing hybrid semantic/lexical search, symbol graph navigation, and persistent memory.
apple-rag-mcp
Provides a comprehensive RAG (Retrieval-Augmented Generation) server for AI agents to search and retrieve content from Apple's developer documentation and WWDC transcripts.
viberag
Local codebase semantic search (RAG) for AI coding assistants via MCP server.
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.