engram
MCP server for AI memory -- hybrid search (BM25 + semantic + knowledge graph), temporal decay, local-first
Install / Use
claude mcp add 199-biotechnologies -- npx -y github:199-biotechnologies/engramIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AI & Machine LearningSupported Platforms
Our assessment of engram
engram scores 75/100 on our quality scale, 839th of 957 AI & Machine Learning skills we index.
Its MCP Server is 9.6 KB long, well organised into 17 sections with 5 code examples: a thorough specification that gives an agent plenty to work with.
It has 10 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 6 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 95/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
engram compared with similar skills
All 4 of these similar skills score higher than engram; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| engram (this skill)by 199-biotechnologies | 75 | 10 | 6mo ago | MCP Server |
| claude-memby thedotmack | 100 | 96.6k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 91.8k | 20d ago | CLAUDE.md |
| Understand-Anythingby Egonex-AI | 100 | 85.4k | 3d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 74.5k | today | CLAUDE.md |
Frequently asked questions
- How do I install engram?
- Run
claude mcp add 199-biotechnologies -- npx -y github:199-biotechnologies/engram. The install tabs above show the steps for each supported agent. - Which AI agents does engram work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is engram safe to use?
- It is MIT-licensed and scores 95/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is engram still maintained?
- The repository was last updated about 6 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubWhy This Exists
You tell your AI something important. A name, an allergy, a deadline. Next conversation -- it's forgotten. You repeat yourself. You re-explain context. You carry the cognitive load that your AI should carry for you.
Engram gives your AI a real memory system. Tell it once:
"My colleague Sarah is allergic to shellfish and prefers window seats. She's leading the Q1 product launch."
Weeks later, ask:
"I'm booking a team lunch and flights for the offsite -- what should I know?"
Engram connects the dots. It remembers Sarah, the allergy, the seating preference, the workload. Your AI suggests restaurants without shellfish, books her a window seat, and flags that she's probably swamped with the launch.
This is not keyword matching. It is understanding.
An engram is a unit of cognitive information imprinted in a physical substance -- the biological basis of memory.
Install
npm install -g @199-bio/engram
Requires Node.js 18+.
Quick Start
With Claude Desktop (or any MCP desktop client)
Add to your MCP config (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"engram": {
"command": "npx",
"args": ["-y", "@199-bio/engram"],
"env": {
"ANTHROPIC_API_KEY": "sk-ant-..."
}
}
}
}
With Claude Code
claude mcp add engram -- npx -y @199-bio/engram
That's it. Your AI now remembers.
How It Works
Engram runs three search methods in parallel and fuses the results:
┌─────────────────┐
│ Your Query │
└────────┬────────┘
│
┌───────────────┼───────────────┐
│ │ │
▼ ▼ ▼
┌──────────┐ ┌──────────┐ ┌──────────────┐
│ BM25 │ │ Semantic │ │ Knowledge │
│ Keyword │ │Embedding │ │ Graph │
│ Search │ │ Search │ │ Lookup │
└────┬─────┘ └────┬─────┘ └──────┬───────┘
│ │ │
└──────────────┼─────────────────┘
│
┌─────────▼─────────┐
│ Reciprocal Rank │
│ Fusion │
└─────────┬─────────┘
│
┌─────────▼─────────┐
│ Temporal Decay │
│ + Salience Score │
└─────────┬─────────┘
│
┌─────────▼─────────┐
│ Ranked Results │
└───────────────────┘
BM25 finds exact keyword matches for names and phrases via SQLite FTS5.
Semantic search finds conceptually related content using MongoDB LEAF embeddings via Transformers.js (#1 on BEIR for small models, ~1ms/query, runs natively in Node.js).
Knowledge graph expands results through entity relationships -- ask about Sarah and her company, projects, and preferences all surface together.
Results are merged with Reciprocal Rank Fusion, then scored by temporal decay (Ebbinghaus forgetting curve) and salience. Fresh memories surface first. Important memories resist fading.
Features
Memory That Feels Real
Things fade. A memory from six months ago that you never revisited becomes harder to find. But important things -- a name, a birthday, a preference -- stay accessible even as time passes.
Recall strengthens. Every time a memory surfaces, it becomes more permanent. The things you think about often are the things your AI won't forget.
Everything connects. People link to places, places to events, events to details. The knowledge graph keeps your world coherent.
MCP Tools
Your AI gets these capabilities through the Model Context Protocol:
| Tool | What It Does |
|------|-------------|
| remember | Store new information with importance and emotional weight |
| recall | Find relevant memories ranked by relevance and recency |
| forget | Remove a specific memory |
| create_entity | Add a person, place, or concept to the knowledge graph |
| observe | Record a fact about an entity |
| relate | Connect two entities (e.g., "works at", "married to") |
| query_entity | Get everything known about someone or something |
| list_entities | See all tracked entities |
| stats | View memory statistics |
| consolidate | Compress old memories and detect contradictions |
| engram_web | Launch a visual memory browser |
Memory Consolidation
With an API key, Engram compresses old memories -- like sleep turning experiences into long-term storage:
- Groups related low-importance memories
- Creates AI-generated summaries (digests)
- Flags contradictory information
- Archives the originals
Storage stays lean, but nothing important gets lost.
Privacy
Your memories stay on your machine. Everything lives in ~/.engram/. The only external call is optional -- if you provide an API key, Engram can compress old memories into summaries. Core functionality works offline.
Performance
On M1 MacBook Air:
| Operation | Time | |-----------|------| | Remember | ~100ms | | Recall | ~50ms | | Graph queries | ~5ms | | Consolidate | ~2-5s per batch |
Storage: ~1KB per memory.
Configuration
Environment variables:
| Variable | Purpose | Default |
|----------|---------|---------|
| ENGRAM_DB_PATH | Where to store data | ~/.engram/ |
| ANTHROPIC_API_KEY | Enable memory consolidation | None (optional) |
| MAX_MEMORY_CACHE | In-memory cache size | 1000 |
| RETRIEVAL_TOP_K | Initial retrieval pool size | 50 |
| RERANK_TOP_K | Final results after reranking | 10 |
| ENGRAM_TRANSPORT | Transport mode (stdio or http) | stdio |
| PORT | HTTP port for remote deployment | 3000 |
Building from Source
git clone https://github.com/199-biotechnologies/engram.git
cd engram
npm install
npm run build
npm install -g .
Semantic search uses MongoDB LEAF (mdbr-leaf-ir) via Transformers.js — the #1 retrieval model on BEIR for models under 100M parameters. No Python or external dependencies required.
Roadmap
- [x] Hybrid search (BM25 + semantic embeddings)
- [x] Knowledge graph with entity relationships
- [x] Memory decay and strengthening (Ebbinghaus curve)
- [x] Consolidation with contradiction detection
- [x] Web interface for visual memory browsing
- [ ] Export and import
- [ ] Scheduled consolidation
Contributing
Contributions are welcome. See CONTRIBUTING.md for guidelines.
License
MIT -- Copyright (c) 2025 Boris Djordjevic, 199 Biotechnologies
<p align="center"> Built by <a href="https://github.com/longevityboris">Boris Djordjevic</a> at <a href="https://github.com/199-biotechnologies">199 Biotechnologies</a> | <a href="https://paperfoot.ai">Paperfoot AI</a> </p> <p align="center"> <a href="https://github.com/199-biotechnologies/engram/stargazers"> <img src="https://img.shields.io/github/stars/199-biotechnologies/engram?style=for-the-badge&logo=github&label=%E2%AD%90%20Star%20this%20repo&color=yellow" alt="GitHub Stars" /> </a> <a href="https://x.com/longevityboris"> <img src="https://img.shields.io/badge/Follow_%40longevityboris-000000?style=for-the-badge&logo=x&logoColor=white" alt="Follow on X" /> </a> </p>
Related Skills
claude-mem
96.6kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
91.8kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Understand-Anything
85.4kGraphs that teach > graphs that impress. Turn any code into an interactive knowledge graph you can explore, search, and ask questions about. Works with Claude Code, Codex, Cursor, Copilot, Gemini CLI, and more.
headroom
74.5kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
