Xerj logo

Xerj

Local Rust search engine and MCP server for indexed code, documents, logs, structured data, PDFs, and agent memory.

Install Xerj

Run the project’s own setup commands, in order.

Setup steps from the project

xerj installs with its own commands rather than a config we can generate, so these are copied as-is. Run them in order in a terminal. Source: github.com

  1. 1. Install
    curl -fsSL https://xerj.org/get | sh -s -- --with-model
    
  2. 2. Start the server
    xerj --facts-model-dir ~/.local/share/xerj/model --insecure --data-dir ~/xerj-data &
    
  3. 3. Install
    curl -fsSL https://xerj.org/get | sh
    

Overview

xerj MCP server indexes local code, documentation, logs, JSONL, CSV, and PDFs, then exposes ranked search results to AI agents through MCP. It supports BM25 full-text, vector, and hybrid retrieval, with citations and file-line locations for returned passages. Use it for repository research, reference coding, RAG, code definition lookup, or persistent agent memory. Claude Code, Cursor, and other MCP clients can connect to the service.

Use cases

  • Index a repository for code-aware question answering
  • Search documentation, specifications, logs, and PDFs
  • Retrieve reference implementations before writing code
  • Run batched research queries with citations
  • Store and query persistent agent memory

Key features

  • BM25, vector, and hybrid search
  • Automatic folder indexing
  • Code definition lookup with file and line locations
  • Batch search with citations and per-item errors
  • Elasticsearch-compatible API
  • Local agent memory namespaces

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked Today

Recent health check succeeded.

32/32 checks healthy over the last 22d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars18kStargazers on the source repository.
Last commitTodayMost recent push to the default branch.
Directory activity15 viewsConfig copies, upvotes, and views on AllMCPs.

How Xerj works

What xerj does

xerj combines a local-first search engine with an MCP interface for AI agents. It builds indexes from folders containing source code, documentation, specifications, logs, JSONL, CSV, and PDF files. Agents can retrieve relevant passages instead of loading whole files into context, with results that include citations and file-line references.

Search supports BM25 full-text ranking, vector retrieval, and hybrid queries. Code-oriented workflows can use definition lookup for symbols such as functions, while agent-memory workflows can use the /_memory namespace. The Elasticsearch-compatible API also makes the indexed data available outside MCP-based clients. Corpus Hub provides reference-memory packs that can be used alongside local material.

How it works

The application is distributed as a single Rust binary. Start a node with a selected data directory, index a project with xerj autoindex, and query it with the command line or through MCP. A typical local workflow looks like this:

Terminal
curl -fsSL https://xerj.org/get | sh
xerj --insecure --data-dir ~/xerj-data &
xerj init
xerj autoindex ~/my-project
xerj search "how do we rotate the WAL segment"

xerj init wires the service into Claude Code or Cursor with MCP and a skill. Multiple queries can be submitted with xerj batch-search --input queries.json or the xerj_batch_search MCP tool; results preserve ordering, citations, and per-query errors. The default embedder is lexical and offline, while a neural embedder can be enabled separately and downloads approximately 90 MB.

Setup and configuration

Install the binary with the project’s install script or use the documented manual installation path for Windows and hand-verified setups. Keep the data directory outside folders that will be indexed. If storage is placed inside an indexed tree, the indexer may index its own files because data/ is not automatically ignored.

Use --data-dir or --config to select the node’s storage and configuration. XERJ reports the resolved data path and its source at startup. It does not automatically find or migrate data from another directory, so an existing installation must be started with its previous path or configuration.

Tools and capabilities

  • Search indexed content with BM25, vector, or hybrid retrieval.
  • Run code definition lookup and return a symbol’s file, line, and signature.
  • Submit batches of search questions through the CLI or xerj_batch_search.
  • Index project folders containing code, docs, logs, JSONL, CSV, and PDFs.
  • Store and retrieve agent memory through the /_memory namespace.
  • Query the Elasticsearch-compatible API.
  • Use Corpus Hub reference-memory packs for reference coding and research.
  • Connect through MCP to Claude Code, Cursor, or another MCP client.

Limitations and notes

The --insecure option disables TLS and API-key authentication. Anyone able to reach the port is then treated as a superuser who can read or delete every index, including memory namespaces. It is intended for a single-user development machine; a new node binds to 127.0.0.1, and cleartext binds on other interfaces require explicit permission.

The data directory contains the node’s indexes and should be protected accordingly. Neural embeddings are optional rather than the default and require an approximately 90 MB download. Search quality and available results depend on the folders, files, and reference packs that have been indexed.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Xerj

xerj is an MCP server that connects AI agents to locally indexed code, documents, logs, structured files, PDFs, and reference corpora. Its main tools support BM25, vector, and hybrid search, batch search, code definition lookup, citations, and agent memory through the `/_memory` namespace.

Install it with `curl -fsSL https://xerj.org/get | sh`, then start a node with a data directory and run `xerj init`. The initialization command configures MCP for Claude Code or Cursor. Manual installation is also available for Windows and hand-verified setups.

Yes, xerj works with Cursor. Run `xerj init` to wire the service into Cursor with MCP and a skill, then index a project with `xerj autoindex` before searching it.

Yes, xerj can index PDFs and CSV files along with code, documentation, logs, JSONL, and other project content. After indexing the relevant folder, agents can retrieve ranked passages through BM25, vector, or hybrid search.

Place the data directory outside any folder you plan to autoindex. The built-in ignore rules do not exclude `data/`, so putting `--data-dir ./data` inside an indexed project can cause xerj to index its own storage.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewXerj AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/xerj?style=directory)](https://allmcps.com/mcp/xerj)
HTML Embed
<a href="https://allmcps.com/mcp/xerj"><img src="https://allmcps.com/api/badge/xerj?style=directory" alt="Xerj on AllMCPs" /></a>