
Lybrary
io.github.vibhu-dixitPublished by GitHub account vibhu-dixitv0.3.2Updated Oct 24, 2026
Local codebase memory and repository code search for Codex, Claude Code, and MCP coding agents.
Overview
Lybrary is a local codebase memory server that indexes a repository and lets coding agents search its functions, classes and files before reading whole files.
- What you can do
- Search the indexed repository by exact symbol or SQLite full-text match, with semantic embedding search as a fallback, returning ranked paths, symbols, line ranges and numbered excerpts; optionally include full chunk content. Check the active repository root and index health. Trigger incremental, full or path-scoped re-indexing. Indexing covers Python, JavaScript, TypeScript, TSX, Go, Rust, Java, C and C++, with a background file watcher refreshing changed files.
- When to use it
- Useful when a coding agent works in a repository across sessions and needs to locate a feature or trace a call path without repeated broad searches and large file reads. Best for repositories in the supported languages that you are willing to index locally.
- Requirements
- A local Python environment with the lybrary package installed from PyPI, plus the lybrary start command run in each repository to build the index and start the file-watching daemon. The MCP server is registered as a stdio command with the mcp argument. The first indexing run may download a local embedding model; no API key or hosted database is needed.
Installation
In SourceWeft
- Open Lybrary in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Lybrary — local codebase memory for coding agents
Lybrary indexes a repository by code structure and gives Codex, Claude Code, and other MCP clients a searchable map of its functions, classes, and files. It runs locally, watches for changes, and lets an agent find relevant source lines before opening whole files.
PyPI · Documentation · Agent setup guide · Source · Issues
If you want a coding agent to set this up, ask it to find and install a local MCP code search tool for the repository and point it to the agent setup guide. The guide identifies the PyPI package, source repository, install command, and checks that confirm the agent is using this repo's index.
Start in any repository
Install once, then run lybrary start in each folder you want indexed:
start creates .lybrary/ if needed, builds the index, and runs a file-watching daemon in the background. It keeps running after the terminal closes. Run lybrary stop in that repository to stop it. The first indexing run may download the local embedding model; later runs use the cache.
Each repository has its own index and .lybrary/config.toml. The index stays on your machine; no API key or hosted database is required.
Connect an agent
Register the MCP server once on your machine. Start your agent in an indexed repository, then ask it to call memory_status to confirm the root and chunk count.
Codex
Codex users can install Lybrary's setup skill from the repository's plugin marketplace:
The plugin helps with setup; register the local MCP server separately:
Add this to that repository's AGENTS.md if you want Codex to use the memory consistently:
Claude Code
Claude Code users can install the repository's plugin, which registers the MCP server and includes a setup skill:
The Python package must also be installed with pip install lybrary. Or register the MCP server directly without the plugin:
In Claude Code, /mcp shows connection status. Put the same instruction in the repository's CLAUDE.md. Registration makes the tool available; the instruction helps the agent choose it when useful.
For another stdio MCP client, configure command lybrary with argument mcp. See the setup guides.
What the agent gets
memory_query checks exact symbols and an SQLite FTS5 index first. Strong lexical matches avoid loading the embedding model; semantic search remains a fallback when wording does not match the code. Its default response gives ranked paths, symbols, line ranges, and compact numbered excerpts. If a trace crosses a named call missing from the first result, query that symbol once. Set include_content=true when a full chunk is needed.
memory_status reports the active repository and index health. memory_update triggers incremental, full, or path-scoped re-indexing.
This can avoid repeated broad searches and large file reads, especially when the agent needs to locate a feature across sessions. Actual token use depends on the task, the agent's tool choices, and how much source it still needs to inspect. The benchmark guide explains how to compare complete runs rather than infer savings from the size of one response.
Make it fit your repo
Edit .lybrary/config.toml to choose the embedding model and device, chunk sizes, indexed languages, excluded paths, and file-watcher debounce. Add Git-style ignore patterns to .lybrary/ignore. Re-run lybrary index --full after changing settings that affect stored chunks or embeddings.
Supported parsers: Python, JavaScript, TypeScript, TSX, Go, Rust, Java, C, and C++. The indexer uses tree-sitter boundaries and refreshes changed files while the daemon is running.
CLI
If an agent starts above the indexed repository, pass that repository's absolute path as repo_root to the MCP tool, or start the agent inside it.
Measure the effect
From a source checkout, compare the same read-only question with and without Lybrary:
The script records both answers, tool calls, and total, cached, and uncached input tokens under .lybrary/benchmarks/. Check answer correctness first; one question does not establish typical savings.
Contribute
Issues and pull requests are welcome. For a local checkout:
Lybrary is MIT licensed. See the changelog for releases.
Source: README.md at commit 7a59db4
Tools
0Version history
2- v0.3.2LatestOct 13, 2026
- v0.3.0Oct 13, 2026
Score
40% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
Declare a license in the repository or the registry entry.
