Cuba Memroys

v0.9.3Knowledge & Memorystable

Persistent memory MCP server for AI agents — Rust, 19 tools, knowledge graph, Hebbian learning, episodic memory, contradiction detection, prospective triggers, Bayesian calibration, zero-config Docker setup.

ai-memoryai-toolsanti-hallucinationepisodic-memoryexponential-decay
Share:
22
Stars
0
Downloads
0
Weekly
0/5

What is Cuba Memroys?

Cuba Memroys is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to persistent memory mcp server for ai agents — rust, 19 tools, knowledge graph, hebbian learning, episodic memory, contradiction detection, prospective triggers, bayesian calibration, zero-config docker...

Persistent memory MCP server for AI agents — Rust, 19 tools, knowledge graph, Hebbian learning, episodic memory, contradiction detection, prospective triggers, Bayesian calibration, zero-config Docker setup.

This server falls under the Knowledge & Memory category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Persistent memory MCP server for AI agents — Rust, 19 tools,

Use Cases

Persistent agent memory
Episodic and semantic storage
Knowledge graph with Hebbian learning
LeandroPG19

Maintainer

LicenseCreative Commons Attribution Non Commercial 4.0 International
Languagerust
Versionv0.9.3
UpdatedMay 8, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y cuba-memorys

PIP

pip install cuba-memorys

Manual Installation

npx -y cuba-memorys

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Cuba Memroys

Cuba Memorys (npm: cuba-memorys) is a production-grade persistent memory MCP server written in Rust that gives AI agents a knowledge graph backed by PostgreSQL with 25 specialised tools covering entity and relation management, semantic search with RRF fusion, episodic memory, error pattern detection, Hebbian learning with exponential decay, Bayesian confidence calibration, contradiction scanning, and GDPR-compliant erasure. It is designed for long-running coding agents that need to accumulate knowledge across sessions, detect when they are about to repeat a past mistake, and reason about their own uncertainty without hallucinating.

Prerequisites

  • PostgreSQL 18 with the pgvector extension installed and running
  • The cuba-memorys binary: install via pip (pip install cuba-memorys==1.12.0) or npm (npm install -g [email protected])
  • Optional: ONNX Runtime and a multilingual e5-small model for embedding-based semantic search
  • An MCP-compatible client such as Claude Code, Cursor, Windsurf, or VS Code with an MCP plugin
  • DATABASE_URL environment variable pointing to your PostgreSQL instance
1

Install cuba-memorys

Install the binary via pip or npm. Both install the same Rust binary; choose whichever package manager is already in your workflow.

# Via pip
pip install cuba-memorys==1.12.0

# Via npm
npm install -g [email protected]
2

Start PostgreSQL and set DATABASE_URL

Cuba Memorys requires a PostgreSQL 18 instance. Set DATABASE_URL so the server can connect. If you do not set it, the server will attempt to auto-provision a local database.

export DATABASE_URL=postgresql://user:password@localhost:5432/cuba_memorys
3

Register with Claude Code

Add the server to Claude Code in one command. Claude Code will invoke the cuba-memorys binary as an MCP server on each session.

claude mcp add cuba-memorys -- cuba-memorys
4

Add to Claude Desktop or other MCP clients

For Claude Desktop, Cursor, Windsurf, or VS Code, add the mcpServers entry to your config file.

{
  "mcpServers": {
    "cuba-memorys": {
      "command": "cuba-memorys",
      "env": {
        "DATABASE_URL": "postgresql://user:password@localhost:5432/cuba_memorys",
        "RUST_LOG": "cuba_memorys=info"
      }
    }
  }
}
5

Optional: configure ONNX embeddings

For full semantic search quality, provide the ONNX model paths. Without these, the server falls back to keyword-based search.

export ONNX_MODEL_PATH=/path/to/multilingual-e5-small
export ORT_DYLIB_PATH=/path/to/libonnxruntime.so
export CUBA_RERANKER_PATH=/path/to/bge-reranker-v2-m3

Cuba Memroys Examples

Client configuration

Complete MCP config entry for cuba-memorys with PostgreSQL and Rust logging configured.

{
  "mcpServers": {
    "cuba-memorys": {
      "command": "cuba-memorys",
      "env": {
        "DATABASE_URL": "postgresql://user:password@localhost:5432/cuba_memorys",
        "RUST_LOG": "cuba_memorys=info",
        "CUBA_BITEMPORAL": "on"
      }
    }
  }
}

Prompts to try

Example agent prompts that use the 25 cuba-memorys tools to build and query persistent knowledge.

- "Store that FastAPI requires async def functions with response_model for type safety"
- "Search memory for anything related to database migrations and summarise what you know"
- "I got an IntegrityError on duplicate numero_parte — log this error and check if it has happened before"
- "Are there any contradictions in what I've told you about the authentication system?"
- "Run memory maintenance to decay old entries and consolidate episodes"
- "Export all memory for the current project to a git-friendly JSON format"

Troubleshooting Cuba Memroys

Server fails to start with 'could not connect to server: Connection refused'

PostgreSQL must be running before cuba-memorys starts. Confirm with 'pg_isready -h localhost -p 5432'. Check that DATABASE_URL uses the correct host, port, username, and password, and that the target database exists.

Semantic search returns only exact keyword matches, not conceptually similar results

Full semantic search requires the ONNX Runtime and an e5-small model. Set ONNX_MODEL_PATH to the directory containing the model files and ORT_DYLIB_PATH to the libonnxruntime shared library. Without these, the server uses keyword-only FTS5 search.

cuba_faro returns results from other projects when CUBA_PROJECT_FILTER is not set

By default, cuba-memorys scopes queries to the current project. If you are seeing cross-project results, ensure CUBA_PROJECT_FILTER is not set to 'off', or explicitly pass the project name when calling cuba_proyecto to switch to the correct project context.

Frequently Asked Questions about Cuba Memroys

What is Cuba Memroys?

Cuba Memroys is a Model Context Protocol (MCP) server that persistent memory mcp server for ai agents — rust, 19 tools, knowledge graph, hebbian learning, episodic memory, contradiction detection, prospective triggers, bayesian calibration, zero-config docker setup. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Cuba Memroys?

Install via npm with the command: npx -y cuba-memorys. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with Cuba Memroys?

Cuba Memroys works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Cuba Memroys free to use?

Yes, Cuba Memroys is open source and available under the Creative Commons Attribution Non Commercial 4.0 International license. You can use it freely in both personal and commercial projects.

Browse More Knowledge & Memory MCP Servers

Explore all knowledge & memory servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "cuba-memroys": { "command": "npx", "args": ["-y", "cuba-memorys"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Cuba Memroys?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides