Skip to main content
Glama
README.md
# Cube Memory MCP Server

Official Model Context Protocol (MCP) connector for **[Cube Memory](https://cubememory.com.br)** — 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:

```json
{
  "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)
```json
{
  "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
```bash
CM_API_KEY="YOUR_CM_LIVE_KEY" CM_PROJECT_ID="YOUR_PROJECT_ID" python3 cube_memory_mcp.py sync
```

## Links
- Website & Dashboard: https://cubememory.com.br
- Hosted MCP Endpoint: `https://cubememory.com.br/gateway/v1/mcp`

## License
MIT

TDQS

A3.7/5.0

Scored across 14 tools

Disambiguation4/5

Most tools have clearly distinct purposes: memory CRUD, code navigation, and workflow checkpoints are separated cleanly, and fetch_memory vs search_memory vs store_memory are unambiguous. The only real overlap is the retrieval trio search_memory / search_context / search_code, where search_context explicitly subsumes memories and code symbols; descriptions give priority hints ('call this first', 'use for where is X implemented'), so an agent can recover, but the boundaries are not perfectly sharp.

Naming Consistency4/5

All 14 names are snake_case with a leading verb (search_, fetch_, store_, list_, get_, checkpoint_, resume_), which is predictable and readable. Minor deviations: 'map_code' uses an unconventional verb, 'ingest_documents_tracked' carries a trailing qualifier, and 'get_symbol_refs' mixes get_ with a noun suffix, but the overall pattern holds.

Tool Count5/5

14 tools sits comfortably in the well-scoped range, and each one maps to a concrete operation across the three sub-areas (memory, code index, work checkpoints). Nothing looks like padding: even the narrower tools (map_code, get_symbol_refs) cover distinct retrieval needs that the broader search tools cannot.

Completeness4/5

Memory lifecycle is well covered (store, fetch, list, search, soft forget with audit trail) and code navigation covers search, skeleton, symbol body and cross-file references. Gaps are minor: no explicit update_memory (store_memory absorbs updates by convention), no hard-delete or memory-edit path beyond soft close, and no visible tool to trigger or refresh code/document indexing beyond the tracked ingestion call.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues