Xerj is a local-first search engine and MCP server built specifically for AI agents: a single Rust binary that indexes code, documents, logs and data files so agents can retrieve exact answers instead of stuffing files into their context windows. The open-source project has earned more than 12,500 stars on GitHub under the Apache-2.0 license and was in very active development in 2026.
Xerj combines BM25 full-text search, vector search and hybrid ranking in one engine, and speaks the Elasticsearch API, so existing clients connect unchanged. Its autoindex command ingests whole folders — source code parsed with tree-sitter ASTs, CSV, JSONL, PDFs, SQLite and more — with zero configuration, inferring field types as it goes. Agents can then ask definition-level questions (“where is this function defined, and what is its contract?”) and get a passage back instead of a list of grep matches. A built-in memory API lets agents store and recall what they learn across sessions, with per-agent isolation.
Xerj is free and open source under the Apache-2.0 license. Download the binary and run it anywhere, from a laptop to a server, with no signup or usage fees.
Xerj is built for developers and agent builders who want their coding agents to work from a real index of their codebases and data — cutting token spend and hallucinated APIs — and for teams seeking a lightweight, agent-native alternative to running Elasticsearch plus a separate vector database.