Open-source MCP memory server with knowledge graph and learning features

✍️ OpenClawRadar📅 Published: March 28, 2026🔗 Source
Open-source MCP memory server with knowledge graph and learning features
Ad

An open-source MCP server called cuba-memorys provides persistent memory for AI agents, going beyond simple RAG or vector stores. Written in Rust with a PostgreSQL + pgvector backend, it implements a knowledge graph architecture with learning capabilities.

Architecture and features

The system stores entities, observations, and typed relations rather than flat documents. Key features include:

  • Exponential decay — Memories fade realistically using importance = importance * exp(-0.693 * days/halflife) with a 30-day halflife
  • Hebbian + BCM metaplasticity — Oja's rule with EMA sliding threshold; memories strengthen with access and self-normalize via BCM
  • 4-signal RRF fusion (k=60) — Combines ts_rank + trigrams + pgvector HNSW + importance with entropy-routed weighting to detect keyword-dominant vs semantic queries
  • Leiden community detection — Traag et al. 2019 algorithm for discovering clusters in the knowledge graph
  • Personalized PageRank — Ranks entity importance based on graph topology
  • Anti-hallucination verification — Triangulates claims against stored knowledge with graduated confidence scoring
  • Error memory with pattern detection — Triggers warnings when ≥3 similar errors occur
Ad

Performance benchmarks

The Rust implementation shows significant improvements over the original Python version:

  • Binary size: ~50MB venv (Python) vs 7.6MB (Rust)
  • Entity create: ~2ms (Python) vs 498μs (Rust)
  • Hybrid search: <5ms (Python) vs 2.52ms (Rust)
  • Memory usage: ~120MB (Python) vs ~15MB (Rust)
  • Dependencies: 12 packages (Python) vs 0 runtime (Rust)

Implementation details

The server provides 13 MCP tools and works with any MCP-compatible client including Claude Code, Cursor, and Windsurf. It's self-hosted with a PostgreSQL backend and makes no external API calls. All algorithms are based on peer-reviewed papers with citations in the README.

Installation options:

pip install cuba-memorys

or

npm install -g cuba-memorys

The project is available under CC BY-NC 4.0 license on GitHub.

📖 Read the full source: r/LocalLLaMA

Ad

👀 See Also

🦀
Tools

Reef's OpenClaw-RL Recipe Puts Scored Weight Updates Behind a Release Gate

Reef's OpenClaw-RL weight-evolution recipe treats 72 GSM8K problems as 72 tasks, uses Qwen3-4B for policy and process-reward-model roles with Qwen3-32B as student, and runs on seven GPUs. It hit its three-consecutive-pass criterion at session 14.

OpenClawRadar
AutoClaw Local Runner Review: Easy Setup, Credit Costs, and Uninstall Issues
Tools

AutoClaw Local Runner Review: Easy Setup, Credit Costs, and Uninstall Issues

A user tested AutoClaw, a local runner for OpenClaw/AutoGLM from Zai_org, finding the setup smooth but encountering high credit consumption, task failures, and concerning persistence after uninstallation including registry entries and plaintext credentials.

OpenClawRadar
GuppyLM: A 9M Parameter LLM Built from Scratch for Educational Purposes
Tools

GuppyLM: A 9M Parameter LLM Built from Scratch for Educational Purposes

GuppyLM is a ~9M parameter language model trained from scratch on 60K synthetic conversations, using a vanilla transformer architecture with 6 layers, 384 hidden dimensions, and 6 attention heads. It trains in about 5 minutes on a free Colab T4 GPU and speaks with a fish personality focused on water, food, and tank life.

OpenClawRadar
Headless OpenClaw Setup with Discord via Docker Scripts
Tools

Headless OpenClaw Setup with Discord via Docker Scripts

A GitHub repository provides scripts to run OpenClaw with Discord in a headless Docker container, avoiding the TUI/WebUI. It includes a management script with commands like claw init, start, and stop, plus preconfigured support for OpenAI Responses API, Chromium, and various tools.

OpenClawRadar