feat: MCP server v2 — build, status tools, smart embedding defaults, and incremental build fixes#279
Merged
Merged
Conversation
…ch output - Add `leann_build` tool: build/update indexes directly from MCP, supports incremental updates so the index stays current as code changes - Add `leann_status` tool: show index details (backend, embedding model, chunk count, file count, size) - Switch `leann_search` to use --json output with file paths always included, formatted as markdown code blocks for better code context - Fix float32 JSON serialization in `leann search --json` - Clean up tool descriptions to be concise and action-oriented - Bump MCP server version to 2.0.0 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ate vscode settings Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Platform-aware default embedding model (bge-base-en-v1.5 on NVIDIA GPU, all-MiniLM-L6-v2 elsewhere). Normalize model names to prevent false mismatch on incremental updates. MCP build auto-inherits embedding config from existing index. Fix full rebuild path to reload all documents. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts: # docs/CHANGELOG.md # packages/leann-core/src/leann/mcp.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Strengthen LEANN's incremental update story — from MCP integration to smart defaults to correctness fixes.
leann_buildMCP tool: Build or incrementally update indexes directly from Claude Code. Auto-inherits embedding model from existing index metadata to avoid mismatch on incremental updates.leann_statusMCP tool: Inspect index details — backend type, embedding model, dimensions, chunk count, file count, total size.leann_searchimprovements: Uses--jsonstructured output. File paths always included. Markdown code block formatting.bge-base-en-v1.5on NVIDIA GPU,all-MiniLM-L6-v2elsewhere (replacesfacebook/contriever). Model name normalization prevents false mismatch during incremental updates.all_textsfrom incremental path).float32JSON serialization inleann search --json.Test plan
leann_listreturns index listing via MCPleann_searchreturns structured JSON with file paths and markdown formattingleann_statusshows index metadata (backend, model, chunks, files, size)leann_buildaccepts docs list and passes to CLIruff check,ruff format)🤖 Generated with Claude Code