leandropg19 avatar

Cuba Memorys

leandropg19/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 tools

Public 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_FILTER

Set to 'off' to disable v0.8 project scoping filters (admin/debug only).

CUBA_SYNC_DIR

Directory used by cuba_sync export/import (default ./.cuba-memorys/).

CUBA_JUDGE

cuba_juez backend selector: claude_cli | anthropic_api | heuristic | auto (default auto).

CUBA_JUEZ_CLI

Subprocess CLI used by ClaudeCodeJudge (default 'claude').

CUBA_JUEZ_MODEL

Model name passed to the judge backend (default 'claude-haiku-4-5').

ANTHROPIC_API_KEYsecret

API key for AnthropicApiJudge (only used when feature 'anthropic-api' is built in).

CUBA_REM_RELATION_BATCH

Isolated entities the REM cycle scans for relations per run (default 5, 0 disables).

CUBA_RERANKER_PATH

Directory holding the bge-reranker ONNX model; enables cross-encoder reranking (+93% nDCG on GPU).

CUBA_RERANK_FIXED_SHAPE

Pad 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.

CI PyPI npm MCP Registry Rust PostgreSQL License: Apache 2.0


View the full README on GitHub

Details

Repository
github.com/leandropg19/cuba-memorys
Category
AI & LLM Tools
Package
cuba-memorys
Transport
STDIO
Auth
Required
Registry
MCP registry, active

Related AI & LLM Tools MCP servers

View all
1vishisht16 avatarHumane Proxyvishisht16/humane-proxyAI safety middleware — detects self-harm and criminal intent in LLM prompts.28stars
2mkxultra avatarAi Cli Mcpmkxultra/ai-cli-mcpRun Claude, Codex, Gemini, Forge, and OpenCode CLIs through MCP with background jobs27stars
3youdotcom-oss avatarYou.com Web Access & AIyoudotcom-oss/mcpWeb search, AI agent, and content extraction via You.com APIs0stars
4olostep avatarOlostep MCP Serverolostep/olostep-mcp-serverLive web search, scraping and crawling API for AI. Get structured, LLM-ready data from any site.25stars
5grahammccain avatarChart Library — Market-state researchgrahammccain/chart-library-mcpMarket memory for AI: historical states, published studies and source evidence.23stars
6unleash avatarUnleash Mcpunleash/unleash-mcpMCP server for Unleash: an AI-agent-friendly interface to Unleash21stars