collective-memory
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@collective-memory recall recent decisions and context"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Collective Memory
MCP server for persistent, semantic memory across AI sessions. Store context, decisions, and learnings — recall them later with natural language search.
Why
AI assistants forget everything between sessions. Collective Memory fixes that. Store what matters, search by meaning, build context that compounds.
Related MCP server: Selti
Features
Semantic search — Find memories by meaning, not keywords (OpenAI embeddings + LanceDB)
Automatic deduplication — Won't store near-duplicates (>95% similarity)
Project scoping — Organize memories by project
Type classification — Categorize as
decision,milestone,context,learning, orsession_summaryZero config storage — Embedded vector database, no server required
Installation
npm install -g collective-memoryOr clone and build:
git clone https://github.com/Hustada/collective-memory.git
cd collective-memory
npm install
npm run buildSetup
1. Get an OpenAI API key
Required for embeddings. Get one at platform.openai.com.
2. Add to Claude Code
Add to ~/.claude/settings.json under mcpServers:
{
"mcpServers": {
"collective-memory": {
"type": "stdio",
"command": "npx",
"args": ["collective-memory"],
"env": {
"OPENAI_API_KEY": "sk-..."
}
}
}
}Or if installed from source:
{
"mcpServers": {
"collective-memory": {
"type": "stdio",
"command": "node",
"args": ["/path/to/collective-memory/dist/index.js"],
"env": {
"OPENAI_API_KEY": "sk-..."
}
}
}
}3. Add usage instructions to CLAUDE.md
Add to your global ~/.claude/CLAUDE.md:
## Memory
Collective Memory is active. Two tools:
- `remember(content, project?, type?, tags?)` — Persist important context
- `recall(query, project?, type?, limit?)` — Search memory
**On session start**: Run `recall("recent decisions and context")` to load relevant memory.
When to remember: after decisions, milestones, completed work, learned patterns.
When to recall: session start, context switches, referencing past work.
Types: decision, milestone, context, learning, session_summary.Tools
remember
Store a memory with semantic embedding.
Parameter | Type | Required | Description |
| string | yes | The memory to store — be specific and self-contained |
| string | no | Project context (e.g., "myapp", "client-x") |
| string | no | One of: decision, milestone, context, learning, session_summary |
| string[] | no | Tags for categorization |
Returns the stored memory ID, or existing ID if deduplicated.
recall
Search memories by semantic similarity.
Parameter | Type | Required | Description |
| string | yes | Natural language search query |
| string | no | Filter to specific project |
| string | no | Filter to specific memory type |
| number | no | Max results (default: 10) |
Returns array of matching memories with similarity scores.
CLI
Also usable from command line:
# Store a memory
collective-memory remember --content "Decided to use PostgreSQL for the auth service"
# Search memories
collective-memory recall --query "database decisions" --limit 5
# Pipe content from stdin
echo "Long content here" | collective-memory remember --content-stdin --project myappConfiguration
Environment Variable | Default | Description |
| (required) | OpenAI API key for embeddings |
|
| Storage location |
How it works
Store: Content is embedded using OpenAI's
text-embedding-3-small(768 dimensions)Dedupe: Before storing, checks for >95% similar existing memories
Index: Stored in LanceDB, an embedded vector database
Search: Queries are embedded and matched via cosine similarity
Data
Memories are stored locally at ~/.collective-memory/data (or COLLECTIVE_MEMORY_PATH). It's a LanceDB database — portable, no server process.
To export memories:
npm run export # Outputs to viz/memories.jsonTo visualize:
npm run dash # Opens UMAP visualization at localhost:3333License
MIT
Credits
Built by The Victor Collective.
Available Tools
2 toolsrecallA
Search collective memory. Use at session start, when switching context, when referencing past work.
Inputs: query (required), type, limit, project.
rememberA
Persist important context to collective memory. Use after decisions, completed work, architectural choices, status changes. Be specific and self-contained.
Inputs: content (required), tags, type, project.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
Each tool has a clear, distinct purpose: one for storing context and one for retrieving it, with no functional overlap.
Both tool names are single verbs that follow a consistent pattern, making them predictable and easy to distinguish.
Two tools is minimal but appropriate for a focused read/write memory server; slightly thin but not excessive.
The server covers core create and read operations but lacks update or delete functionality, which could hinder management of stored memories.
Maintenance
Related MCP Connectors
Persistent personal memory for AI assistants — save, search, and recall across every MCP client.
Persistent memory for AI agents to retain, retrieve, and recall conversation context through MCP.
An MCP memory server. One memory your agents share — across models, devices and apps.
Private persistent memory for Claude, ChatGPT & Gemini via MCP - semantic search, zero-code setup.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenancePersistent semantic memory server for AI assistants via MCP, enabling long-term context retention and semantic search across conversations.12MIT
- FlicenseNot gradedqualityBmaintenanceA persistent memory server for AI agents using MCP protocol, enabling semantic storage and retrieval of dialogues, documents, and agent states.-
- FlicenseNot gradedqualityCmaintenancePersistent memory MCP server for AI agents that stores, recalls, and searches conversation history, key-value context, and long-term entries across sessions with semantic search and FIFO queues.89 npm1-
- FlicenseNot gradedqualityAmaintenanceAn MCP server providing semantic vector search, dual memory engines, and Git version control for AI clients, enabling persistent memory with recall, forget, and rollback capabilities.1-