codebase-memory-mcp vs xerj
Local code search and knowledge tools compared
codebase-memory-mcp and xerj both provide local tools that help AI agents work with code and other repository content. codebase-memory-mcp centers on a persistent graph of code structure and relationships, while xerj focuses on BM25, vector, and hybrid search across code and other files.

codebase-memory-mcp: Build a Searchable Code Knowledge Graph
A local MCP server that indexes repositories into a persistent graph of code structure and relationships. It helps AI coding agents answer architectural and code-navigation questions with focused queries instead of repeated file searches.

xerj: Local-First Search for Code and AI Agents
XERJ is a Rust search engine and MCP server for AI agents, combining BM25, vector and hybrid search behind an Elasticsearch-compatible API. It indexes local code and other files for code search, RAG and agent memory, and runs on Linux, macOS and Windows.
| codebase-memory-mcp | xerj | |
|---|---|---|
| Language | C | Rust |
| License | MIT | Apache-2.0 |
| Stars | 45.7k | 13.2k |
| Forks | 3.8k | 947 |
| Last analyzed | Oct 3, 2026 | Oct 23, 2026 |
Key differences
- codebase-memory-mcp builds a graph of definitions, calls, imports, routes, and types; xerj indexes content for full-text, vector, and hybrid search.
- codebase-memory-mcp emphasizes code structure, architecture queries, and change-impact analysis; xerj also targets documents, logs, agent memory, and reference coding.
- codebase-memory-mcp is written in C and licensed under MIT; xerj is written in Rust and licensed under Apache-2.0.
- codebase-memory-mcp stores graph data locally in SQLite; xerj ships as a single binary for Linux, macOS, and Windows and offers an Elasticsearch-compatible API.
- codebase-memory-mcp is presented as an established project with 45.7k stars; xerj has 13.2k stars and is described as less than six months old and changing quickly.
Choose codebase-memory-mcp if you…
- need graph queries for code relationships, call tracing, or architecture summaries.
- want local code context for an MCP-compatible agent, including change-impact analysis.
- need route-to-call exploration across services or repositories.
Choose xerj if you…
- want BM25, vector, or hybrid search across code, documents, logs, and structured files.
- need namespace-based agent memory or local RAG without a separate search service.
- want an Elasticsearch-compatible search API and a binary available for Linux, macOS, and Windows.
Compare the numbers side by side, or add more projects
This comparison is generated with AI from the OSRepos analyses of both projects. Always check each project's repository and documentation before choosing.