AIToday
Large Language ModelsAI Coding AssistantsOpen-Source AIHacker NewsPublished: Aug 8, 2026, 16:00 JST

Lybrary brings persistent code memory to AI agents via local MCP server

Lybrary brings persistent code memory to AI agents via local MCP server

3 Key Points

  1. What happened

    Lybrary, an open-source tool now available via pip install, gives AI coding agents a persistent, searchable index of a codebase using AST-aware chunking and local embeddings. Agents query the memory instead of re-reading files each session, and the tool exposes itself as an MCP server compatible with Kiro, Cursor, Claude Desktop, and Windsurf.

  2. Why it matters

    On large codebases, AI agents waste tokens and context re-reading the same files repeatedly before writing code. Lybrary cuts that overhead by 80–90% on large codebases by replacing multi-file reads with a single semantic search query, freeing up token budget and context for actual development work.

  3. What to watch

    The tool runs fully local with no cloud dependency, requires only `pip install lybrary` (Python 3.11–3.14, no PyTorch or compilation), and automatically re-indexes only changed files via a background daemon. Supported languages include Python, JavaScript, TypeScript, Go, Rust, Java, C, and C++.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, in your inbox every morning.

Context & Analysis

AI coding agents face a persistent inefficiency: every time they start a session, they re-read the same files to understand the codebase structure, burning tokens and filling context before writing a single line. On large codebases, this pattern repeats dozens of times per session. Lybrary addresses this by building a persistent, queryable memory indexed along actual code boundaries—functions, classes, methods—rather than arbitrary line splits. The tool uses tree-sitter, an incremental parser, to respect AST structure when chunking, ensuring that a semantic unit like a function stays intact.

The architecture is deliberately local-first: embeddings run via ONNX Runtime using MiniLM-L6-v2, SQLite stores the chunks and vectors, and a background daemon watches for file changes and re-indexes only what changed. By reducing multi-file reads to a single semantic search query, agents cut token waste by 80–90% on large codebases. Integration as an MCP server means agents in Cursor, Claude Desktop, Windsurf, and Kiro can call `memory_query` natively before attempting file reads, treating the persistent memory as a first-class tool rather than an afterthought.

FAQ
How much does Lybrary cost and where do I get it?
Lybrary is open-source and free. Install it with `pip install lybrary` (requires Python 3.11–3.14, no PyTorch or compilation needed).
Which AI editors does Lybrary work with?
Lybrary works out of the box with Kiro, Cursor, Claude Desktop, and Windsurf via MCP server integration.
What languages does Lybrary support?
Lybrary supports Python, JavaScript, TypeScript, TSX, Go, Rust, Java, C, and C++.

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleAI models alter responses based on user identity, study finds