Skip to main content
MCP server CX Codex

memory-industry — Claude Code MCP server: what it does, how to install

Long-term memory for coding agents: a knowledge graph they can search, reason over and correct between sessions.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env DATABASE_URL=<DATABASE_URL> --env CUBA_PROJECT_FILTER=<CUBA_PROJECT_FILTER> --env CUBA_SYNC_DIR=<CUBA_SYNC_DIR> --env CUBA_JUDGE=<CUBA_JUDGE> --env CUBA_JUEZ_CLI=<CUBA_JUEZ_CLI> --transport stdio memory-industry -- npx -y memory-industry
Open on GitHub

What memory-industry does

MemoryIndustry, previously cuba-memorys, is an MCP server written in Rust and backed by PostgreSQL 18 with pgvector. It hands your agent a knowledge graph to search and reason over, so the codebase stops slipping away when a session ends. The package ships 31 MCP tools (32 with CUBA_DOCS=1) and 28 CLI commands, including hybrid BM25+MMR retrieval and claim verification with an LLM judge.

Setup is two lines: pip install memory-industry (or npm install -g memory-industry), then claude mcp add memory-industry -- memory-industry. On the first run it provisions a PostgreSQL 18 + pgvector container through Docker and creates the schema. Docker has to be running — without it the server never comes up. You can point it at your own database instead by setting DATABASE_URL; that database needs the vector and pg_trgm extensions, and cuba-memorys doctor reports what is missing. cuba-memorys setup writes the config for every client it finds, while setup check compares them, because two configs with different embedding dimensions break search without saying so.

One shared daemon can replace a process per client. cuba-memorys serve listens on 127.0.0.1:8787 and loads the models once instead of once per editor window. Bind it anywhere other than loopback and CUBA_HTTP_TOKEN becomes mandatory, at least 32 characters on a routable address; otherwise the whole graph is served with no authentication.

What it helps with

  • find a code fragment in agent memory by meaning instead of exact wording
  • keep decisions and agreements across Claude sessions
  • verify an agent's claim about the code with an LLM judge
  • share one memory across several editor windows without duplicate model copies
  • compare MCP configs across clients and catch an embedding dimension mismatch

Example prompts for the agent

  • Search memory for what we decided about the auth schema
  • Save to memory: migrations run through alembic
  • Verify the claim that this module is never called

How to install memory-industry

Platform CLI

claude mcp add --env DATABASE_URL=<DATABASE_URL> --env CUBA_PROJECT_FILTER=<CUBA_PROJECT_FILTER> --env CUBA_SYNC_DIR=<CUBA_SYNC_DIR> --env CUBA_JUDGE=<CUBA_JUDGE> --env CUBA_JUEZ_CLI=<CUBA_JUEZ_CLI> --transport stdio memory-industry -- npx -y memory-industry

Replace <…> with your own values. 4 more environment variables are in the server README

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about memory-industry

How do I install memory-industry in Claude Code?

Run pip install memory-industry (or npm install -g memory-industry), then claude mcp add memory-industry -- memory-industry. The first run provisions a PostgreSQL 18 + pgvector container, so Docker must be running.

What does memory-industry do?

It gives an agent long-term memory as a knowledge graph on PostgreSQL with pgvector. The agent searches it, reasons over it and gets corrected, so project context survives between sessions.

What do I need to use my own PostgreSQL?

Set DATABASE_URL in the MCP server config. The database needs the vector and pg_trgm extensions; cuba-memorys doctor tells you whether anything is missing.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor