Qdrant RAG MCP Server

by ancoleman

Not rated
GitHub

About

A semantic search server for codebases using Qdrant, featuring intelligent GitHub issue and project management.

Details

Author
ancoleman
Categories
Search, Other, Knowledge Base

πŸ”§ Working Directory Configuration (Important!)

The MCP server needs to know your actual working directory to correctly detect projects. You have three options:

Option 1: Natural Language (No Configuration Required!)

Simply tell Claude Code to set the working directory at the start of your session:

"Get current directory with pwd, export MCP_CLIENT_CWD to that value, then run health check"

This works immediately without any configuration changes!

Option 2: Environment Variable Configuration

In your Claude Code configuration (~/.claude-code/config.json):

{ "mcpServers": { "qdrant-rag": { "command": "python", "args": ](https://github.com/astral-sh/uv)["/path/to/qdrant-rag/src/qdrant_mcp_context_aware.py"], "env": { "MCP_CLIENT_CWD": "${workspaceFolder}" } } } }
{ "mcpServers": { "qdrant-rag": { "command": "python", "args": [ "/path/to/qdrant-rag/src/qdrant_mcp_context_aware.py", "--client-cwd", "${workspaceFolder}" ] } } }

Note: Without proper working directory setup, the server may detect the wrong project. The natural language approach (Option 1) is the quickest way to get started. SeeClaude Code Configuration Guidefor more details.

- Complete Setup & Usage GuideπŸ“š - Comprehensive setup and usage instructions

- Includes:Changing Embedding Models- What to expect when switching models

- Why MCP RAG for Agentic CodingπŸ€– - Understand how MCP enables efficient AI coding
-
Context Tracking GuideπŸ‘οΈ - Monitor and understand Claude's context window usage (v0.3.1)
-
Qdrant Quick Reference- Quick commands for Qdrant operations
-
MPS Quick Reference- Apple Silicon optimization guide
-
[Troubleshooting Guide- Common issues and solutions

…

A context-aware Model Context Protocol (MCP) server that provides semantic search capabilities across your codebase using Qdrant vector database. Now withintelligent GitHub issue resolution(v0.3.0),GitHub Projects V2 management(v0.3.4), andhierarchical sub-issues support(v0.3.4.post4). Designed to work seamlessly with Claude Code.

Why MCP RAG?This server enables AI agents to efficiently work with entire codebases while using 95%+ fewer tokens.Learn how β†’

πŸ†• GitHub Integration (v0.3.0) + Projects V2 (v0.3.4) + Sub-Issues (v0.3.4.post4)

- πŸ€– Intelligent Issue Resolution: RAG-powered GitHub issue analysis and automated fix generation
- πŸ”„ End-to-End Workflows: Analyze issues β†’ Generate fixes β†’ Create PRs with dry-run safety
- πŸ“‹ GitHub Projects V2 Management: Create projects, manage roadmaps, track progress with custom dashboards
- 🎯 29 GitHub MCP Tools: Complete issue lifecycle + 8 project management tools + 5 sub-issues tools via natural language
- πŸ“‘ Hierarchical Sub-Issues: Break down complex work with parent/child issue relationships

- List, add, remove, create, and reorder sub-issues
- Bulk add sub-issues to Projects V2 with smart field assignment
- Re-parenting support for reorganizing work
- Automatic issue number to ID conversion for intuitive usage

- πŸ‘οΈ Context Window Visibility: Monitor what Claude knows in the current session
- πŸ“Š Token Usage Tracking: Real-time estimates of context window consumption
- ⚠️ Usage Warnings: Automatic alerts at 60% and 80% context usage
- πŸ“ˆ Session Timeline: Chronological view of all context-consuming operations
- πŸ’Ύ Session Persistence: Automatic saving for later analysis
- πŸ” Session Viewer: Utility to analyze patterns across sessions

- 🎯 Content-Type Specific Models: Different AI models optimized for different content types

- Code: Programming-aware embeddings for 30-50% better code search relevance
- Config: Structure-aware models for precise JSON/YAML/XML navigation
- Documentation: Prose-optimized embeddings for natural documentation search

πŸ†• Progressive Context Management (v0.3.2)

- 🎯 Multi-Level Context: File β†’ Class β†’ Method hierarchy for optimal token usage
- πŸ’° 50-70% Token Reduction: Get high-level overviews without sacrificing detail access
- 🧠 Query Intent Detection: Automatically determines the right context level for your query
- ⚑ Semantic Caching: Similar queries hit cache with 0.85 similarity threshold
- πŸ”„ Drill-Down Options: Start with overview, expand to details as needed
- πŸ—οΈ Smart Structure Building: Automatically constructs code hierarchies from search results

- 🎯 Context-Aware: Automatically detects and scopes to your current project
- πŸ” Hybrid Search: Combines semantic understanding with keyword matching for +30% better precision
- 🧠 AST-Based Chunking: Structure-aware code parsing for Python, Shell, Go, JavaScript, and TypeScript (-40% tokens)
- πŸ”— Dependency-Aware Search: Automatically includes files that import or are imported by your search results (v0.1.9)
- πŸ“Š Enhanced Search Context: Get surrounding code chunks automatically for better understanding (v0.2.0)
- 🎯 Multi-Signal Ranking: 5-factor ranking system for 45% better search precision (v0.2.1)
- πŸ“š Documentation Indexing: Index and search markdown documentation files (v0.2.3)
- ⚑ Smart Incremental Reindexing: Only process changed files for 90%+ faster reindexing (v0.2.4)
- πŸ“ Multi-Project Support: Keep different projects' knowledge separate
- πŸš€ Fast Local Execution: Supports Apple Silicon MPS acceleration
- πŸ”§ Specialized Indexers: Language-aware code parsing and config file understanding
- πŸ”„ Optional Auto-Indexing: Keep your index up-to-date automatically as files change
- πŸ“Š Project-Aware Logging: Automatic log separation by project with rich debugging tools
- πŸ₯ Health Monitoring: Built-in health checks with detailed system status

Complete documentation for setting up and using the Qdrant RAG server with Claude Code.

- Claude Code CLI
- Docker
- Python 3.10+ withuv(ultraviolet package manager)

This project usesuvfor fast, reliable Python package management. If you don't have it installed:

# macOS/Linux curl -LsSf https://astral.sh/uv/install.sh | sh # Or with Homebrew brew install uv # Windows powershell -c "irm https://astral.sh/uv/install.ps1 | iex"

Why uv?It's 10-100x faster than pip and provides better dependency resolution.Learn more

# 1. Clone the repository git clone <repository-url> ~/mcp-servers/qdrant-rag cd ~/mcp-servers/qdrant-rag # 2. Run setup (starts Qdrant, installs dependencies) ./scripts/setup.sh # 3. Install globally with context awareness (ONE TIME ONLY) ./install_global.sh # That's it! The MCP server is now available in ALL projects # 4. Test in any project cd ~/any-project claude # Ask: "What's my current project context?"
# For current session only export QDRANT_RAG_AUTO_INDEX=true claude # For permanent auto-indexing echo 'export QDRANT_RAG_AUTO_INDEX=true' >> ~/.bashrc # or for zsh users: echo 'export QDRANT_RAG_AUTO_INDEX=true' >> ~/.zshrc

πŸ”§ Working Directory Configuration (Important!)

The MCP server needs to know your actual working directory to correctly detect projects. You have three options:

Option 1: Natural Language (No Configuration Required!)

Simply tell Claude Code to set the working directory at the start of your session:

"Get current directory with pwd, export MCP_CLIENT_CWD to that value, then run health check"

This works immediately without any configuration changes!

Option 2: Environment Variable Configuration

In your Claude Code configuration (~/.claude-code/config.json):

{ "mcpServers": { "qdrant-rag": { "command": "python", "args": ["/path/to/qdrant-rag/src/qdrant_mcp_context_aware.py"], "env": { "MCP_CLIENT_CWD": "${workspaceFolder}" } } } }
{ "mcpServers": { "qdrant-rag": { "command": "python", "args": [ "/path/to/qdrant-rag/src/qdrant_mcp_context_aware.py", "--client-cwd", "${workspaceFolder}" ] } } }

Note: Without proper working directory setup, the server may detect the wrong project. The natural language approach (Option 1) is the quickest way to get started. SeeClaude Code Configuration Guidefor more details.

- Complete Setup & Usage GuideπŸ“š - Comprehensive setup and usage instructions

- Includes:Changing Embedding Models- What to expect when switching models

- Why MCP RAG for Agentic CodingπŸ€– - Understand how MCP enables efficient AI coding
-
Context Tracking GuideπŸ‘οΈ - Monitor and understand Claude's context window usage (v0.3.1)
-
Qdrant Quick Reference- Quick commands for Qdrant operations
-
MPS Quick Reference- Apple Silicon optimization guide
-
[Troubleshooting Guide- Common issues and solutions

…

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.