Lybrary
Local MCP server that indexes a repo by code structure so agents find source lines fast
Lybrary is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- CLI, Self-hosted
- Runs
- Locally
- What it can do
- Can change data (1 tool)
- Version
- 0.3.2
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add lybrary -- uvx lybraryAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"lybrary": {
"command": "uvx",
"args": [
"lybrary"
]
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"lybrary": {
"command": "uvx",
"args": [
"lybrary"
]
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"lybrary": {
"command": "uvx",
"args": [
"lybrary"
]
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"lybrary": {
"type": "stdio",
"command": "uvx",
"args": [
"lybrary"
]
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add lybrary -- uvx lybraryOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.lybrary]
command = "uvx"
args = ["lybrary"]Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"lybrary": {
"command": "uvx",
"args": [
"lybrary"
]
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "lybrary": { "command": "uvx", "args": [ "lybrary" ] } } }Or run: gemini mcp add -s user lybrary uvx -- lybrary
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "lybrary": { "command": "uvx", "args": [ "lybrary" ] } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "lybrary": { "command": "uvx", "args": [ "lybrary" ] } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "lybrary": { "command": "uvx", "args": [ "lybrary" ] } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "lybrary": { "command": "uvx", "args": [ "lybrary" ] } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "lybrary": { "command": "uvx", "args": [ "lybrary" ] } } }Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "lybrary": { "command": "uvx", "args": [ "lybrary" ] } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "lybrary": { "command": "uvx", "args": [ "lybrary" ] } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
About Lybrary
Lybrary builds a per-repository index of functions, classes and files and serves it to Codex, Claude Code and other MCP clients. You run lybrary start in a repo, which builds the index and leaves a file-watching daemon running; the index and a .lybrary/config.toml stay on your machine, and no API key or hosted database is needed. The first run may download a local embedding model.
Three MCP tools do the work. memory_query checks exact symbols and an SQLite FTS5 index first, so strong lexical matches avoid loading the embedding model, with semantic search as a fallback when wording differs. It returns ranked paths, symbols, line ranges and short numbered excerpts. memory_status reports the active repo and index health, and memory_update triggers incremental, full or path-scoped re-indexing.
Parsing uses tree-sitter for Python, JavaScript, TypeScript, TSX, Go, Rust, Java, C and C++. The README is careful about savings claims: actual token use depends on the task, and a bundled benchmark script compares complete runs with and without it. Codex and Claude Code plugins help with setup, and the project is MIT licensed.
Tools this server provides (3)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 1 of 3 tools changes data.
From the server's own tool labels and tool names; not verified by us.
- memory_queryName suggests: reads
- Search the repository index for symbols and code, returning ranked paths and line ranges
- memory_statusName suggests: reads
- Report the active repository and index health
- memory_updateName suggests: changes
- Trigger incremental, full or path-scoped re-indexing
What it does
- Structural indexing
- Indexes functions, classes and files using tree-sitter boundaries.
- Lexical first, semantic fallback
- Exact symbol and FTS5 search runs before any embedding model loads.
- File watching
- A background daemon refreshes changed files automatically.
- Per-repo configuration
- Choose embedding model, chunk sizes, languages and excluded paths.
- Agent plugins
- Codex and Claude Code plugins help register the server.
- Benchmark script
- Compare complete agent runs with and without the index.
Good for
- Locate where a feature is implemented without reading many files
- Give an agent a persistent map of a large repository across sessions
- Trace a flow by querying one missing symbol at a time
- Keep code search entirely local
Pricing
Open source
Free, MIT licensed
Lybrary FAQ
Does Lybrary send my code anywhere?
The README says the index stays on your machine and no API key or hosted database is required.
Which languages are parsed?
Python, JavaScript, TypeScript, TSX, Go, Rust, Java, C and C++.
How do I start Lybrary?
pip install lybrary, then run lybrary start inside the repository and register it with lybrary mcp.
What licence is Lybrary under?
MIT.
Is Lybrary free?
Yes. Lybrary is open source, so you can use and self-host it for free.
How do I add Lybrary to Claude Code?
Run this command in your terminal: claude mcp add lybrary -- uvx lybrary
What are the best alternatives to Lybrary?
The closest alternatives to Lybrary are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.


