From e309f292de43f28f4424782428bb8bfad4a736bf Mon Sep 17 00:00:00 2001 From: Aiden Huang <104961329+aidentothe@users.noreply.github.com> Date: Sun, 7 Sep 2025 17:39:58 -0400 Subject: [PATCH] docs(mcp): add root llms.txt for MCP discovery; update MCP README to reference it; refs #76 (#91) --- .gitignore | 1 + llms.txt | 28 ++++++++++++++++++++++++++++ packages/leann-mcp/README.md | 2 ++ 3 files changed, 31 insertions(+) create mode 100644 llms.txt diff --git a/.gitignore b/.gitignore index b7c04b4..fbd80f2 100755 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ demo/experiment_results/**/*.json *.sh *.txt !CMakeLists.txt +!llms.txt latency_breakdown*.json experiment_results/eval_results/diskann/*.json aws/ diff --git a/llms.txt b/llms.txt new file mode 100644 index 0000000..e470008 --- /dev/null +++ b/llms.txt @@ -0,0 +1,28 @@ +# llms.txt — LEANN MCP and Agent Integration +product: LEANN +homepage: https://github.com/yichuan-w/LEANN +contact: https://github.com/yichuan-w/LEANN/issues + +# Installation +install: uv tool install leann-core --with leann + +# MCP Server Entry Point +mcp.server: leann_mcp +mcp.protocol_version: 2024-11-05 + +# Tools +mcp.tools: leann_list, leann_search + +mcp.tool.leann_list.description: List available LEANN indexes +mcp.tool.leann_list.input: {} + +mcp.tool.leann_search.description: Semantic search across a named LEANN index +mcp.tool.leann_search.input.index_name: string, required +mcp.tool.leann_search.input.query: string, required +mcp.tool.leann_search.input.top_k: integer, optional, default=5, min=1, max=20 +mcp.tool.leann_search.input.complexity: integer, optional, default=32, min=16, max=128 + +# Notes +note: Build indexes with `leann build --docs ` before searching. +example.add: claude mcp add --scope user leann-server -- leann_mcp +example.verify: claude mcp list | cat diff --git a/packages/leann-mcp/README.md b/packages/leann-mcp/README.md index cf783d4..356065d 100644 --- a/packages/leann-mcp/README.md +++ b/packages/leann-mcp/README.md @@ -2,6 +2,8 @@ Transform your development workflow with intelligent code assistance using LEANN's semantic search directly in Claude Code. +For agent-facing discovery details, see `llms.txt` in the repository root. + ## Prerequisites Install LEANN globally for MCP integration (with default backend):