# Codebase RAG

> A Retrieval-Augmented Generation (RAG) Model-Controller-Provider (MCP) server designed to assist AI agents and developers in understanding and navigating codebases.. It supports incremental indexing and multi-language parsing, enabling LLMs to understand and interact with code.

- **Type:** MCP server
- **Install:** `agentstack add mcp-bluewings1211-codebase-rag`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [bluewings1211](https://agentstack.voostack.com/s/bluewings1211)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [bluewings1211](https://github.com/bluewings1211)
- **Source:** https://github.com/bluewings1211/codebase-RAG

## Install

```sh
agentstack add mcp-bluewings1211-codebase-rag
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# 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](GETTING_STARTED.md)**: Installation and Basic Usage.
*   **[User Manual](MANUAL.md)**: Tutorials, Features, and Advanced Usage.
*   **[Configuration](docs/CONFIGURATION.md)**: Environment variables and performance tuning.
*   **[Architecture](ARCHITECTURE.md)**: System design and high-level overview.
*   **[Contributing](CONTRIBUTING.md)**: 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

1.  **Setup**:
    ```bash
    ./setup.sh
    ```

2.  **Index Code**:
    ```bash
    uv run python manual_indexing.py -d "." -m clear_existing
    ```

3.  **Connect**:
    Follow the instructions from `setup.sh` to add the server to your MCP client (e.g., Claude Desktop).

For detailed instructions, please visit **[Getting Started](GETTING_STARTED.md)**.

## Documentation

Detailed documentation is available in the `docs/` directory:
*   [MCP Tools Reference](docs/MCP_TOOLS.md)
*   [Architecture Deep Dive](docs/ARCHITECTURE_DEEP_DIVE.md)

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [bluewings1211](https://github.com/bluewings1211)
- **Source:** [bluewings1211/codebase-RAG](https://github.com/bluewings1211/codebase-RAG)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-bluewings1211-codebase-rag
- Seller: https://agentstack.voostack.com/s/bluewings1211
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
