# Lybrary

> Lybrary is an open-source MCP server for developer tools. Local MCP server that indexes a repo by code structure so agents find source lines fast. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, Self-hosted
- **Repository:** https://github.com/vibhu-dixit/lybrary
- **MCP Registry name:** io.github.vibhu-dixit/lybrary
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools), [knowledge and memory](https://ai-powered.com/categories/knowledge-and-memory)
- **Listing updated:** 2026-11-23

## About

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.

## Features

- **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

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add lybrary -- uvx lybrary
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "lybrary": {
      "command": "uvx",
      "args": [
        "lybrary"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "lybrary": {
      "command": "uvx",
      "args": [
        "lybrary"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "lybrary": {
      "command": "uvx",
      "args": [
        "lybrary"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "lybrary": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "lybrary"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add lybrary -- uvx lybrary
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.lybrary]
command = "uvx"
args = ["lybrary"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "lybrary": {
      "command": "uvx",
      "args": [
        "lybrary"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user lybrary uvx -- lybrary

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "lybrary": {
      "command": "uvx",
      "args": [
        "lybrary"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```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 (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "lybrary": {
      "command": "uvx",
      "args": [
        "lybrary"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```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 (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "lybrary": {
      "command": "uvx",
      "args": [
        "lybrary"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "lybrary": {
      "command": "uvx",
      "args": [
        "lybrary"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "lybrary": {
      "command": "uvx",
      "args": [
        "lybrary"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "lybrary": {
      "command": "uvx",
      "args": [
        "lybrary"
      ]
    }
  }
}
```

## Tools

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_query` (name suggests: reads): Search the repository index for symbols and code, returning ranked paths and line ranges
- `memory_status` (name suggests: reads): Report the active repository and index health
- `memory_update` (name suggests: changes): Trigger incremental, full or path-scoped re-indexing

## 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.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Context7](https://ai-powered.com/mcp/context7): Context7 is a freemium MCP server for developer tools.
- [Chrome DevTools MCP](https://ai-powered.com/mcp/chrome-devtools-mcp-2): Chrome DevTools MCP is an open-source MCP server for browser automation.
- [Codebase Memory](https://ai-powered.com/mcp/codebase-memory): Codebase Memory is an open-source MCP server for knowledge and memory.
- [GitHub](https://ai-powered.com/mcp/github): GitHub is an open-source MCP server for developer tools.
- [Serena MCP: the IDE for your agent](https://ai-powered.com/mcp/serena-mcp-the-ide-for-your-agent): Serena MCP: the IDE for your agent is an open-source MCP server for developer tools.
- [awesome-mcp-servers](https://ai-powered.com/mcp/awesome-mcp-servers-2): awesome-mcp-servers is an open-source MCP server for developer tools.
- [XERJ](https://ai-powered.com/mcp/xerj): XERJ is an open-source MCP server for knowledge and memory.

---
Source: https://ai-powered.com/mcp/lybrary
