Cuba MCP Server

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

Local serverstdio

What is the Cuba MCP server?

Most knowledge and memory work still happens through a UI a human drives. Cuba MCP server moves it into the conversation instead. Persistent memory MCP server. 25 tools, BM25+MMR+OOD retrieval, CFR-21 audit, knowledge graph.

The short version

Written in Rust. Backed by PostgreSQL + pgvector. 28 MCP tools (29 with CUBA_DOCS=1), 19 CLI commands, and every number below measured on a benchmark that — as of v0.12 — actually measures what it claims to. (The previous one did not. See Measured.)

The tools it exposes

The server publishes 1 tool. What each one is for:

  • Retrieval — Hybrid RRF fusion (k=60, Cormack 2009) over three signals — full-text, BM25 (ts_rank_cd), and pgvector HNSW — with entropy-routed weighting that

Getting it running

cuba-memorys on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

What it needs from you

Configuration is passed through the environment: DATABASE_URL, CUBA_HTTP_TOKEN, ORT_DYLIB_PATH, CUBA_RERANKER_PATH, ONNX_MODEL_PATH, CUBA_NLI_PATH. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

How it compares

Plenty of knowledge and memory servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Cuba's toolset — Retrieval — is a fair guide to whether it matches your workflow. It is maintained by LeandroPG19; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
RetrievalHybrid RRF fusion (k=60, Cormack 2009) over three signals — full-text, BM25 (ts_rank_cd), and pgvector HNSW — with entropy-routed weighting that shifts from keyword-heavy to semantic as the query's Shannon entropy rises.

How to install the Cuba MCP server

{
  "mcpServers": {
    "cuba-memorys": {
      "command": "npx",
      "args": ["-y", "cuba-memorys"],
      "env": {
        "DATABASE_URL": "your-value",
        "CUBA_HTTP_TOKEN": "your-value",
        "ORT_DYLIB_PATH": "your-value",
        "CUBA_RERANKER_PATH": "your-value",
        "ONNX_MODEL_PATH": "your-value",
        "CUBA_NLI_PATH": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
DATABASE_URLEndpoint or connection string the server talks to.Yes
CUBA_HTTP_TOKENCredential the server authenticates with.Yes
ORT_DYLIB_PATHFilesystem location the server is allowed to use.Optional
CUBA_RERANKER_PATHFilesystem location the server is allowed to use.Optional
ONNX_MODEL_PATHFilesystem location the server is allowed to use.Optional
CUBA_NLI_PATHFilesystem location the server is allowed to use.Optional

Example prompts to try

  • Use Cuba to Retrieval.

Frequently asked questions

It connects Cuba to MCP-compatible AI assistants such as Claude and Cursor, exposing 1 tool (Retrieval) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Cuba directly.