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

OpenClaw Benchmark Shows Qwen3.5:27B Outperforms Other Local LLMs for Agent Tasks
Tools

OpenClaw Benchmark Shows Qwen3.5:27B Outperforms Other Local LLMs for Agent Tasks

A benchmark of 7 local LLMs on 22 real agent tasks using OpenClaw found qwen3.5:27b-q4_K_M scored 59.4%, while the runner-up qwen3.5:35b scored only 23.2%. Most models couldn't find basic tools like email functions.

OpenClawRadar
PageAgent: Browser AI Agent That Runs Inside Web Pages with Ollama Support
Tools

PageAgent: Browser AI Agent That Runs Inside Web Pages with Ollama Support

PageAgent is a JavaScript library that runs AI agents directly inside web pages, reading live DOM as text instead of using screenshots. It works with any OpenAI-compatible endpoint including Ollama, enabling local LLM calls directly from the browser.

OpenClawRadar
PocketTeam: A Claude Code Pipeline with Hook-Based Safety and Learning Agents
Tools

PocketTeam: A Claude Code Pipeline with Hook-Based Safety and Learning Agents

PocketTeam is a Claude Code pipeline that implements 9 safety layers at the tool-call level to block dangerous operations like writes to .env or rm -rf commands. The system includes an Observer agent that analyzes completed tasks and writes structured learnings to improve future agent performance.

OpenClawRadar
Benchmarking Nemotron 3 Super 120B with 1M token context on M1 Ultra
Tools

Benchmarking Nemotron 3 Super 120B with 1M token context on M1 Ultra

A user tested Nemotron 3 Super 120B with a Q4_K_M quantized model using llama.cpp on an M1 Ultra, achieving a 1 million token context window that consumed approximately 90GB of VRAM. Performance benchmarks show token generation speeds ranging from 255 t/s at 512 prompt processing down to 22.37 t/s at 100,000 token context.

OpenClawRadar