| Crates.io | directory-indexer |
| lib.rs | directory-indexer |
| version | 0.0.10 |
| created_at | 2025-06-28 09:46:11.471834+00 |
| updated_at | 2025-06-30 23:41:12.624902+00 |
| description | AI-powered directory indexing with semantic search for MCP servers |
| homepage | https://github.com/peteretelej/directory-indexer |
| repository | https://github.com/peteretelej/directory-indexer |
| max_upload_size | |
| id | 1729689 |
| size | 466,284 |
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.
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:
Choose one option:
Docker (recommended for most users):
docker run -d --name qdrant \
-p 127.0.0.1:6333:6333 \
-v qdrant_storage:/qdrant/storage \
qdrant/qdrant
qdrant_storage for persistent storage.Alternative: Install natively from qdrant.tech
Choose one option:
Option A: Ollama (recommended - free, runs locally)
# Install Ollama
curl -fsSL https://ollama.ai/install.sh | sh # Linux/macOS
# For Windows: Download from https://ollama.ai
# Pull the embedding model
ollama pull nomic-embed-text
Option B: OpenAI (requires paid API key)
export OPENAI_API_KEY="your-api-key-here"
Test your setup:
# Check Qdrant
curl http://localhost:6333/collections
# Check Ollama
curl http://localhost:11434/api/tags
If either fails, directory-indexer will show a helpful error with setup guidance.
npm install -g directory-indexer
Configure with Claude Desktop:
{
"mcpServers": {
"directory-indexer": {
"command": "directory-indexer",
"args": ["serve"]
}
}
}
Start the MCP server:
directory-indexer serve
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".
# Index your directories
# Linux/macOS
directory-indexer index /home/user/projects/api-docs /mnt/work/incident-reports
# Windows
directory-indexer index "C:\work\documentation" "D:\projects\my-app\docs"
# Search semantically
directory-indexer search "database timeout errors"
# Find similar files
# Linux/macOS
directory-indexer similar /mnt/work/incident-reports/redis-outage.md
# Windows
directory-indexer similar "C:\work\incidents\redis-outage.md"
# Get file content
directory-indexer get /home/user/projects/api-docs/auth-guide.md
# Show status
directory-indexer status
Directory Indexer uses environment variables for configuration. Set these if your services run on different ports or require API keys:
# Service endpoints (defaults shown)
export QDRANT_ENDPOINT="http://localhost:6333"
export OLLAMA_ENDPOINT="http://localhost:11434"
# Optional data directory (default: ~/.directory-indexer)
# Linux/macOS
export DIRECTORY_INDEXER_DATA_DIR="/opt/directory-indexer-data"
# Windows
set DIRECTORY_INDEXER_DATA_DIR=D:\data\directory-indexer
# Optional Qdrant collection name (default: directory-indexer)
# Note: Setting to "test" enables auto-cleanup for testing
export DIRECTORY_INDEXER_QDRANT_COLLECTION="my-custom-collection"
# Optional API keys
export QDRANT_API_KEY="your-qdrant-key"
export OLLAMA_API_KEY="your-ollama-key" # if using hosted Ollama
For MCP clients (like Claude Desktop), configure with environment variables:
{
"mcpServers": {
"directory-indexer": {
"command": "directory-indexer",
"args": ["serve"],
"env": {
"QDRANT_ENDPOINT": "http://localhost:6333",
"OLLAMA_ENDPOINT": "http://localhost:11434",
"DIRECTORY_INDEXER_DATA_DIR": "/opt/directory-indexer-data"
}
}
}
}
.md, .txt.rs, .py, .js, .ts, .go, .java, etc..json, .yaml, .csv, .toml.env, .conf, .iniOnce indexed, try these queries with your AI assistant:
Search by concept:
Find similar content:
Troubleshoot issues:
MIT