lybrary

Setup guide

Codebase memory for Claude Code

Lybrary gives Claude Code a local MCP tool for finding source locations without starting every search from a full-file read.

1. Install and index

pip install lybrary
cd /path/to/your/repo
lybrary start
lybrary status

2. Connect Claude Code

Install the Lybrary plugin from its GitHub marketplace. It registers lybrary mcp and includes a setup skill:

claude plugin marketplace add vibhu-dixit/lybrary
claude plugin install lybrary@lybrary

Or register the MCP server directly without the plugin:

claude mcp add --scope user --transport stdio lybrary -- lybrary mcp
claude mcp list

Start Claude Code inside the indexed repository. Use /mcp to inspect the connection, then ask it to call memory_status.

3. Add a project instruction

Put this in the repository's CLAUDE.md:

When .lybrary/index.db exists, use Lybrary memory_query before broad code searches
or reading multiple files. Inspect returned paths and lines before editing.
If the index is absent or the tool fails, use normal search.

Each repository can tune its own embedding model, chunk sizes, indexed languages, excluded paths, and watcher debounce in .lybrary/config.toml. Rebuild after changing settings that alter the stored index.

The MCP connection supplies the tool; it does not automatically make every Claude Code session call it. The project instruction gives the agent a clear trigger.

For current Claude Code MCP syntax, see the official Claude Code documentation.