XERJ MCP

Local search and MCP server for agents: one Rust binary that indexes code, docs and logs

  • 18,928 ★ on the repository
  • Last commit
  • Apache-2.0
MCP serverOfficial

Broad access

Why this level

  • The `--insecure` quick start opens the port without auth: any client can read and delete every index
  • It indexes the whole folder, secrets and logs included if they sit in the tree
  • Installation pipes a network script into `sh`
All reasons and checks

xerj-org/xerj

Install

Manual install

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

The xerj.org script installs the binary. A single-user node starts with `xerj --insecure --data-dir ~/xerj-data &`.

Access and checks

How we review

Broad accessThe tool can change data, run commands or handle secrets.

  • The `--insecure` quick start opens the port without auth: any client can read and delete every index
  • It indexes the whole folder, secrets and logs included if they sit in the tree
  • Installation pipes a network script into `sh`

This is third-party code. Review the repository files before installing.

What it does

XERJ is a single Rust binary that runs a local search server and indexes a whole folder: code, docs, specs, logs, JSONL, CSV, PDF and SQLite. `xerj autoindex <folder>` works out each file's type and creates one index per dataset it finds. Code is parsed with tree-sitter, so answers carry symbols and line numbers. Search runs on BM25, vectors or both, behind an Elasticsearch-compatible API. An agent connects through the `xerj mcp` server over stdio. It searches the index, looks up definitions, runs a batch of queries in one `xerj_batch_search` call and keeps long-term memory under `/_memory/{namespace}`, recalling what it learned by meaning in the next session. A separate workflow called reference coding has the agent clone nearby open-source repositories, index them and study how the problem was solved there before writing its own code. Corpus Hub packs with ready reference material work without a local index.

Who it is for. For developers whose agent burns tokens reading files one by one, and for anyone who wants local search over logs and documents behind an Elasticsearch API.

Good fit when

  • The agent reads whole files in a large repository instead of the passage it needs
  • The agent works on private or very recent code the model has not seen and needs examples from nearby open-source projects
  • You need search over a mixed folder of logs, PDFs, CSVs and docs, answered with a passage and a line number
  • The agent needs memory between sessions that searches by meaning
  • An existing Elasticsearch client should point at a local index

Not a fit when

  • The project rests on popular public libraries the model already knows: on such code the gain is neutral or negative
  • You need neural-embedding vector search right after install: the default embedder is lexical
  • You want MCP without a separate server: search over your own files needs a running XERJ node

Example request

Read https://xerj.org/llms.txt, set XERJ up as your search backend, index ./docs and show one example query per index it created

MCP

Transport
stdio
Authentication
not required

Environment variables

XERJ_URL
XERJ node address, http://localhost:9200 by default
XERJ_AUTH secret
Auth header for a node with auth on, for example ApiKey <key>

Limitations

The `--insecure` mode behind the quick start turns off TLS and key checks: any client that reaches the port is a superuser who can read and delete every index, including agent memory. A fresh node binds only `127.0.0.1`, and a bind on another interface will not start without explicit permission. Keep the data directory outside the folder you index: `--data-dir ./data` inside the indexed tree makes the node index its own storage. The neural embedder is opt-in and downloads about 90 MB. Read the xerj.org install script before running it. Windows and hand-verified installs are covered in the Install by hand section.

How to disable. Disable the plugin with `claude plugin uninstall xerj@xerj` or remove the `xerj` server from the agent's MCP config, then stop the `xerj` process. Data sits in the `--data-dir` folder and can be deleted by hand.

FAQ

How do I connect XERJ to Claude Code?

Run `xerj init`: it wires XERJ into Claude Code or Cursor as an MCP server and a skill. Or install the plugin with `claude plugin marketplace add xerj-org/xerj` and `claude plugin install xerj@xerj`. The `xerj` binary must be on PATH and the node running.

How do I index a project folder?

Start the node and run `xerj autoindex ~/my-project`. XERJ detects each file's type and creates an index per dataset. Then search with `xerj search "query"` and look up definitions with `xerj def "name"`.

How do I turn on auth for the node?

Set the `XERJ_AUTH` variable, for example `ApiKey <key>`. On a loopback node the key is read from `<data-dir>/admin.key`, so you can leave the variable unset.

Does every tool need a running node?

No. Corpus Hub tools work without a local index, while search over your own files needs a running node.

What is reference coding in XERJ?

It is a workflow where the agent clones nearby open-source repositories, indexes them in XERJ and studies how the problem was solved there before writing its own code. It pays off on private and recent code.

Discussion

No questions or reviews yet.

codesearch searches code across several repositories with hybrid retrieval and runs fully offline, without a GPU or Docker.

MCP serverMinimal access103Repository stars

A local code search in Rust for agents: BM25, vectors and reranking, 65 languages, offline, with a skill and MCP server.

CLIMinimal access147Repository stars
Official

An MCP server and CLI for code research: search and understand your project and all of GitHub with fewer tokens

MCP serverExtended access961Repository stars

A structural code search MCP server for agents: finds the right file by query intent and runs locally

MCP serverExtended access553Repository stars

A local codebase index for agents: hybrid search, dependency graphs and change impact analysis

MCP serverExtended access3.4KRepository stars

An MCP server that indexes a local repository with tree-sitter and gives the agent code search, file lookup and a structure summary of a file

MCP serverExtended access1KRepository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
XERJ (this card)yesnot required18,928
Claude ContextyesAPI key12,690builds a vector index of code, while XERJ also takes logs, PDFs and CSVs and answers over an Elasticsearch API
code-index-mcpnonot required162indexes a repository with tree-sitter, while XERJ adds docs, logs and agent memory
codebase-memory-mcpnonot required48,598builds a graph of functions and calls, while XERJ searches text and vectors across any file type

README in short

Open source under Apache-2.0. In the authors' study over 16 runs, an agent with XERJ used 2.7x fewer output tokens than with grep at the same 16 of 16 solved tasks. The gain depends on whether the model remembers the code: it shows up on private, niche and recent code.

README badge

Report a problem