Cube Memory MCP

Exact-retrieval persistent memory and code intelligence for AI agents: 100% recall hybrid search, per-project AES-256-GCM encryption, immutable SHA-256 literal layer, and lean 14-tool MCP profile.

Documentation

Cube Memory MCP Server

Official Model Context Protocol (MCP) connector for Cube Memory — persistent, encrypted, exact-retrieval memory and code intelligence for AI agents.

Key Features

  • Exact Hybrid Retrieval (100% Recall): Exact cosine vector scan + BM25 + RRF fusion + cross-encoder reranking (no approximate HNSW recall loss).
  • Per-Project Tenant Encryption: AES-256-GCM encryption at rest with independent Data Encryption Keys (DEKs) and per-island AAD isolation.
  • 3-Layer Intelligent Memory: Immutable append-only literal layer (SHA-256 verified), structured annotations, and summaries — never overwriting original sources.
  • Lean Tool Profile (-81% Schema Overhead): Exposes 14 essential tools by default with on-demand discovery (discover_cube_tools / call_cube_tool) for 120+ advanced capabilities (bi-temporal graph, living neurons, skills network, document trash).
  • Code Intelligence Layer: Per-symbol indexing (search_code, map_code, get_symbol, get_symbol_refs) so agents read only the symbols they need instead of whole files.
  • Zero-Dependency Stdio Connector: cube_memory_mcp.py uses Python 3.8+ standard library only (urllib) with automatic proxy pass-through and retry.

Quick Start

Option 1: Hosted Streamable HTTP (Recommended — No Local Files)

Add to Claude Code, Cursor, Windsurf, Antigravity, or any MCP client:

{
  "mcpServers": {
    "cube-memory": {
      "type": "http",
      "url": "https://cubememory.com.br/gateway/v1/mcp?profile=lean",
      "headers": {
        "Authorization": "Bearer YOUR_CM_LIVE_KEY",
        "X-Project-Id": "YOUR_PROJECT_ID"
      }
    }
  }
}

Option 2: Local Stdio Transport (Zero Dependencies)

{
  "mcpServers": {
    "cube-memory": {
      "command": "python3",
      "args": ["/path/to/cube_memory_mcp.py"],
      "env": {
        "CM_API_KEY": "YOUR_CM_LIVE_KEY",
        "CM_PROJECT_ID": "YOUR_PROJECT_ID"
      }
    }
  }
}

Sync Local Code Index

CM_API_KEY="YOUR_CM_LIVE_KEY" CM_PROJECT_ID="YOUR_PROJECT_ID" python3 cube_memory_mcp.py sync

Links

License

MIT