xerj-org

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.

Stars
13.2k
Forks
947
Last commit
today
Contributors
70
Releases, 12 months
100+

Our take

Newless than six months old and changing fast

Health score

79/100

How it is scored
Activity
90
Community
51
Issues
94
Pull requests
81
  • Releases more often than 93% of the projects we track
  • Merges more pull requests than 89% of the projects we track
  • Closes issues faster than 82% of the projects we track

XERJ is a fast-moving, unusually broad local search tool with active development, but its newness and strong dependence on one contributor make it worth evaluating on a representative workload before relying on it for critical systems.

Good fit if

  • You want a self-hosted Rust binary that combines full-text, vector and hybrid search with an Elasticsearch-compatible API.
  • Your coding agent can use MCP, or your workflow already uses Elasticsearch clients and you want to search local code and documents.
  • Offline-first lexical search is sufficient, or you are willing to opt into neural embeddings and stage their model files.

Look elsewhere if

  • You need an established project with less dependence on one contributor.
  • You require complete Elasticsearch compatibility: the project reports some conformance gaps and documents specific behavioral limits.
  • You need an MCP integration already verified in your particular client. The README says only its OpenCode setup has been tested.
All health signals
Last commit2026-10-23 (today)
Commits, last 90 days100+
Releases, last 12 months100+ (latest v1.0.0-rc.98, 2026-10-22)
Contributors70 (top contributor: 86% of commits)
Issues closed, last 90 days53+ (typically closed in 0 days)
Pull requests merged, last 90 days83 (typically merged in 0 days)
Project age4 months

Checked on 2026-10-23 with the GitHub API.

Overview

XERJ is a local-first search engine and MCP server for AI agents, built in Rust. It indexes code, documents, logs and structured files, then serves BM25 full-text, vector and hybrid search through an Elasticsearch-compatible API. The goal is to give agents relevant passages instead of making them read whole files or rely on grep alone.

It is aimed at developers using Claude Code, Cursor or other MCP clients, as well as teams that want local search, RAG or agent memory without a separate search service. It ships as a single binary for Linux, macOS and Windows. The default lexical embedder works offline; neural embeddings are optional.

Key Features

  • Automatically indexes folders containing source code, documents, logs, CSV, JSONL, PDFs and other supported formats.
  • Parses source code with tree-sitter to provide symbols and line locations alongside full-text search.
  • Provides BM25, vector and hybrid search, with query syntax compatible with Elasticsearch clients.
  • Exposes search and memory tools to agents through an MCP server included in the binary.
  • Supports persistent agent memory through namespace-based memory endpoints.
  • Offers code definition lookup and reference-coding search for finding implementations in related repositories.
  • Includes incremental indexing that skips parsing unchanged files.
  • Provides an optional neural embedding mode; the default lexical embedding mode is offline.

Use Cases

  • Reference coding: Developers can index related open-source projects and retrieve implementation examples before writing code, especially when working with unfamiliar or less common APIs.
  • Codebase Q&A: Coding agents and engineers can search a local repository for relevant passages and definitions rather than opening files one by one.
  • Local RAG and agent memory: Teams can index their own documents and let agents retrieve information across sessions without relying on a separate vector database.
  • Log and document search: Operators can query mixed-format logs and files through one Elasticsearch-compatible interface.
  • Security review: Auditors can search a code tree for risky calls, secrets and sink patterns across supported file types.

What you need

Detected in the repository

  • Rust (main language on GitHub)
  • Automated checks on GitHub Actions

License in plain words

Apache-2.0permissive

  • Commercial use: yes
  • Modify and redistribute: yes
  • You must keep: the license, the NOTICE file and a note of your changes
  • Share your changes: no
  • Includes an explicit patent grant from the contributors:

A summary, not legal advice: the LICENSE file is what applies.

Getting Started

Install and index a project:

curl -fsSL https://xerj.org/get | sh
xerj --insecure --data-dir ~/xerj-data &
xerj autoindex ~/my-project

--insecure disables TLS and API-key authentication, so use it only for a local development node. See the README and installation guide for authenticated setup, MCP configuration and platform details.

Alternatives

  • codebase-memory-mcp: It indexes repository structure into a code graph for architectural queries, while xerj offers BM25, vector, and hybrid search across files.
  • Koshi: Koshi combines project memory and code retrieval for coding agents, while xerj centers on general-purpose file indexing and hybrid search.
  • open-index: Open Index stores structured concepts and relationships for agent memory, while xerj focuses on full-text, vector, and hybrid search over files.
ProjectLanguageLicenseStarsStatus
xerjRustApache-2.013.2kNew
codebase-memory-mcpCMIT45.7kActive
KoshiC#MIT2Quiet
open-indexPythonMIT112New

Considerations

  • The project is less than six months old and changing quickly. Recent commit and release activity is high, but that pace also means behavior may change as it matures.
  • Most code contribution is concentrated with one person, despite a wider contributor base. This is a project-continuity consideration, not a sign of inactivity.
  • The Elasticsearch compatibility suite still has documented gaps. XERJ is compatible at the API level, but is not an Elasticsearch internals reimplementation; check the compatibility documentation for your use case.
  • A fresh --insecure node binds to localhost, but that mode has no authentication or TLS. Every caller able to reach the port can access and delete indexes. Use the documented authenticated mode for shared hosts.
  • Neural embedding is optional and requires model files to be available locally before semantic operations. The default lexical mode is offline.
  • Optional reranking sends result text to an external service when configured. It is disabled unless enabled with a provider key; review the reranking documentation before using it.
  • The project is licensed under Apache-2.0. Review the license when distributing or modifying it.

Found this useful?

Share it with someone who would like xerj.