# xerj [Health: Active]

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/xerj-org/xerj  
**GitHub Stars:** 23679  
**Views:** 22  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/xerj

## Description
Local-first search engine and MCP server for AI agents. One Rust binary indexes code, docs, logs, JSONL/CSV and PDFs for BM25 full-text, vector and hybrid search, code search without grep, agent memory and RAG. Elasticsearch-compatible API; Corpus Hub serves hundreds of reference memory corpora.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/xerj-org/xerj), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
curl -fsSL https://xerj.org/get | sh -s -- --with-model
```

2. Start the server:

```sh
xerj --facts-model-dir ~/.local/share/xerj/model --insecure --data-dir ~/xerj-data &
```

3. Install:

```sh
curl -fsSL https://xerj.org/get | sh
```

## Documentation

## What xerj MCP server does

xerj MCP server combines local indexing, search, and MCP access in one Rust binary. It is designed for agent workflows that need to retrieve information from codebases, documentation, logs, JSONL or CSV datasets, and PDFs. The same engine also supports agent memory through the `/_memory` namespace and exposes an Elasticsearch-compatible API for applications that already use that style of interface.

Search can use BM25 full-text retrieval, vector search, or a hybrid of both. The default embedder is lexical and works offline, so a basic installation does not require a neural model or GPU. A neural embedder can be enabled separately and downloads approximately 90 MB.

## How it works

The binary builds an index from the selected local content, then makes that corpus available to MCP clients and API callers. Agents can use the indexed material for code search, documentation lookup, log investigation, retrieval-augmented generation, and persistent memory workflows. Search is intended to replace grep-driven retrieval when an agent needs ranked results across a broader set of content types.

The project also includes Corpus Hub, which serves hundreds of reference memory corpora. This provides an additional source of reusable reference material alongside locally indexed data.

XERJ Query-1 is an optional facts-oriented capability available in published release binaries. When enabled, its `xerj_facts_ask` MCP tool turns questions into short programs over stored facts. Lookup and comparison results point to quoted source spans; unsupported questions can return `UNKNOWN`, while disagreement between facts can return `CONFLICT`.

## Setup and configuration

Use a published release binary to access the released MCP functionality. The project is distributed as a single Rust binary and does not require a JVM. The standard search engine uses the offline lexical embedder by default. Neural embeddings are opt-in and require the additional model download.

XERJ Query-1 is enabled with the `--facts-model-dir` option. Its related `/_facts` route and `xerj_facts_ask` tool are present in release binaries that include the feature, but not in builds made from the public `main` source tree. The facts capability is off by default, so enabling the model changes the available route and MCP tool list.

## Tools and capabilities

- Indexes code, documentation, logs, JSONL, CSV, and PDFs.
- Provides BM25, vector, and hybrid search modes.
- Exposes search and memory workflows through MCP.
- Supports the `/_memory` namespace for agent memory.
- Offers an Elasticsearch-compatible API.
- Provides optional facts questions through `xerj_facts_ask` in supported release binaries.
- Supports reference corpora through Corpus Hub.

## Limitations and notes

XERJ Query-1 is not part of the public source tree and is only included in published release binaries that contain its proprietary model crates. Its data-directory upgrade can make the resulting format unreadable by an older release. The facts model does not yet handle sums and totals reliably; a sum question may be returned as a member count. Large fact sets can also increase latency and cause questions to be declined.

The facts feature is deliberately conservative: it may decline questions that a language model would attempt to answer. The reported behavior and performance apply to that optional capability, not automatically to every search workload. The standard search features remain separate from the facts model and can operate with the default offline lexical mode.

_Full upstream README: https://allmcps.com/mcp/xerj/readme_

