M

Memory Industry

by LeandroPG19 · io.github.LeandroPG19/memory-industry

Persistent memory for AI agents with knowledge graph, Hebbian learning, 4-signal RRF fusion search, GraphRAG enrichment, FSRS spaced repetition, and anti-hallucination grounding. 12 tools, PostgreSQL.

npm Local · stdio GlamaOfficial MCP Registry High confidence

Install

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "io-github-leandropg19-memory-industry": {
      "command": "npx",
      "args": [
        "-y",
        "memory-industry"
      ],
      "env": {
        "DATABASE_URL": "<VALUE>",
        "CUBA_PROJECT_FILTER": "<VALUE>",
        "CUBA_SYNC_DIR": "<VALUE>",
        "CUBA_JUDGE": "<VALUE>",
        "CUBA_JUEZ_CLI": "<VALUE>",
        "CUBA_JUEZ_MODEL": "<VALUE>",
        "CUBA_REM_RELATION_BATCH": "<VALUE>",
        "CUBA_RERANKER_PATH": "<VALUE>",
        "CUBA_RERANK_FIXED_SHAPE": "<VALUE>"
      }
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "io-github-leandropg19-memory-industry": {
      "command": "npx",
      "args": [
        "-y",
        "memory-industry"
      ],
      "env": {
        "DATABASE_URL": "<VALUE>",
        "CUBA_PROJECT_FILTER": "<VALUE>",
        "CUBA_SYNC_DIR": "<VALUE>",
        "CUBA_JUDGE": "<VALUE>",
        "CUBA_JUEZ_CLI": "<VALUE>",
        "CUBA_JUEZ_MODEL": "<VALUE>",
        "CUBA_REM_RELATION_BATCH": "<VALUE>",
        "CUBA_RERANKER_PATH": "<VALUE>",
        "CUBA_RERANK_FIXED_SHAPE": "<VALUE>"
      }
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "io-github-leandropg19-memory-industry": {
      "command": "npx",
      "args": [
        "-y",
        "memory-industry"
      ],
      "env": {
        "DATABASE_URL": "<VALUE>",
        "CUBA_PROJECT_FILTER": "<VALUE>",
        "CUBA_SYNC_DIR": "<VALUE>",
        "CUBA_JUDGE": "<VALUE>",
        "CUBA_JUEZ_CLI": "<VALUE>",
        "CUBA_JUEZ_MODEL": "<VALUE>",
        "CUBA_REM_RELATION_BATCH": "<VALUE>",
        "CUBA_RERANKER_PATH": "<VALUE>",
        "CUBA_RERANK_FIXED_SHAPE": "<VALUE>"
      }
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "io-github-leandropg19-memory-industry": {
      "command": "npx",
      "args": [
        "-y",
        "memory-industry"
      ],
      "env": {
        "DATABASE_URL": "<VALUE>",
        "CUBA_PROJECT_FILTER": "<VALUE>",
        "CUBA_SYNC_DIR": "<VALUE>",
        "CUBA_JUDGE": "<VALUE>",
        "CUBA_JUEZ_CLI": "<VALUE>",
        "CUBA_JUEZ_MODEL": "<VALUE>",
        "CUBA_REM_RELATION_BATCH": "<VALUE>",
        "CUBA_RERANKER_PATH": "<VALUE>",
        "CUBA_RERANK_FIXED_SHAPE": "<VALUE>"
      }
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "io-github-leandropg19-memory-industry": {
      "command": "npx",
      "args": [
        "-y",
        "memory-industry"
      ],
      "env": {
        "DATABASE_URL": "<VALUE>",
        "CUBA_PROJECT_FILTER": "<VALUE>",
        "CUBA_SYNC_DIR": "<VALUE>",
        "CUBA_JUDGE": "<VALUE>",
        "CUBA_JUEZ_CLI": "<VALUE>",
        "CUBA_JUEZ_MODEL": "<VALUE>",
        "CUBA_REM_RELATION_BATCH": "<VALUE>",
        "CUBA_RERANKER_PATH": "<VALUE>",
        "CUBA_RERANK_FIXED_SHAPE": "<VALUE>"
      }
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "io-github-leandropg19-memory-industry": {
      "command": "npx",
      "args": [
        "-y",
        "memory-industry"
      ],
      "env": {
        "DATABASE_URL": "<VALUE>",
        "CUBA_PROJECT_FILTER": "<VALUE>",
        "CUBA_SYNC_DIR": "<VALUE>",
        "CUBA_JUDGE": "<VALUE>",
        "CUBA_JUEZ_CLI": "<VALUE>",
        "CUBA_JUEZ_MODEL": "<VALUE>",
        "CUBA_REM_RELATION_BATCH": "<VALUE>",
        "CUBA_RERANKER_PATH": "<VALUE>",
        "CUBA_RERANK_FIXED_SHAPE": "<VALUE>"
      }
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
DATABASE_URL Yes PostgreSQL connection string (e.g., postgresql://user:password@127.0.0.1:5488/brain)
CUBA_PROJECT_FILTER No Set to 'off' to disable v0.8 project scoping filters (admin/debug only).
CUBA_SYNC_DIR No Directory used by cuba_sync export/import (default ./.memory-industry/, falls back to ./.cuba-memorys/).
CUBA_JUDGE No cuba_juez backend selector: nli | mcp_sampling | claude_cli | heuristic | auto (default auto).
CUBA_JUEZ_CLI No Subprocess CLI used by ClaudeCodeJudge (default 'claude').
CUBA_JUEZ_MODEL No Model name passed to the judge backend (default 'claude-haiku-4-5').
CUBA_REM_RELATION_BATCH No Isolated entities the REM cycle scans for relations per run (default 5, 0 disables).
CUBA_RERANKER_PATH No Directory holding the bge-reranker ONNX model; enables cross-encoder reranking (+93% nDCG on GPU).
CUBA_RERANK_FIXED_SHAPE No Pad reranker batches to a constant 512 tokens. Defaults on for GPU builds, off on CPU.

Similar servers