[MLsys2026 Best Paper]: https://arxiv.org/abs/2506.08276. RAG on Everything with LEANN. Enjoy 97% storage savings while running a fast, accurate, and 100% private RAG application on your personal device.
Python aifaissgpt-osslangchainllama-indexllmlocalstorageoffline-firstollamaprivacypythonragretrieval-augmented-generationvector-databasevector-searchvectors
[Readme]More about claude code
yichuan52003091032067fef6046674
diff --git a/README.md b/README.mdindex 614d60c..5b08fac 100755--- a/README.md+++ b/README.md@@ -20,7 +20,7 @@ LEANN achieves this through *graph-based selective recomputation* with *high-deg**Ready to RAG Everything?** Transform your laptop into a personal AI assistant that can semantic search your **[file system](#-personal-data-manager-process-any-documents-pdf-txt-md)**, **[emails](#-your-personal-email-secretary-rag-on-apple-mail)**, **[browser history](#-time-machine-for-the-web-rag-your-entire-browser-history)**, **[chat history](#-wechat-detective-unlock-your-golden-memories)**, **[codebase](#-claude-code-integration-transform-your-development-workflow)**\* , or external knowledge bases (i.e., 60M documents) - all on your laptop, with zero cloud costs and complete privacy.-\* Claude Code only supports basic `grep`-style keyword search. **LEANN** is a drop-in **semantic search MCP service fully compatible with Claude Code**, unlocking intelligent retrieval without changing your workflow.+\* Claude Code only supports basic `grep`-style keyword search. **LEANN** is a drop-in **semantic search MCP service fully compatible with Claude Code**, unlocking intelligent retrieval without changing your workflow. 🔥 Check out [the easy setup →](packages/leann-mcp/README.md)diff --git a/packages/leann-mcp/README.md b/packages/leann-mcp/README.mdindex d5fa99f..b762ae9 100644--- a/packages/leann-mcp/README.md+++ b/packages/leann-mcp/README.md@@ -1,18 +1,25 @@-# LEANN Claude Code Integration+# 🔥 LEANN Claude Code Integration-Intelligent code assistance using LEANN's vector search directly in Claude Code.+Transform your development workflow with intelligent code assistance using LEANN's semantic search directly in Claude Code.## Prerequisites-First, install LEANN CLI globally:+**Step 1:** First, complete the basic LEANN installation following the [📦 Installation guide](../../README.md#installation) in the root README:+```bash+uv venv+source .venv/bin/activate+uv pip install leann+```++**Step 2:** Install LEANN globally for MCP integration:```bashuv tool install leann-core```This makes the `leann` command available system-wide, which `leann_mcp` requires.-## Quick Setup+## 🚀 Quick SetupAdd the LEANN MCP server to Claude Code:@@ -20,23 +27,25 @@ Add the LEANN MCP server to Claude Code:claude mcp add leann-server -- leann_mcp```-## Available Tools+## 🛠️ Available Tools++Once connected, you'll have access to these powerful semantic search tools in Claude Code:-- **`leann_list`** - List available indexes across all projects-- **`leann_search`** - Search code and documents with semantic queries-- **`leann_ask`** - Ask questions and get AI-powered answers from your codebase+- **`leann_list`** - List all available indexes across your projects+- **`leann_search`** - Perform semantic searches across code and documents+- **`leann_ask`** - Ask natural language questions and get AI-powered answers from your codebase-## Quick Start+## 🎯 Quick Start Example```bash-# Build an index for your project-leann build my-project --docs ./ #change to your doc PATH+# Build an index for your project (change to your actual path)+leann build my-project --docs ./# Start Claude Codeclaude```-Then in Claude Code:+**Try this in Claude Code:**```Help me understand this codebase. List available indexes and search for authentication patterns.```@@ -46,24 +55,37 @@ Help me understand this codebase. List available indexes and search for authenti</p>-## How It Works+## 🧠 How It Works-- **`leann`** - Core CLI tool for indexing and searching (installed globally)+The integration consists of three key components working seamlessly together:++- **`leann`** - Core CLI tool for indexing and searching (installed globally via `uv tool install`)- **`leann_mcp`** - MCP server that wraps `leann` commands for Claude Code integration-- Claude Code calls `leann_mcp`, which executes `leann` commands and returns results+- **Claude Code** - Calls `leann_mcp`, which executes `leann` commands and returns intelligent results++## 📁 File Support-## File Support+LEANN understands **30+ file types** including:+- **Programming**: Python, JavaScript, TypeScript, Java, Go, Rust, C++, C#+- **Data**: SQL, YAML, JSON, CSV, XML+- **Documentation**: Markdown, TXT, PDF+- **And many more!**-Python, JavaScript, TypeScript, Java, Go, Rust, SQL, YAML, JSON, and 30+ more file types.+## 💾 Storage & Organization-## Storage+- **Project indexes**: Stored in `.leann/` directory (just like `.git`)+- **Global registry**: Project tracking at `~/.leann/projects.json`+- **Multi-project support**: Switch between different codebases seamlessly+- **Portable**: Transfer indexes between machines with minimal overhead-- Project indexes in `.leann/` directory (like `.git`)-- Global project registry at `~/.leann/projects.json`-- Multi-project support built-in+## 🗑️ Uninstalling-## Removing+To remove the LEANN MCP server from Claude Code:```bashclaude mcp remove leann-server```+To remove LEANN+```+uv pip uninstall leann leann-backend-hnsw leann-core+```