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

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
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
👀 See Also

Echo-TTS Ported to Apple Silicon with MLX for Native TTS with Voice Cloning
Echo-TTS, a 2.4B parameter diffusion text-to-speech model with voice cloning, has been ported from CUDA to run natively on Apple M-series silicon using MLX. On a base 16GB M4 Mac mini, a 5-second voice clone takes about 10 seconds to generate, while 30-second clones take about 60 seconds.

Developer shares solution for Claude AI ignoring rules beyond 50-count threshold
A developer reports Claude Code started silently dropping rules once their shared rule set exceeded approximately 50 items, particularly during frontend-heavy tasks. They built a hook that scans prompts and loads only 2-3 relevant rules based on keyword matching.

GGUF Model Merging Script and Workflow for Qwen3.5-35B Variants
A Reddit user shared a Python script for merging GGUF model files with minimal loss, specifically combining HauhauCS's Qwen3.5-35B-A3B-Uncensored model with samuelcardillo's Claude-4.6-Opus-Reasoning-Distilled version. The script runs on Google Colab Free Tier and includes quantization support via llama-quantize.

Ruflo: Open-Source Platform for Running Multiple AI Agents as a Team
Ruflo is an open-source platform that lets you run many AI agents together to work as a team on complex tasks. Previously known as Claude Flow, it helps coordinate workflows where tasks need to be broken into parts.