The architecture behind memory

CMK is a structured memory layer for Claude. It intercepts conversations via MCP, classifies memories through five semantic gates, stores them locally, and retrieves them with vector search when context demands it.

How data flows

From conversation to persistent recall, every memory passes through a deterministic pipeline.

architecture
  Claude Desktop / Claude Code
            |
            v
  ┌─────────────────────┐
  │     MCP Server       │   cmk serve --port 7749
  │   (tool interface)   │
  └─────────┬───────────┘
            |
            v
  ┌─────────────────────┐
  │    Five Gates        │   behavioral, relational, epistemic,
  │  (classification)    │   promissory, correction
  └─────────┬───────────┘
            |
       ┌────┴────┐
       v         v
  ┌─────────┐ ┌──────────┐
  │ SQLite  │ │ Vectors  │   metadata + embeddings
  │ (meta)  │ │ (search) │   local or cloud
  └────┬────┘ └────┬─────┘
       └────┬──────┘
            v
  ┌─────────────────────┐
  │      Recall          │   semantic search + keyword match
  │  (hybrid retrieval)  │   confidence scoring + decay
  └─────────────────────┘

How CMK compares

CMK fills a gap that existing approaches leave open.

FeatureCMKSystem promptCLAUDE.mdNo memory
Persists across sessionsYesNoManualNo
Auto-classifies memoriesYesNoNoNo
Semantic search recallYesNoNoNo
Editable by userYesNoYesNo
Scoped (user/project/global)YesNoPartialNo
Confidence scoringYesNoNoNo
Decay and expiryYesNoNoNo
Local-first storageYesN/AYesN/A
Identity synthesisYesNoNoNo

Built for every scale

Whether you work solo or with a team, CMK adapts to your workflow.

Individual dev

Your preferences, your stack, your habits. CMK learns how you code and remembers it across every session.

Local-only storage, zero config
Remembers editor, language, and style preferences
Identity document builds automatically
Pin important memories to prevent decay

Team

Shared context about team members, conventions, and architecture decisions that every Claude session should know.

Project-scoped memories for shared context
Relational gate tracks team structure
Cloud sync across all devices
API keys for shared access control

Enterprise

Deploy CMK as a memory service across your organization. Audit trails, access control, and full data sovereignty.

Self-hosted with full data control
Clerk auth integration for SSO
API key management per service
Export and deletion for compliance