# cuba-memorys

**Category:** 🧠 Knowledge & Memory  
**Repository:** https://github.com/LeandroPG19/cuba-memorys  
**GitHub Stars:** 30  
**Views:** 6  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/cuba-memorys

## Description
Persistent memory MCP server. 25 tools, BM25+MMR+OOD retrieval, CFR-21 audit, knowledge graph.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "cuba-memorys": {
    "command": "uvx",
    "args": ["memory-industry"]
  }
}
```

## Documentation

## What cuba-memorys MCP server does

The cuba-memorys MCP server provides long-term memory for AI coding agents. It stores information in PostgreSQL with pgvector and exposes the data through MCP tools. The project is now named MemoryIndustry, but the former `cuba-memorys` package name, command, and `cuba_*` MCP tool names remain available.

Its memory model includes a searchable knowledge graph, persistent records, procedural memory, and claim verification. The repository describes 31 MCP tools, or 32 when `CUBA_DOCS=1` is enabled. It also provides 25 CLI commands for setup, diagnostics, model management, serving, and related administration.

This fits the Knowledge & Memory category for agents that need information to survive across coding sessions. It is intended for local or shared deployments rather than a transient, in-process conversation store.

## How it works

A default installation provisions a PostgreSQL 18 container with the pgvector extension through Docker and initializes the schema on first use. A user-supplied PostgreSQL instance is also supported when it has the `vector` and `pg_trgm` extensions.

Retrieval can combine lexical search, BM25 ranking, semantic embeddings, maximal marginal relevance, and out-of-distribution detection. Without an embedding model, the system uses deterministic hash-based embeddings; lexical and BM25 search continue to work, but semantic similarity is not available. Optional models provide embeddings, natural-language inference, and reranking.

The server can run as a separate stdio process for each MCP client or as one HTTP daemon shared by multiple clients. The HTTP mode listens on loopback by default and exposes `/mcp` plus a `/health` endpoint. A client identifier header keeps sessions separate when several editor windows use the same daemon.

## Setup and configuration

Install the current package with `pip install memory-industry` or `npm install -g memory-industry`. The previous `cuba-memorys` package name is also supported, and the `cuba-memorys` command remains an alias. Docker must be running for the automatic PostgreSQL setup.

For clients such as Cursor, Windsurf, VS Code, and Zed, configure an MCP entry whose command is `memory-industry` or `cuba-memorys`. The `DATABASE_URL` variable is optional when using the Docker-managed database. Set it to a PostgreSQL connection string to use an existing database.

Run `cuba-memorys models embed` or `cuba-memorys models all` to install models. Model files are stored under `~/.cache/cuba-memorys/`. `cuba-memorys doctor` checks database extensions and model availability.

## Tools and capabilities

- Store and retrieve persistent agent memory.
- Search memory with lexical, BM25, semantic, and diversified retrieval methods.
- Query and reason over a knowledge graph.
- Verify claims with audit-oriented workflows, including CFR-21 support.
- Use embeddings, reranking, and NLI models when installed.
- Serve MCP over stdio or shared loopback HTTP.

## Limitations and notes

Semantic retrieval depends on installed models. Hash-based fallback embeddings are deterministic but do not represent meaning. Model loading can require several gigabytes of memory when embeddings, reranking, and NLI are enabled.

The HTTP daemon exposes the graph without authentication by default, so a non-loopback bind requires `CUBA_HTTP_TOKEN`; the token must be at least 32 characters on a routable address. The project supports PostgreSQL 18 and requires Docker for its automatic database provisioning path. The former name, cuba-memorys, refers to the same daemon now distributed as MemoryIndustry.

_Full upstream README: https://allmcps.com/mcp/cuba-memorys/readme_

