Octobrain

io.github.MuvonPublished by GitHub account Muvonv0.15.1Updated Nov 7, 2026

Persistent memory for AI assistants with semantic search and knowledge graph relationships.

Overview

Octobrain's local MCP server; no sign-in required; STDIO; 4 tools.

No AI overview yet: these facts come from the registry entry and the server itself.

Installation

In SourceWeft

  1. Open Octobrain in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

Octobrain

Persistent memory for AI assistants — store insights, decisions, and knowledge that survives across conversations.

[Crates.io] [License] [Rust] [CI] [Coverage]

MCP Registry: mcp-name: io.github.Muvon/octobrain

Table of Contents

Octobrain gives your AI assistant a long-term memory. Store code insights, architecture decisions, bug fixes, and knowledge — then retrieve them with semantic search in future sessions. Works as a CLI tool or as an MCP server for integration with Claude Desktop and other AI tools.

Why Octobrain?

AI assistants start every conversation with zero context. You explain your project, your preferences, your decisions — every single time. Octobrain breaks that cycle:

  • Persistent memory — Insights survive across sessions, not just within them
  • Semantic search — Find memories by meaning, not exact keywords
  • Auto-linking — Related memories connect automatically (Zettelkasten-style)
  • Knowledge indexing — Ingest docs, articles, and files for retrieval
  • MCP integration — Works with Claude Desktop and other MCP-compatible tools

Quick Start

bash
# Install from crates.iocargo install octobrain
# Store your first memoryoctobrain memory memorize --title "API Design Pattern" \  --content "Use REST for CRUD, GraphQL for complex queries" \  --memory-type architecture --tags "api,design"
# Search memoriesoctobrain memory remember "how should I design APIs"
# Start MCP server for Claude Desktop integrationoctobrain mcp

Installation

From crates.io (Recommended)

bash
cargo install octobrain

From Source

bash
# Clone and buildgit clone https://github.com/muvon/octobrain.gitcd octobraincargo build --release
# Binary location./target/release/octobrain --help

Docker

bash
docker pull ghcr.io/muvon/octobrain:latest

Homebrew (macOS/Linux)

bash
brew install muvon/tap/octobrain

Feature Flags

Octobrain supports multiple embedding providers:

FlagDescriptionAPI Key Required
fastembedLocal embeddings via FastEmbedNo
huggingfaceLocal embeddings via HuggingFaceNo
(default)Both fastembed + huggingfaceNo
(no features)API-based: Voyage, OpenAI, Google, JinaYes
bash
# Build with local embeddings (default, no API keys needed)cargo build --release
# Build with API-based embeddings onlycargo build --no-default-features --release

For API-based embeddings, set the appropriate environment variable:

  • VOYAGE_API_KEY for Voyage AI
  • OPENAI_API_KEY for OpenAI
  • GOOGLE_API_KEY for Google
  • JINA_API_KEY for Jina

Usage

Memory Management

Store and retrieve insights, decisions, and context:

All memory subcommands accept global flags:

  • --scope <string> — Override project scope (default: auto-detected from Git remote)
  • --role <string> — Filter by role (e.g. "developer", "reviewer")
bash
# Store a memoryoctobrain memory memorize --title "API Design" \  --content "Use REST for CRUD, GraphQL for complex queries" \  --memory-type architecture --tags "api,design"
# Search memories (semantic search)octobrain memory remember "api design patterns"
# Multi-query search for broader coverageoctobrain memory remember "authentication" "security" "jwt"
# Get a memory by IDoctobrain memory get <id>
# Get recent memoriesoctobrain memory recent --limit 20
# Filter by typeoctobrain memory by-type architecture --limit 10
# Filter by tagsoctobrain memory by-tags "api,security"
# Find memories related to filesoctobrain memory for-files "src/main.rs,src/lib.rs"
# Update a memoryoctobrain memory update <id> --title "New Title" --add-tags "new-tag"
# Delete a memoryoctobrain memory forget --memory-id <id>
# Get memories relevant to the current Git commitoctobrain memory current-commit
# Show memory statisticsoctobrain memory stats
# Clean up old/low-importance memoriesoctobrain memory cleanup
# Compact tables and refresh indices (run when searches slow down)octobrain memory maintenance
# ⚠️ Delete ALL memory dataoctobrain memory clear-all --yes

Memory Consolidation

Close a goal and fold all its contributing memories into a consolidated summary:

bash
# Consolidate a goal (Achieves-link sources → Consolidated state, importance dampened)octobrain memory consolidate <goal-id> --summary "Final summary"
# Sleep consolidation: auto-cluster recent similar memoriesoctobrain memory sleep-consolidate --threshold 0.85 --min-size 3

Memory Relationships

Connect related memories for context-rich retrieval:

bash
# Create a relationship between memoriesoctobrain memory relate <source-id> <target-id> \  --relationship-type "depends_on" \  --description "Source requires target to function"
# View relationships for a memoryoctobrain memory relationships <memory-id>
# Find related memories through relationshipsoctobrain memory related <memory-id>
# Auto-link similar memories (Zettelkasten-style)octobrain memory auto-link <memory-id>
# Explore memory graphoctobrain memory graph <memory-id> --depth 2

Knowledge Base

Index and search web content, docs, and files:

bash
# Index a URLoctobrain knowledge index https://docs.rs/tokio/latest/tokio/
# Index a local file (.txt, .md, .pdf, .docx, .html)octobrain knowledge index ./docs/architecture.md
# Search knowledge baseoctobrain knowledge search "how to handle async tasks"
# Search within a specific source (auto-indexes if outdated)octobrain knowledge search "spawn blocking" --source https://docs.rs/tokio/
# Read full content of a URL or local fileoctobrain knowledge read https://docs.rs/tokio/latest/tokio/
# Search indexed content by regex patternoctobrain knowledge match "spawn_blocking|block_in_place"
# Store raw text contentoctobrain knowledge store "meeting-notes" --content "Discussion points..."
# List indexed sourcesoctobrain knowledge list --limit 20
# Show statisticsoctobrain knowledge stats
# Delete a sourceoctobrain knowledge delete https://example.com/docs
# Delete stored content by keyoctobrain knowledge delete-stored "meeting-notes"

Knowledge Boxes

Import and sync git-backed knowledge bundles scoped to your projects:

bash
# Import a remote git repo as a knowledge boxoctobrain box import https://github.com/org/docs-repo.git
# Import at global scope (visible in every project)octobrain box import https://github.com/org/docs-repo.git --global
# Pull and re-index all subscribed boxes + local .box/ directories# (the MCP server syncs each session's repos on first contact; agents run `knowledge` `sync` after editing .box/)octobrain box sync
# List subscribed boxesoctobrain box list
# Remove a boxoctobrain box remove github.com/org/docs-repo

MCP Server

Run as an MCP server for integration with Claude Desktop and other AI tools:

bash
# Start with stdio transport (for Claude Desktop)octobrain mcp
# Start with HTTP transport (for web-based tools)octobrain mcp --bind 0.0.0.0:12345

Available MCP Tools:

ToolDescription
memorizeStore memories with metadata; optional related_to for inline relationships
rememberSemantic search with filters; returns 1-hop graph neighbors
forgetDelete memories (requires confirmation)
knowledgeUnified tool: search, store, delete, read, match, sync via command field; sync re-indexes knowledge boxes after .box/ edits
See MCP Integration for Claude Desktop setup.

Features

  • Semantic Search — Find memories by meaning using vector embeddings, not exact keyword matches
  • Hybrid Search — Combines BM25 full-text search with vector similarity for better results
  • Reranking Support — Pluggable cross-encoder reranking stage (provider-dependent)
  • Auto-Linking — Automatically connects semantically similar memories (Zettelkasten-style)
  • Temporal Decay — Ebbinghaus forgetting curve for importance management
  • Knowledge Indexing — Ingest URLs, PDFs, docs for retrieval
  • Project Scoping — Isolate memories per Git project or share across projects
  • Role Filtering — Tag memories by role (developer, reviewer, etc.)
  • Query Expansion (HyDE-lite) — Pseudo-relevance feedback for +10-30% recall on long-tail queries
  • MCP Protocol — Full MCP 2026-07-28 compliance for AI tool integration

Benchmarks

Retrieval quality of octobrain's knowledge system on standard BEIR datasets — nDCG@10, fully local, no LLM judge, using the harness's default embedder bge-small-en-v1.5 (384-dim, 33M params). Each corpus passage is indexed through octobrain's real retrieval path and scored against the official qrels (metrics reproduce pytrec_eval).

Datasetoctobrain vectoroctobrain hybridBM25¹bge-small-en-v1.5²
SciFact (5.2K docs, 300 q)0.7220.7420.6650.713
NFCorpus (3.6K docs, 323 q)0.3410.3630.3250.343
  • vector = dense-only retrieval; reproduces the embedder's published BEIR numbers (validates the harness).
  • hybrid = BM25 + vector fused with Reciprocal Rank Fusion (k=60) — octobrain's default. Adds +2 nDCG@10 over the bare embedding and beats classic BM25 on both datasets.

¹ Canonical BM25 from the BEIR paper (Anserini/Lucene, k1=0.9 b=0.4). ² From the bge-small-en-v1.5 model card (MTEB).

Scope: this measures the ranking layer (embedding + BM25 fusion + reranking). BEIR passages are pre-chunked, so octobrain's chunking strategy is not exercised here.

⚠️ Reranker status: The cross-encoder reranker is currently a no-op with fastembed models (byte-identical results to hybrid-only). Rerank is excluded from the numbers above pending investigation. See benches/README.md for details.

Reproduce (downloads the datasets, builds a release binary, runs fully offline):

bash
cd benches && bash scripts/run_retrieval.sh

Configuration

Configuration is stored in ~/.local/share/octobrain/config.toml. The template written on first run defines every option with sensible defaults, but loading is strict — a field you delete by hand causes startup to fail rather than falling back to a default.

Override the config location with OCTOBRAIN_CONFIG_PATH=/path/to/config.toml.

Key Settings

SectionOptionDefaultDescription
[embedding]modelfastembed:Qdrant/all-MiniLM-L6-v2-onnxEmbedding model (provider:model format). Default is a local fastembed model — no API key, runs on CPU.
[search]similarity_threshold0.3Minimum relevance (0.0-1.0)
[search.hybrid]enabledtrueEnable BM25 + vector fusion
[search.reranker]enabledtrueEnable cross-encoder reranking
[search.hyde]enabledtruePseudo-relevance feedback query expansion
[memory]max_memories10000Maximum stored memories
[memory]auto_linking_enabledtrueAuto-connect similar memories
[knowledge]chunk_size1200Characters per chunk
[embedding]batch_size32Texts embedded per batch
[embedding]timeout_secs30Embedding call timeout (0 = no timeout)
[search]max_results50Hard ceiling on results from any search
[search.reranker]modelfastembed:jina-reranker-v2-base-multilingualCross-encoder model
[search.reranker]top_k_candidates50Candidates retrieved before reranking
[search.hyde]top_k3Neighbors averaged for the centroid
[search.hyde]alpha0.5Blend weight on the original query embedding
[memory]max_search_results50Default page size when no limit is given
[memory]sleep_consolidation_enabledtrueLazy sleep consolidation on manager init
[memory]sleep_consolidation_interval_hours24Hours between sleep-consolidation passes
[knowledge]outdating_days15Days before indexed content is reindexed on search
[knowledge]max_results5Results returned from knowledge search

Embedding Providers

toml
[embedding]# Local models (no API key, runs on CPU, model auto-downloaded on first use)model = "fastembed:Qdrant/all-MiniLM-L6-v2-onnx"                       # Default: 384-dim quantized, ~125MB residentmodel = "fastembed:nomic-ai/nomic-embed-text-v1.5"                      # 768-dim, 8192-ctx, ~550MB weights, highest qualitymodel = "fastembed:BAAI/bge-small-en-v1.5"                              # 384-dim, ~62 MTEB, fast + good qualitymodel = "fastembed:sentence-transformers/all-MiniLM-L6-v2-quantized"  # Smallest (~22MB), fastestmodel = "fastembed:BAAI/bge-base-en-v1.5"                              # Larger (~440MB), higher qualitymodel = "fastembed:intfloat/multilingual-e5-small"                     # Multilingual
# Cloud providers (require API keys, generally higher quality)model = "voyage:voyage-3.5-lite"          # VOYAGE_API_KEYmodel = "openai:text-embedding-3-small"   # OPENAI_API_KEYmodel = "google:text-embedding-004"       # GOOGLE_API_KEYmodel = "jina:jina-embeddings-v3"         # JINA_API_KEY

Full Configuration

See config-templates/default.toml for all available options with documentation.

Memory Types

Organize memories by category for better filtering:

TypeUse For
codeCode patterns, solutions, implementations
architectureSystem design, decisions, patterns
bug_fixBug fixes, troubleshooting, solutions
featureFeature specs, implementations
documentationDocs, explanations, knowledge
user_preferenceSettings, preferences, workflows
decisionProject decisions, trade-offs
learningTutorials, notes, education
configurationSetup, config, deployment
testingTest strategies, QA insights
performanceOptimizations, benchmarks
securityVulnerabilities, fixes, considerations
validationIdea/product validation, hypothesis testing
researchTechnical/market research, analysis
workflowSOPs, playbooks, process descriptions
requirementBusiness requirements, specs, constraints
designUI/UX decisions, wireframes, system design
integrationAPI integrations, third-party services
communicationStakeholder updates, team decisions
processDeployment procedures, runbooks, operations
insightGeneral insights, tips
goalTask/intent anchors for consolidation workflow

MCP Integration

Claude Desktop Setup

Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

json
{  "mcpServers": {    "octobrain": {      "command": "/path/to/octobrain",      "args": ["mcp"]    }  }}

Restart Claude Desktop. Octobrain tools will be available in your conversations.

HTTP Transport

For web-based integrations:

bash
octobrain mcp --bind 0.0.0.0:12345

The server exposes endpoints at /mcp for MCP protocol communication.

Storage Locations

Data is stored in platform-specific directories:

PlatformLocation
macOS~/.local/share/octobrain/
Linux~/.local/share/octobrain/ or $XDG_DATA_HOME/octobrain/
Windows%APPDATA%\octobrain\

Project-specific memories are isolated by normalized Git remote URL (e.g., github.com/org/repo).

Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Run cargo fmt --all to format code
  4. Run cargo clippy and fix all warnings
  5. Run cargo test --no-default-features
  6. Submit a pull request

Development Setup

bash
# Clone and buildgit clone https://github.com/muvon/octobrain.gitcd octobraincargo build --no-default-features
# Run testscargo test --no-default-features
# Run clippycargo clippy --no-default-features

License

Apache-2.0 — see LICENSE for details.

Credits

Developed by Muvon Un Limited.

Source: README.md at commit 4bdf7d1

Tools

4

forget

Forget

Permanently delete memories. Irreversible — requires confirm=true. Use memory_id for single deletion, or query+filters for bulk removal. memory_id deletes any memory remember returned, project or global; query deletes only in the given scope (omitted: the session's project), so a project query never deletes global memories. Don't forget memories just because they're old — importance decay handles that. Only delete when information is wrong; for a replaced fact, memorize the new one with supersedes instead.

Parametersroletagsqueryscopeconfirmrequiredmemory_idmemory_types

knowledge

Knowledge

Knowledge base with six commands. The 'source' parameter (when used) ALWAYS refers to a SINGLE FILE or URL — never a directory; passing a directory path is an error. URLs are fetched anonymously — public documentation and information pages only, never API endpoints that need credentials (GitHub Actions logs, private repos, etc. return 403; use the platform's own CLI for those). 'search': semantic search across indexed content — provide source (single URL or file) to auto-index on-the-fly, omit to search all indexed sources, knowledge boxes included. 'store': save raw text under a unique key (session-scoped scratch, auto-cleaned, never durable) — error if key exists, delete first to replace. 'delete': remove stored content by key. 'read': fetch and return the FULL text content of a single URL or file — use ONLY as a last resort when search results are insufficient; prefer 'search' for targeted retrieval. 'match': search indexed content by regex pattern (like grep) — returns matching lines only; prefer 'search' for semantic queries, use 'match' for exact string/regex patterns. 'sync': re-index knowledge boxes — run it after you create, edit or delete files under '<repo>/.box/'. Supported file types: .html, .txt, .md, .pdf, .docx. Knowledge boxes are the durable, shared knowledge base: files under '<repo>/.box/' (one topic per Markdown file, grouped in folders such as rules/, guides/, decisions/; the root README.md is not indexed), plus boxes subscribed with the octobrain CLI. Box results show source 'box://<box_id>/<path>'; for this project's box the file is '<repo>/.box/<path>' — edit it with your file tools, then 'sync'. A box:// source in search or match narrows to that one file; never pass a .box/ file path as source (it indexes a duplicate). One fact or decision belongs in memorize, not a box file.

Parameterskeyquerysourcecommandrequiredcontentpattern

memorize

Memorize

Store information, insights, or context in memory. Call remember first to avoid duplicates. Set source='user_confirmed' for user-stated facts (importance 0.8-1.0), 'agent_inferred' for AI conclusions (0.3-0.6). Skip transient state or things easily re-derived. For a longer reference document, write a knowledge box file instead (see the knowledge tool). Use related_to[] to link the new memory to existing ones in the same call. Relationship types: related_to, depends_on, supersedes, similar, conflicts, implements, extends, achieves, closes. Knowledge updates: when a new fact replaces or corrects an existing memory (a value changed, a decision was reversed), memorize the new fact with related_to=[{target_id: <old_id>, relationship_type: 'supersedes'}]. Retrieval then ranks the current fact above the outdated one, which stays queryable for history. remember first to find the old_id. Goal workflow: 1. memorize a 'goal' type memory for the task — captures intent 2. For each contributing memory: memorize with related_to=[{target_id: goal_id, relationship_type: 'achieves'}] 3. When the task closes: memorize the completion / lesson-learned note with related_to=[{target_id: goal_id, relationship_type: 'closes'}] (goal_id must be a 'goal' memory with at least one Working achieves source). This triggers automatic consolidation — your closing memo becomes the consolidated parent, all Achieves sources transition to Consolidated state with dampened importance (still queryable for audit). Importance of the closing memo is bumped to max(sources) * 1.1. No separate consolidate call needed. global=true (only available when session scope is locked): stores the memory in the shared global scope instead of the locked project scope. Use this for cross-project facts — user preferences, personal habits, universal conventions, tool choices — things that apply regardless of which project is active. Do NOT use global for project-specific knowledge.

Parametersroletagsscopetitlerequiredsourcecontentrequiredimportancerelated_tomemory_typerelated_files

remember

Remember

Semantic search over stored memories. Call before memorize to avoid duplicates, and at task start to load context. Results include 1-hop graph neighbors automatically. A project scope also returns global memories. Prefer 2-5 related query terms for broader coverage. Results show [CONFIRMED]/[INFERRED] trust labels. For temporal questions ("last week", "in May"), set created_after/created_before (ISO-8601) to scope the time window — you know today's date, so compute the bounds.

Parametersroletagslimitqueryrequiredscopememory_typescreated_aftermin_relevancerelated_filescreated_before

Version history

11
  1. v0.15.1LatestNov 3, 2026
  2. v0.15.0Oct 29, 2026
  3. v0.14.10Oct 25, 2026
  4. v0.14.9Oct 24, 2026
  5. v0.14.8Oct 22, 2026
  6. v0.14.7Oct 11, 2026
  7. v0.14.6Oct 8, 2026
  8. v0.14.4Sep 30, 2026
  9. v0.14.3Sep 27, 2026
  10. v0.14.1Sep 19, 2026
  11. v0.14.0Sep 16, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts
  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts