Claude LFR MCP
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Claude LFR MCP
Lightning fast CPU-based semantic code search for Claude Code. Uses configurable embedding models and Qdrant vector database to provide intelligent code retrieval without requiring GPU resources.
Quick Start
Prerequisites
A running Qdrant instance is required. Start one with Docker:
docker run -p 6333:6333 qdrant/qdrantInstallation
uv tool install claude-lfr-mcpClaude Code Setup
Add the MCP server to Claude Code project:
claude mcp add claude-lfr -- claude-lfr-mcpVerify the installation:
/mcpYou should see claude-lfr listed with its available tools.
Then ask claude to index codebase.
Related MCP server: cindex
Embedding Models
This tool supports multiple embedding models, allowing you to choose the best tradeoff between speed, memory usage, and retrieval quality for your use case.
Model Comparison
Model | Dimension | Size | Speed | Quality | Best For |
| 384 | ~90MB | Fastest | Good | Quick prototyping, CI pipelines, large codebases |
| 384 | ~67MB | Fast | Good+ | Balance of speed and accuracy |
| 384 | ~90MB | Fast | Good+ | Modern alternative to MiniLM |
| 384 | ~130MB | Medium | Better | Production use with speed needs |
| 768 | ~438MB | Slower | Best | Default - Best retrieval quality |
| 768 | ~130MB | Medium | Better | When using Nomic ecosystem |
Model Details
all-MiniLM-L6-v2
✅ Fastest inference, smallest memory footprint
✅ No query prefix required (simpler usage)
❌ Lower retrieval accuracy than larger models
Best for: CI/CD pipelines, quick iteration, very large codebases where speed matters
bge-small-en-v1.5
✅ Excellent speed with better accuracy than MiniLM
✅ Smallest download size (~67MB)
❌ Requires "query: " prefix (handled automatically)
Best for: Daily development, good balance of speed and quality
snowflake-arctic-embed-xs / snowflake-arctic-embed-s
✅ Modern architecture, competitive performance
✅ No prefix required
❌ Less established than BGE family
Best for: Production deployments wanting modern alternatives
bge-base-en-v1.5 (Default)
✅ Best retrieval quality, well-tested
✅ Strong performance on code search tasks
❌ Larger model size (~438MB), slower inference
Best for: When accuracy is the priority, smaller codebases
nomic-embed-text-v1.5
✅ Good balance of size and quality
✅ 768 dimensions in compact ~130MB package
❌ Uses different prefix convention (search_query/search_document)
Best for: Nomic ecosystem users, medium-large codebases
Choosing a Model
Priority | Recommended Model |
Speed first |
|
Quality first |
|
Balanced |
|
Modern + compact |
|
Configuring the Model
Via CLI flag:
claude-lfr-index --model all-MiniLM-L6-v2 -r /path/to/codeVia environment variable:
EMBEDDING_MODEL=bge-small-en-v1.5 claude-lfr-indexList available models:
claude-lfr-index --list-modelsNote: Each model uses a separate Qdrant collection (e.g.,
code_bge_base_en_v15,code_minilm_l6_v2). You can override this withQDRANT_COLLECTION.
MCP Tools
Tool | Description |
| Search indexed code by natural language query with ranked results |
| Index a codebase directory for semantic search |
| Check Qdrant collection status and point count |
Advanced Usage
CLI Tools
Index a codebase:
REPO_ROOT=/path/to/your/codebase claude-lfr-indexSearch indexed code:
claude-lfr-search "authentication logic"
claude-lfr-search "database connection"Environment Variables
Variable | Default | Description |
|
| Qdrant server URL |
| None | Qdrant API key (optional) |
| Auto-generated | Collection name (e.g., |
|
| Embedding model to use (see Embedding Models) |
|
| Directory to index |
|
| Max files to index (0 = unlimited) |
Manual MCP Configuration
Project-specific (.mcp.json in project root) or user-global (~/.mcp.json):
{
"mcpServers": {
"claude-lfr": {
"command": "claude-lfr-mcp"
}
}
}Using uvx (no install required):
{
"mcpServers": {
"claude-lfr": {
"command": "uvx",
"args": ["--from", "claude-lfr-mcp", "claude-lfr-mcp"]
}
}
}Alternative Claude Code commands:
# Add to project scope
claude mcp add claude-lfr -s project -- claude-lfr-mcp
# Add globally
claude mcp add claude-lfr -s user -- claude-lfr-mcp
# Using uvx
claude mcp add claude-lfr -- uvx --from claude-lfr-mcp claude-lfr-mcpTechnical Details
How It Works
Indexing: Walks the codebase, chunks files into 80-line segments, generates embeddings (384 or 768 dimensions depending on model), and upserts to Qdrant in batches of 256
Searching: Embeds your query with the model-appropriate prefix, finds most similar code chunks via cosine similarity
Supported File Types
.py, .ts, .tsx, .js, .jsx, .rs, .go, .java, .cs, .php, .c, .cpp, .h, .hpp
Ignored Directories
.git, node_modules, .venv, dist, build, __pycache__
Development
Install from Source
git clone https://gitlab.com/derico/claude-lfr-mcp.git
cd claude-lfr-mcp
uv sync
uv tool install -e .Running MCP Server Locally
uv run claude-lfr-mcpDevelopment MCP configuration:
{
"mcpServers": {
"claude-lfr": {
"command": "uv",
"args": ["run", "claude-lfr-mcp"]
}
}
}Running Tests
Install dev dependencies and run tests:
uv sync --extra dev
uv run pytestRun with coverage report:
uv run pytest --cov=claude_lfr_mcpRun specific test file:
uv run pytest tests/test_mcp_server.py -vRequirements
Python 3.10+
Running Qdrant instance
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Shared memory for coding agents. Stop re-explaining your codebase every session.
Versioned documentation registry and semantic search for AI tools and coding assistants.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceProvides semantic code search and index status for codebases using RAG, enabling AI tools to query code knowledge.MIT
- FlicenseAqualityDmaintenanceProvides a search_code tool for coding agents to perform local, offline semantic code search on a tree-sitter AST indexed codebase using GGUF embeddings, with no network calls or API keys.1-
- FlicenseNot gradedqualityDmaintenanceEnables semantic code search over local repositories, providing tools like semantic_search and list_indexed_repos to Claude Code, so users can find relevant code sections via natural language instead of grep.-
- AlicenseAqualityBmaintenanceEnables agents to run semantic search across one or more local project directories by automatically maintaining a LAN-local Qdrant index with Ollama embeddings. Indexing, staleness checks, and incremental updates happen transparently, so users can query code by meaning without managing collections, chunks, or hashes.6MIT