Directory Indexer
Turn your directories into an AI-powered knowledge base.
Self-hosted semantic search for local files. Enable AI assistants to search your documents using vector embeddings and MCP integration.
Setup
Directory Indexer runs locally on your machine or server. It uses an embedding provider (such as Ollama) to create vector embeddings of your files and stores them in a Qdrant vector database for fast semantic search. Both services can run remotely if needed.
Setup requires two services:
1. Qdrant Vector Database
Choose one option:
Docker (recommended for most users):
- This option requires Docker
- Runs Qdrant on docker container, uses a named volume
qdrant_storagefor persistent storage.
Alternative: Install natively from qdrant.tech
2. Embedding Provider
Choose one option:
Option A: Ollama (recommended - free, runs locally)
# Install Ollama
| # For Windows: Download from https://ollama.ai
# Pull the embedding model
- You can also run Ollama via Docker
- GPU support may require additional configuration
Option B: OpenAI (requires paid API key)
Quick Verification
Test your setup:
# Check Qdrant
# Check Ollama
If either fails, directory-indexer will show a helpful error with setup guidance.
Installation
Usage
MCP Integration
Configure with Claude Desktop:
Start the MCP server:
Your AI assistant (Claude, Cline, Copilot, etc.) can now search your indexed documents semantically. Ask: "Find API authentication examples", "Show me incidents similar to this", or "Find troubleshooting guides on SQL deadlocks".
CLI Commands
# Index your directories
# Linux/macOS
# Windows
# Search semantically
# Find similar files
# Linux/macOS
# Windows
# Get file content
# Show status
Configuration
Directory Indexer uses environment variables for configuration. Set these if your services run on different ports or require API keys:
# Service endpoints (defaults shown)
# Optional data directory (default: ~/.directory-indexer)
# Linux/macOS
# Windows
# Optional Qdrant collection name (default: directory-indexer)
# Note: Setting to "test" enables auto-cleanup for testing
# Optional API keys
# if using hosted Ollama
For MCP clients (like Claude Desktop), configure with environment variables:
Supported Files
- Text:
.md,.txt - Code:
.rs,.py,.js,.ts,.go,.java, etc. - Data:
.json,.yaml,.csv,.toml - Config:
.env,.conf,.ini
Documentation
- API Reference: Complete CLI and MCP tool documentation
- Contributing: Development setup and guidelines
- Design: Architecture and technical decisions
Usage Examples
Once indexed, try these queries with your AI assistant:
Search by concept:
- "Find API authentication examples"
- "Show me error handling patterns"
- "Find configuration for Redis"
Find similar content:
- "Show me incidents similar to this outage report" (when you have an incident file open)
- "Find documentation like this API guide" (when viewing an API doc)
- "What files are similar to my deployment script?"
Troubleshoot issues:
- "Find troubleshooting guides on SQL deadlocks"
- "Show me solutions for timeout errors"
- "Find debugging tips for performance issues"
License
MIT