rhebok
OfficialThis MCP server gives coding agents local semantic search and durable memory over the user's personal knowledge base.
Find relevant context for a user message, gated like automatic prompt injection but with more search time.
Semantically search notes, papers, saved articles, and past Claude Code sessions by meaning.
Follow connected notes through the knowledge graph from a search hit's URI.
Save durable memories as lessons, facts, or episodes for future sessions.
Delete obsolete memories by id.
Re-index the knowledge base to pick up new or changed files.
Optionally backs up rhebok configuration, memories, and index to the user's Google Drive, as an alternative to S3.
rhebok
Your coding agent starts every session knowing nothing you have not pasted in. The decision you wrote up last month, the fix you found in yesterday's session, the paper in your Downloads folder: it can use none of them unless you find them and hand them over.
rhebok hands them over. It is local, semantic search over your own knowledge base (notes, papers, web clippings and past agent sessions), and it adds what is relevant to your coding agent's prompts automatically.
rhebok indexes the folders you point it at, embeds them with a small model running on your own machine through Ollama, and serves the results two ways:
Automatic context. A prompt hook adds the most relevant passages to every prompt, but only when they clear a confidence gate.
On-demand search. An MCP tool lets the agent search your knowledge base whenever it decides to.
It works with Claude Code, Codex, Gemini CLI, Cursor and Claude Desktop. It also keeps durable memories (lessons and facts that carry across sessions) and has a local web dashboard for searching, exploring and configuring everything.

Nothing leaves your machine unless you set it up to: embeddings run locally
and there is no telemetry. rhebok itself goes online only to check daily for a
newer release, to download its vector-search extension the first time it
builds an index, to fetch the OCR model from ModelScope the first time it reads
a scanned PDF (oar-ocr only; Apple Vision on macOS downloads nothing),
and to fetch pages you add with rhebok add <url>. If you turn them on, it
also sends text to an embedding endpoint you choose and backs up to your own
S3 bucket or Google Drive.
Why rhebok?
Context arrives on its own. Most memory and search tools for agents are an MCP tool the agent has to remember to call. In Claude Code, Codex and Gemini CLI, rhebok also injects context into every prompt automatically, but only what clears a calibrated confidence gate, so the agent isn't flooded with noise.
It remembers your past sessions. Your Claude Code and Codex transcripts are indexed too, so "how did we fix this last time?" has an answer when the agent searches with
rhebok_searchor you runrhebok search. Finished sessions are also distilled into short episode memories. The automatic prompt context prefers your notes and keeps raw transcripts out by default.Retrieval you can inspect. Vector, keyword and link-graph results are fused, superseded decision records are demoted, and the dashboard shows exactly what each stage found and what reached the prompt.
Local and simple. One Rust binary, embeddings through Ollama on your machine, no cloud API, no telemetry and no server to run.
One index for every agent. Claude Code, Codex, Gemini CLI, Cursor and Claude Desktop all use the same knowledge base.
Related MCP server: CozoDB Memory MCP Server
How it compares
rhebok | claude-mem | mem0 | basic-memory | mcp-memory-service | |
Searches your notes on every message you send | ✅ ¹ | ❌ ² | ❌ ³ | ❌ ⁴ | ❌ ⁵ |
Reads the notes you already have | ✅ | ❌ | ❌ | ✅ | ✅ ⁶ |
Remembers your past chats with the agent | ✅ | ✅ | ✅ | ❌ ⁷ | ✅ |
Works without a cloud account | ✅ | ✅ | ❌ | ✅ | ✅ |
Tests how well it finds your notes | ✅ | ❌ | ❌ | ❌ ⁸ | ❌ |
It adds notes only when they are a good match, so most messages get none.
Only when a session starts, unless you switch it on.
Only on the first message.
Only when a session starts.
Only when a message sounds like it needs memory, such as "what did we decide".
Only files you add to it.
Only chats you export and import.
Its test kit is built for public datasets.
The others do things rhebok does not. claude-mem writes summaries of what your agent did. mem0 can keep your memory in the cloud. basic-memory lets the AI write your notes for you. The full comparison has the details and a source for every answer, checked on 2026-11-20.
Install
You need a Mac with Apple silicon, or Linux on x86_64 or arm64 with glibc 2.39 or newer (Ubuntu 24.04 or newer), plus Ollama running and a coding agent such as Claude Code. On Windows, use the Linux build inside WSL. Intel Macs have no release build.
curl -fsSL https://github.com/Stellenbosch-Technologies/rhebok/releases/latest/download/install.sh | shThe installer puts rhebok on your PATH, downloads the embedding model (about
640 MB, after asking), registers the Claude Code plugin, and offers to connect
the other agents it finds. It also offers the optional session distillation
model (about 2.5 GB). With Homebrew, install it with
brew install stellenbosch-technologies/tap/rhebok, then run rhebok install.
Other ways to install, including building from source, are in the
install guide.
rhebok used to be called br8n. If you used br8n, install rhebok the same way:
rhebok install moves your br8n index, memories and config, and your agent
connections, to rhebok. A br8n binary cannot update itself to rhebok.
Get started
Choose what to search. Run
rhebok dashboardand follow the three-step setup, or do it from the terminal:rhebok config set sources '["~/notes", "~/Documents/papers"]' rhebok indexRestart your agents so they load rhebok.
Check it works:
rhebok status # every install check should pass rhebok search "something in your notes"
Two lines are only information. The ocr: line says whether the optional
OCR libraries are installed; without them, text PDFs are still indexed and
only scanned pages are skipped. A missing distillation model is listed as
optional; without it, finished sessions are not turned into episode memories.
Then ask your agent about something from your notes. After the first index, rhebok re-reads only what changed, and each new Claude Code session refreshes the index in the background.
Everyday commands
rhebok dashboard # search, graph, memories, health and settings in the browser
rhebok app # the same dashboard as a native Mac app, Rhebok.app
rhebok search "query" # search from the terminal
rhebok index # pick up new or changed files
rhebok status # index size, settings and any problems
rhebok connect codex # connect another agent (see: rhebok agents)
rhebok update # install the newest release
rhebok restart # restart the dashboard and any running index on the installed binary
rhebok uninstall # remove rhebok; keeps the config, index and memoriesrhebok uninstall --purge also deletes the index, every memory, the config,
the golden set and the default backup key. The
install guide lists what to save first.
Roadmap
Native Windows support is planned. Until then, use the Linux build inside WSL.
Intel Macs have no release build yet, because of an upstream library issue.
Ask a question, share an idea or show what you built in Discussions. Report a bug in the issues, and see CONTRIBUTING.md to get started on the code. Please report security problems privately, as SECURITY.md describes. Everyone taking part follows the Code of Conduct.
Documentation
Install guide: every install option, building from source, updating, uninstalling and install problems
Using rhebok: indexing, memory, the dashboard, connecting agents and slash commands
Configuration and tuning: the config file, quality tiers, ranking, remote embedding endpoints and scanned PDFs
Backups: encrypted backups of your config, memories and index to S3 or Google Drive
Security model: what can reach your prompts, and how to limit it
How rhebok compares with claude-mem, mem0, basic-memory and mcp-memory-service
Cutting a release, for maintainers
License
rhebok is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0-only). You can use, modify and share it freely; if you distribute a modified version, or run one as a service that others use over a network, you must make your source code available under the same licence.
Copyright (C) 2026 Stellenbosch Technologies and rhebok contributors
Available Tools
7 toolsrhebok_contextFind context for a messageARead-onlyIdempotent
Find the excerpts and saved memories from the user's knowledge base that belong with the user's current message, gated and budgeted like the automatic prompt hook but with more time to search. Use it before answering whenever the message touches the user's own work: their projects, code, notes, decisions, past sessions, people or plans. Skip it when a block is already in the message, or when the message is about general knowledge rather than the user's own material. Prefer it over rhebok_search for the first lookup and over your own memory of the user; use rhebok_search for later, narrower queries you write yourself. Pass the user's message verbatim as message, plus cwd when you know the working directory; leave prehook and session unset. Read-only, local, and safe to repeat. A null block means nothing cleared the gate, which is a normal answer; notes says when retrieval was degraded, for example when the embedding server was unreachable.
Inputs: message (required), cwd, prehook, session. Returns: hits, block, notes, project, +6 more
rhebok_forgetForget a memoryADestructiveIdempotent
Permanently delete one saved memory (a lesson, fact or episode) by its id. Use it when the user says a memory is wrong or no longer applies. To correct a memory rather than drop it, call rhebok_remember with the new wording instead: it replaces the near-duplicate. To find an id, use rhebok_memories. This only removes rhebok memories; it never touches the user's notes or files, and it cannot remove a hit from rhebok_search. There is no undo: the memory is gone from the next prompt's retrieval and from session-start lessons, and restoring it means saving it again with rhebok_remember. Forgetting an id that is already gone deletes nothing and says so in reason.
Inputs: id (required). Returns: id, kind, title, reason, +1 more
rhebok_indexRe-index the knowledge baseAIdempotent
Update the knowledge base index from the user's configured sources, picking up new, changed and deleted files. Use it when the user has just added or edited files and rhebok_search or rhebok_context does not find them yet. Do not call it routinely: rhebok already indexes at the start of every session. Takes no parameters; what is indexed comes from sources in the user's rhebok config. Incremental: only files whose size or modification time changed are re-read, and unchanged sections keep their stored embeddings, so a run with nothing new returns at once. New text is embedded through the configured embedding server, which can take minutes for many new files; search keeps answering from the previous index until the new one is swapped in. Removes documents whose source file is gone. Refuses, without changing anything, while another index run is in progress, and reports that in error.
Inputs: no named parameters. Returns: ok, added, error, chunks, +2 more
rhebok_memoriesList saved memoriesARead-onlyIdempotent
List the memories rhebok has saved (lessons, facts and episodes), newest first, with their ids, scope and full text. Use it when the user asks what you remember about them, before rhebok_forget when you need a memory's id, or before rhebok_remember to check whether a rule is already saved. It lists by filter, not by meaning: to find the memories relevant to a topic, use rhebok_search, which retrieves memories alongside notes. Read-only and local; it does not embed anything, so it works while the embedding server is down. total counts every match, so a total above the number returned means limit cut the list.
Inputs: kind, limit, scope. Returns: error, total, memories
rhebok_rememberSave a memoryA
Save a memory for future sessions: a lesson the user taught you (a correction or rule), a durable fact about the user or their setup, or an episode (what happened and what was decided). Use it when the user corrects you, states a preference, or asks you to remember something; do not use it for things already in their notes, which rhebok_search finds, or for details that matter only to this conversation. To change a memory, save the new wording: a near-duplicate of the same kind replaces the old one, and an exact duplicate is not saved again. To check what is already saved, use rhebok_memories; to remove a memory, use rhebok_forget. Lessons are shown to you at the start of every session in the matching project; every kind is also retrieved by relevance on later prompts. Saving sends the text to the configured embedding server and is rejected while it is unreachable; the memory itself is stored only on this machine.
Inputs: kind (required), text (required), scope, title, +1 more. Returns: id, kind, reason, status, +1 more
rhebok_searchSearch the knowledge baseARead-onlyIdempotent
Search the user's personal knowledge base (notes, papers, saved articles, past agent sessions) for a query you write, by meaning and by keyword. Use it when you need something specific the user wrote, read or worked on before, instead of asking them to repeat it, and for follow-up lookups after rhebok_context. For the first lookup on a new message, use rhebok_context instead; to explore around a hit you already have, use rhebok_related; to see saved memories by id, use rhebok_memories. Reads a local index; only the query text leaves rhebok, to the configured embedding server (a local Ollama by default). Hits are ordered most relevant first, and hits below the MCP relevance gate are dropped, so an empty list means nothing matched well, not a failure. The text reply is the same hits as Markdown excerpts. When the search cannot run (nothing indexed yet, the embedding server not reachable, an index that must be rebuilt), error and the text reply both say why and what to do next; that is never a no-match.
Inputs: query (required), quality. Returns: hits, error, notice
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Most tools are cleanly separated: memories/remember/forget form one obvious lifecycle, index is the only maintenance tool, and related is explicitly structural rather than semantic. The one soft boundary is rhebok_context vs rhebok_search, which both retrieve the user's material; the descriptions work hard to split them (verbatim user message + first lookup vs. authored query + follow-up), but an agent can still plausibly pick the wrong one. No tool appears redundant.
Every tool uses the same rhebok_ prefix and lowercase single-token names, so the set reads as one family. The only wrinkle is grammatical form: some names are verbs (remember, forget, search, index) and others are nouns/adjectives (memories, context, related), which slightly breaks the verb_noun predictability. Still highly consistent overall.
Seven tools is well within the sweet spot and each one has a distinct job: memory list/save/delete, index maintenance, and three retrieval modes (context, search, related). Nothing feels padded or bolted on, and no obvious capability is crammed into a vague catch-all tool.
Memory lifecycle is effectively complete (list, create with near-duplicate replacement, delete by id), and the knowledge-base side covers indexing, semantic/keyword search, prompt-gated context, and link-following. The main gap is a direct 'read this document by uri' tool — related returns neighbors and search returns excerpts, but an agent with a uri cannot fetch the full note. Minor: no explicit status/config inspection tool, though index reports errors.
Maintenance
Related MCP Connectors
Memory for Claude, ChatGPT and other AI apps: notes and docs as a searchable graph, EU-hosted.
One memory for Claude, ChatGPT and Cursor, on your computer. Publishes websites from chat too.
A self-hostable feed of reminders, learnings and work that Claude and ChatGPT can read and write
Self-hosted AI workspace: semantic RAG document search, long-term memory, and AI chat via MCP.
Related MCP Servers
- AlicenseAqualityCmaintenanceLocal-first memory for Claude Code and any MCP client: hybrid vector + keyword search and a bi-temporal knowledge graph in one SQLite file. Local embeddings, no API key, $0/token.51152 npm2PolyForm Noncommercial 1.0.0
- AlicenseNot gradedqualityDmaintenanceLocal-first memory for Claude & AI agents with hybrid search, Graph-RAG, and time-travel, runs entirely on your machine.106 npm1Apache 2.0
- AlicenseAqualityAmaintenanceLocal-first persistent memory for Claude Code and OpenAI Codex CLI. A single Rust binary captures, distills, searches, and injects project memory across sessions via hooks, MCP, CLI, and localhost REST.1533MIT
- AlicenseBqualityBmaintenanceLocal long-term memory for AI assistants, written in Rust: hybrid search with reranking over a local Qdrant, a fact store that resolves contradictions, and a hash-chained audit log. Runs fully offline, no API keys.4410Apache 2.0