Claude Desktop Integration
Use LocalLens with Claude Desktop to search your local files from the Claude chat interface.
Setup
- Install LocalLens with MCP support:
bash
pip install "locallens[mcp]"- Index your files:
bash
locallens index ~/Documents- Add to your Claude Desktop config:
macOS
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
json
{
"mcpServers": {
"locallens": {
"command": "locallens",
"args": ["serve", "--mcp"]
}
}
}Windows
Edit %APPDATA%\Claude\claude_desktop_config.json:
json
{
"mcpServers": {
"locallens": {
"command": "locallens",
"args": ["serve", "--mcp"]
}
}
}- Restart Claude Desktop.
Verify the connection
After restarting Claude Desktop:
- Open a new conversation
- Look for the tools icon (hammer) in the input area
- You should see LocalLens tools listed:
locallens_search,locallens_ask,locallens_index,locallens_status,locallens_files
Example conversation
You: "Search my documents for anything about the Q3 budget"
Claude: Uses locallens_search to find relevant documents, then summarizes the results.
You: "What were the key takeaways from that budget meeting?"
Claude: Uses locallens_ask to generate an answer with source citations.
Troubleshooting
- Tools not showing up? Make sure the config JSON is valid and
locallensis on your PATH. Try runninglocallens serve --mcpin a terminal to verify it starts. - "Ollama not available" errors? The
asktool requires Ollama. Search, index, and status work without it. - Empty results? Make sure you've indexed your files first:
locallens index ~/Documents
