LEANN
[MLsys2026]: RAG on Everything with LEANN. Enjoy 97% storage savings while running a fast, accurate, and 100% private RAG application on your personal device.
LEANN is an MCP server that provides ultra-lightweight semantic search capabilities for AI coding assistants and personal data indexing. It achieves 97% storage savings compared to traditional vector databases through graph-based selective recomputation, allowing developers to index millions of documents on local devices. The MCP server integrates directly with Claude Code and other AI assistants to enable semantic code search, document retrieval, and RAG (Retrieval-Augmented Generation) over personal data sources including codebases, emails, chat history, browser history, and documents. All processing happens locally with complete privacy and zero cloud costs.
Key Features
Use Cases
- 01Semantic code search across entire projects in Claude Code with 2.1× better initial relevant-code recall
- 02Building private RAG systems over personal documents, emails, and chat histories on a laptop
- 03Searching through millions of browser history entries or WeChat messages locally
- 04Creating searchable knowledge bases from ChatGPT/Claude conversation exports
- 05Indexing Slack workspaces and Twitter bookmarks through MCP integration
- 06Code assistance with context-aware debugging using AST-aware chunking
Related MCP Servers
View moremarkitdown
Python tool for converting files and office documents to Markdown.
firecrawl
The context API to search, scrape, and interact with the web at scale. 🔥
prompts.chat
f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open source — self-host for your organization with complete privacy.
langflow
Langflow is a powerful tool for building and deploying AI-powered agents and workflows.
LEANN — FAQ
What is LEANN?+
LEANN is an MCP server that provides semantic search and RAG capabilities for AI assistants like Claude Code. It uses graph-based recomputation to achieve 97% storage savings compared to traditional vector databases while maintaining full accuracy.
How do I install LEANN as an MCP server for Claude Code?+
Install LEANN globally with 'uv tool install leann-core --with leann', then add it to Claude Code using 'claude mcp add --scope user leann-server -- leann_mcp'. The server configuration is automatic after installation.
Which AI clients work with LEANN?+
LEANN works with any MCP-compatible client, including Claude Code and Claude Desktop. It can also be used programmatically through its Python API with various LLM backends (OpenAI, Ollama, HuggingFace, Anthropic).
Does LEANN require API keys or cloud services?+
LEANN runs completely locally by default with no API keys required. For LLM generation (RAG responses), you can use local models via Ollama/HuggingFace or optionally use cloud providers like OpenAI or Anthropic with your API keys.
Is LEANN free to use?+
Yes, LEANN is free and open-source under the MIT License. It has zero telemetry and all processing happens on your device with no cloud costs.
What are the prerequisites for using LEANN?+
LEANN requires Python 3.10-3.14 and uv package manager. For building from source, you'll need platform-specific dependencies (libomp, boost, protobuf). Full disk access is needed on macOS for indexing emails and iMessage.
How do I install LEANN?+
Open the source repository on GitHub and follow its README. LEANN is a mcp server — MCP Agents Market links you directly to the official repo.
Is LEANN free?+
LEANN is an open-source project hosted on GitHub. Check the repository for its license and any usage requirements.