Documentation

Last updated June 10, 2026

Install Rhei, point it at a repo, and connect it to coding agents over MCP. Local mode works without an account: source, the local graph, reports, and memory stay on your machine.

For data boundaries, source-upload modes, and provider retention notes, see the Data Use overview. For security posture, see Security.

Install

curl -fsS https://rhei.team/install | bash

Requires macOS or Linux (Windows via WSL), git, and Bun, pnpm, or Node 18+ with npm. The installer fetches @rhei-team/mcp-server, registers detected MCP clients, runs the local smoke check, and starts indexing when available. Nothing about your code is sent during install.

Rhei is in closed beta. If the public package is not available yet, the installer points you to rhei.team/cli for access and package setup.

First run

cd your-repo
rhei init

rhei init maps the repo, builds the local code graph and symbol index, connects MCP clients, runs a smoke check, and shows local status. Pro is a separate opt-in at the end.

rhei initMap the repo, build the local graph and index, connect MCP clients, run a smoke check.
rhei statusLocal readiness: index state, graph coverage, configured launchers, version.
rhei doctorHealth-check MCP config, repo path, advertised tools, and local-mode invariants.
rhei updateDry-run by default. Reports current vs. latest version and the exact next action.
rhei update --yesApplies the update to allowlisted launcher config. Restart your MCP client after.
rhei authOptional. Only needed for Pro features. Local mode never requires an account.

Connect your agent

rhei init offers to register Rhei with MCP-capable clients it finds, including Claude Code, Codex CLI, and Cursor. To wire a client manually, run the CLI as a stdio MCP server:

# Claude Code
claude mcp add rhei -- rhei mcp

# any MCP client - stdio server config
{ "command": "rhei", "args": ["mcp"] }

After changing MCP config or updating Rhei, restart or reconnect the client. rhei doctor verifies the wiring end to end.

Tool surface

Agents see one consolidated public MCP surface instead of a pile of one-off utilities. Grouped by intent:

  • Read & navigate: Exact reads, indexed search, repo tree, and code structure - the agent's eyes on the repo. read_file, file_search, get_file_tree, get_code_structure
  • Context & goals: Goal-scoped context packets with receipts: relevant files, slices, symbols, token accounting, and omitted candidates. goal, context_builder, workspace_context, manage_selection
  • Change & verify: Gated edits with previews and receipts, file operations, working-tree status, and validation evidence. apply_edits, file_actions, git, validate
  • State & memory: Index lifecycle, readiness posture, and the evidence ledger that records what agents actually used. index, status, ledger
  • Agents & oracle: Report-only handoffs to sub-agents and oracle sessions - packaged work in, evidence out. agent_run, agent_manage, oracle_send, oracle_utils

Edits are gated and receipt-backed: previews by default, apply only when explicit gates allow it, and durable verification after every write.

How context is chosen

  • Local code graph: files, symbols, and relationships are indexed incrementally on your machine.
  • Query routing: each query is classified as symbol, literal, or intent and routed to the matching retrieval strategy.
  • Residency: hot, warm, and cold tiers keep quiet code cheap and bring active code forward.
  • Workspace memory: the graph learns from what agents actually use, while keeping usefulness separate from truth.
  • Receipts: every context decision reports what was selected, what was omitted, and why.

Data boundaries

Local mode keeps source, the graph index, reports, and memory on your machine. Paid plans only send what your configured source-upload mode allows: never, metadata_only, or selected_slices. Rhei does not train models on customer code by default.

Full contracts: Data Use overview, Security, and Privacy Policy.

Updating

rhei update        # dry-run: report current vs. latest
rhei update --yes  # apply, then restart your MCP client

Update checks resolve against the published manifest at rhei.team/.well-known/rhei-mcp-update.json. Updates never touch your source.

Contact

Stuck or missing something? Email team@rhei.team.