
Cuba Memorys
A heavyweight persistent memory layer that goes far beyond key-value storage. Built on PostgreSQL with 25 tools spanning entity management, knowledge graphs, episodic memory, and hybrid search combining BM25, vector embeddings, and MMR diversification. Implements neuroscience-inspired decay curves (Hebbian plasticity, BCM metaplasticity), LLM-powered contradiction detection via Claude CLI, and Leiden community detection for graph analytics. Ships with CFR-21 audit trails, project-scoped isolation, git-friendly JSON exports, and conformal prediction for out-of-distribution abstention. Reach for this when you need AI agents to remember context across sessions with mathematical rigor, not just append to a log file. Written in Rust with zero clippy warnings and 97 tests covering the cognitive algorithms.
- GitHub stars
- 30
- tools
- 28
- auth
- Secret needed
- transport
- STDIO
- env vars
- 10
- last updated
- Aug 16, 2026
Tools
28 toolsPublic tool metadata for what this MCP can expose to an agent.
cuba_almaEntities in the knowledge graph.
Entities in the knowledge graph.
No parameter schema in public metadata yet.
cuba_cronicaObservations, episodes, and timeline.
Observations, episodes, and timeline.
No parameter schema in public metadata yet.
cuba_puenteTyped relations, traversal, and link prediction.
Typed relations, traversal, and link prediction.
No parameter schema in public metadata yet.
cuba_ingestaBulk import.
Bulk import.
No parameter schema in public metadata yet.
cuba_faroHybrid RRF search with verification, MMR diversification, and OOD abstention.
Hybrid RRF search with verification, MMR diversification, and OOD abstention.
No parameter schema in public metadata yet.
cuba_alarmaReport errors to error memory.
Report errors to error memory.
No parameter schema in public metadata yet.
cuba_remedioResolve reported errors.
Resolve reported errors.
No parameter schema in public metadata yet.
cuba_expedienteSearch past errors; warns if an approach failed before.
Search past errors; warns if an approach failed before.
No parameter schema in public metadata yet.
cuba_jornadaSession lifecycle and diff.
Session lifecycle and diff.
No parameter schema in public metadata yet.
cuba_decretoArchitecture decisions.
Architecture decisions.
No parameter schema in public metadata yet.
cuba_proyectoPer-project isolation.
Per-project isolation.
No parameter schema in public metadata yet.
cuba_pre_compactSurvive /compact.
Survive /compact.
No parameter schema in public metadata yet.
cuba_recetaRecipes ranked by Wilson lower bound.
Recipes ranked by Wilson lower bound.
No parameter schema in public metadata yet.
cuba_reflexionGap detection.
Gap detection.
No parameter schema in public metadata yet.
cuba_hipotesisAbductive inference.
Abductive inference.
No parameter schema in public metadata yet.
cuba_contradiccionSemantic conflict detection.
Semantic conflict detection.
No parameter schema in public metadata yet.
cuba_juezLLM judge.
LLM judge.
No parameter schema in public metadata yet.
cuba_centinelaProspective triggers.
Prospective triggers.
No parameter schema in public metadata yet.
cuba_calibrarBayesian calibration and source credibility.
Bayesian calibration and source credibility.
No parameter schema in public metadata yet.
cuba_zafraDecay, prune, merge, PageRank, and Leiden communities.
Decay, prune, merge, PageRank, and Leiden communities.
No parameter schema in public metadata yet.
cuba_ecoRLHF feedback.
RLHF feedback.
No parameter schema in public metadata yet.
cuba_vigiaHealth, drift, and centrality.
Health, drift, and centrality.
No parameter schema in public metadata yet.
cuba_forgetGDPR erasure.
GDPR erasure.
No parameter schema in public metadata yet.
cuba_archivoCFR-21 hash-chain audit log.
CFR-21 hash-chain audit log.
No parameter schema in public metadata yet.
cuba_pizarraWorking memory.
Working memory.
No parameter schema in public metadata yet.
cuba_syncGit-friendly export/import between machines, with propagated deletions and a remote-wipe guard.
Git-friendly export/import between machines, with propagated deletions and a remote-wipe guard.
No parameter schema in public metadata yet.
cuba_toolsDiscover tools.
Discover tools.
No parameter schema in public metadata yet.
cuba_callInvoke tools.
Invoke tools.
No parameter schema in public metadata yet.
Sponsors
Configuration
DATABASE_URL*PostgreSQL connection URL (e.g. postgresql://user:pass@localhost:5432/brain)
CUBA_PROJECT_FILTERSet to 'off' to disable v0.8 project scoping filters (admin/debug only).
CUBA_SYNC_DIRDirectory used by cuba_sync export/import (default ./.cuba-memorys/).
CUBA_JUDGEcuba_juez backend selector: claude_cli | anthropic_api | heuristic | auto (default auto).
CUBA_JUEZ_CLISubprocess CLI used by ClaudeCodeJudge (default 'claude').
CUBA_JUEZ_MODELModel name passed to the judge backend (default 'claude-haiku-4-5').
ANTHROPIC_API_KEYsecretAPI key for AnthropicApiJudge (only used when feature 'anthropic-api' is built in).
CUBA_REM_RELATION_BATCHIsolated entities the REM cycle scans for relations per run (default 5, 0 disables).
CUBA_RERANKER_PATHDirectory holding the bge-reranker ONNX model; enables cross-encoder reranking (+93% nDCG on GPU).
CUBA_RERANK_FIXED_SHAPEPad reranker batches to a constant 512 tokens. Defaults on for GPU builds, off on CPU.
Readme
MemoryIndustry
Formerly cuba-memorys. Same daemon, same cuba_* MCP tools, new product name.
Details
- Repository
- github.com/leandropg19/cuba-memorys
- Category
- AI & LLM Tools
- Package
cuba-memorys- Transport
- STDIO
- Auth
- Required
- Registry
- MCP registry, active