Skip to content

Summary

Local-first search engine and MCP server in one Rust binary: indexes code, docs, logs and PDFs for full-text, vector and hybrid search plus agent memory.

Features

  • One Rust binary: search node, CLI and stdio MCP server
  • BM25 full-text, vector and hybrid search over code, docs, logs, CSV/JSONL and PDFs
  • Go-to-definition and batch search tools with file:line citations
  • Durable agent memory namespaces via xerj_memory_store / xerj_memory_recall
  • Elasticsearch-compatible API, so existing ES clients work against it
  • xerj init registers it with Claude Code and Cursor in one command

Installation

Set up this MCP server in your favorite AI agent — copy a ready-made configuration below.

Any MCP-compatible agent

Most agents (Claude, Cursor, Windsurf, VS Code, and more) read a standard mcpServers configuration.

  1. Open your agent's MCP configuration file.
  2. Merge the snippet below into it, filling in the environment variables with your own values.
  3. Restart the agent — the "XERJ" tools will be available.
{
  "mcpServers": {
    "xerj": {
      "command": "/home/you/.local/bin/xerj",
      "args": [
        "mcp"
      ],
      "env": {
        "XERJ_URL": "http://localhost:9200"
      }
    }
  }
}

Description

XERJ is an open-source search engine built for AI agents. A single static Rust binary indexes any folder (code, docs, logs, JSONL/CSV and PDFs) for BM25 full-text, vector and hybrid search, behind an Elasticsearch-compatible API. The same binary is the MCP server: xerj mcp speaks MCP over stdio and forwards tool calls to a running XERJ node.

What it gives an agent

Its main use is code retrieval for coding agents. Instead of grepping and reading files one by one, the agent asks XERJ for ranked passages with file:line locations. Its "reference coding" workflow clones and indexes open-source repositories close to the task so the agent can look up how they solved a problem before writing its own code.

MCP tools

xerj_search, xerj_def (go-to-definition), xerj_code_search, xerj_batch_search, semantic, vector and hybrid search, xerj_memory_store / xerj_memory_recall for durable agent memory in namespaces, a second-brain link index, xerj_plan (plain words to query DSL, rule-based), xerj_map, xerj_status, index budgeting and removal, and tools that answer from locally installed Corpus Hub packs. The tool schemas are generated from a live tools/list and published at xerj.org.

Setup

Install with curl -fsSL https://xerj.org/get | sh (PowerShell and Nix installers too; prebuilt for Linux, macOS and Windows on x86-64 and arm64), start a node with xerj --insecure --data-dir ~/xerj-data, and run xerj init to wire it into Claude Code or Cursor, or add the config below by hand with the absolute path to the binary. xerj mcp does not start a node itself. --insecure turns off TLS and API-key auth and is meant for a single-user dev machine; with auth on, add XERJ_AUTH: "ApiKey <key>" to the env. Everything runs locally; the default embedder is offline. Licensed Apache-2.0; the project is in its 1.0 release-candidate series.

Related MCP Servers

See all XERJ alternatives

MCP: Graphicle

by Graphicle

Local-first Rust MCP server that maps your repo into a code graph and project memory, then hands coding agents cited file-and-line excerpts.

MCP: Codanna

by Codanna

Local code intelligence MCP server that returns symbol context, call graphs and impact analysis in a single call — 15 languages, indexed on your own machine.

MCP: Engram

by Gentleman Programming

Featured

Persistent memory for coding agents as a single Go binary — SQLite and FTS5 behind MCP, an HTTP API, a CLI and a TUI, with no Node, Python or Docker required.

MCP: OKF Agent Memory

by okf-memory

Git-native persistent memory for coding agents — sub-300µs BM25 search over version-controlled plain text, with no embeddings, no database and no API costs.

Browse all MCP servers →