Codebase RAG MCP Server
Codebase RAG MCP Server
A Retrieval-Augmented Generation (RAG) Model-Controller-Provider (MCP) server designed to assist AI agents and developers in understanding and navigating codebases.
Quick Links
Getting Started: Installation and Basic Usage.
User Manual: Tutorials, Features, and Advanced Usage.
Configuration: Environment variables and performance tuning.
Architecture: System design and high-level overview.
Contributing: Developer setup and guidelines.
Overview
This tool allows you to "chat" with your code. It indexes your local directories or GitHub repositories into a vector database (Qdrant), allowing Large Language Models to perform semantic searches and retrieve accurate code snippets.
Key Features
🔍 Semantic Search: Find code by meaning, not just keywords.
🎯 Two-Stage RAG: 22-31% accuracy improvement with cross-encoder reranking (Qwen3-Reranker).
🧠 Intelligent Chunking: Parses code into functions and classes using Tree-sitter for better context.
⚡ High Performance: Supports incremental indexing and MPS acceleration on macOS.
🌐 Multi-Language: Supports Python, JavaScript, TypeScript, Go, Rust, Java, C++, and more.
📝 File Logging: Optional centralized logging with automatic rotation for debugging.
Quick Start
Setup:
./setup.shIndex Code:
uv run python manual_indexing.py -d "." -m clear_existingConnect: Follow the instructions from
setup.shto add the server to your MCP client (e.g., Claude Desktop).
For detailed instructions, please visit Getting Started.
Documentation
Detailed documentation is available in the docs/ directory:
License
This project is licensed under the MIT License - see the LICENSE file for details.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/bluewings1211/codebase-RAG'
If you have feedback or need assistance with the MCP directory API, please join our Discord server