</>MCP Agents Market
MCP Server

LEANN

by StarTrail-org12.8kPythonUpdated 2026-08-21

[MLsys2026]: RAG on Everything with LEANN. Enjoy 97% storage savings while running a fast, accurate, and 100% private RAG application on your personal device.

Claude CodeClaude Desktop

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

Native MCP server integration for Claude Code and compatible AI assistants
97% storage reduction through graph-based selective recomputation without accuracy loss
AST-aware code chunking for Python, Java, C#, and TypeScript preserving semantic boundaries
Multi-source data indexing: codebases, PDFs, emails, browser history, WeChat, iMessage, ChatGPT/Claude conversations
Complete privacy with local-only processing and zero telemetry
Metadata filtering with operators (==, !=, <, >, in, contains, starts_with)
Multiple backend support (HNSW for storage savings, DiskANN for speed)
File change detection via Merkle tree snapshots for incremental updates

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 more

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.

Related searches