# izzyfuller/cognitive-memory-mcp architecture

> Architecture diagram of the GitHub repository izzyfuller/cognitive-memory-mcp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/izzyfuller/cognitive-memory-mcp
- Repository: https://github.com/izzyfuller/cognitive-memory-mcp

## Overview

This is an MCP server that gives AI assistants structured, file-backed memory. An assistant invokes a tool through the server; entity operations, session notes, learning consolidation, identity updates, and reflections then read or write the configured memory directory. The server is the orchestration layer and memory.js provides the shared storage layer. The README documents the tool capabilities and memory layout; the excerpts show selected storage calls, but omit parts of the server’s dispatch and some tool implementations.

Main entry points: [`src/cognitive-server.js`](https://github.com/izzyfuller/cognitive-memory-mcp/blob/main/src/cognitive-server.js) (Cognitive server), [`memory.js`](https://github.com/izzyfuller/cognitive-memory-mcp/blob/main/memory.js) (Memory file store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["MCP interface"]
  node_server["Cognitive server"]
end

subgraph group_continuity["Memory continuity"]
  node_entity_ops["Entity operations"]
  node_session_notes["Session notes"]
  node_anchors["Context anchors"]
  node_archives["Session archives"]
  node_memory_store[("Memory file store<br/>[memory.js]")]
  node_memory_files["Memory documents"]
end

subgraph group_learning["Learning and reflection"]
  node_deep_learn["Deep Learn"]
  node_identity_learn["Identity learning"]
  node_reflection["Synthesis reflection"]
end

node_assistant(("AI assistant"))

node_assistant -->|"invokes tools"| node_server
node_server -->|"offers tools"| node_entity_ops
node_server -->|"offers tool"| node_session_notes
node_server -->|"offers tool"| node_deep_learn
node_server -->|"offers tool"| node_identity_learn
node_server -->|"offers tool"| node_reflection
node_entity_ops -->|"reads and writes"| node_memory_store
node_session_notes -->|"reads and writes"| node_memory_store
node_deep_learn -->|"reads and writes"| node_memory_store
node_deep_learn -->|"updates"| node_anchors
node_deep_learn -->|"archives session"| node_archives
node_identity_learn -->|"updates identity"| node_memory_store
node_reflection -->|"appends journal"| node_memory_store
node_memory_store -->|"reads and writes"| node_memory_files

click node_server "https://github.com/izzyfuller/cognitive-memory-mcp/blob/main/src/cognitive-server.js"
click node_entity_ops "https://github.com/izzyfuller/cognitive-memory-mcp/blob/main/src/cognitive-server.js"
click node_session_notes "https://github.com/izzyfuller/cognitive-memory-mcp/blob/main/src/cognitive-server.js"
click node_deep_learn "https://github.com/izzyfuller/cognitive-memory-mcp/blob/main/src/cognitive-server.js"
click node_identity_learn "https://github.com/izzyfuller/cognitive-memory-mcp/blob/main/src/cognitive-server.js"
click node_reflection "https://github.com/izzyfuller/cognitive-memory-mcp/blob/main/src/cognitive-server.js"
click node_memory_store "https://github.com/izzyfuller/cognitive-memory-mcp/blob/main/memory.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_server toneBlue
class node_entity_ops,node_session_notes,node_anchors,node_archives,node_memory_store,node_memory_files toneAmber
class node_deep_learn,node_identity_learn,node_reflection toneMint
class node_assistant toneIndigo
```

## Components

### MCP interface

- [Cognitive server](https://github.com/izzyfuller/cognitive-memory-mcp/blob/main/src/cognitive-server.js): `src/cognitive-server.js`

### Memory continuity

- [Entity operations](https://github.com/izzyfuller/cognitive-memory-mcp/blob/main/src/cognitive-server.js): `src/cognitive-server.js`
- [Session notes](https://github.com/izzyfuller/cognitive-memory-mcp/blob/main/src/cognitive-server.js): `src/cognitive-server.js`
- **Context anchors**
- **Session archives**
- [Memory file store](https://github.com/izzyfuller/cognitive-memory-mcp/blob/main/memory.js): `memory.js`
- **Memory documents**

### Learning and reflection

- [Deep Learn](https://github.com/izzyfuller/cognitive-memory-mcp/blob/main/src/cognitive-server.js): `src/cognitive-server.js`
- [Identity learning](https://github.com/izzyfuller/cognitive-memory-mcp/blob/main/src/cognitive-server.js): `src/cognitive-server.js`
- [Synthesis reflection](https://github.com/izzyfuller/cognitive-memory-mcp/blob/main/src/cognitive-server.js): `src/cognitive-server.js`

### Other components

- **AI assistant**

## Connections

- AI assistant → Cognitive server: invokes tools (evidence: `README.md`)
- Cognitive server → Entity operations: offers tools (evidence: `README.md`)
- Cognitive server → Session notes: offers tool (evidence: `README.md`)
- Cognitive server → Deep Learn: offers tool (evidence: `README.md`)
- Cognitive server → Identity learning: offers tool (evidence: `README.md`)
- Cognitive server → Synthesis reflection: offers tool (evidence: `README.md`)
- Entity operations → Memory file store: reads and writes (evidence: `src/cognitive-server.js`)
- Session notes → Memory file store: reads and writes (evidence: `src/cognitive-server.js`)
- Deep Learn → Memory file store: reads and writes (evidence: `src/cognitive-server.js`)
- Deep Learn → Context anchors: updates (evidence: `src/cognitive-server.js`)
- Deep Learn → Session archives: archives session (evidence: `src/cognitive-server.js`)
- Identity learning → Memory file store: updates identity (evidence: `src/cognitive-server.js`)
- Synthesis reflection → Memory file store: appends journal (evidence: `src/cognitive-server.js`)
- Memory file store → Memory documents: reads and writes (evidence: `memory.js`)
