
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
collective-memory
Advanced tools
MCP server for persistent, semantic memory across AI sessions. Store context, decisions, and learnings — recall them later with natural language search.
AI assistants forget everything between sessions. Collective Memory fixes that. Store what matters, search by meaning, build context that compounds.
decision, milestone, context, learning, or session_summarynpm install -g collective-memory
Or clone and build:
git clone https://github.com/Hustada/collective-memory.git
cd collective-memory
npm install
npm run build
Required for embeddings. Get one at platform.openai.com.
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-..."
}
}
}
}
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.
Store a memory with semantic embedding.
| Parameter | Type | Required | Description |
|---|---|---|---|
content | string | yes | The memory to store — be specific and self-contained |
project | string | no | Project context (e.g., "myapp", "client-x") |
type | string | no | One of: decision, milestone, context, learning, session_summary |
tags | string[] | no | Tags for categorization |
Returns the stored memory ID, or existing ID if deduplicated.
Search memories by semantic similarity.
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | yes | Natural language search query |
project | string | no | Filter to specific project |
type | string | no | Filter to specific memory type |
limit | number | no | Max results (default: 10) |
Returns array of matching memories with similarity scores.
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 myapp
| Environment Variable | Default | Description |
|---|---|---|
OPENAI_API_KEY | (required) | OpenAI API key for embeddings |
COLLECTIVE_MEMORY_PATH | ~/.collective-memory/data | Storage location |
text-embedding-3-small (768 dimensions)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.json
To visualize:
npm run dash # Opens UMAP visualization at localhost:3333
MIT
Built by The Victor Collective.
FAQs
MCP server for persistent, semantic memory across AI sessions
The npm package collective-memory receives a total of 23 weekly downloads. As such, collective-memory popularity was classified as not popular.
We found that collective-memory demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.