Add it to Claude Code
claude mcp add -e "MENGRAM_API_KEY=${MENGRAM_API_KEY}" mengram -- npx -y @alibaizhanov/mengram-mcpMENGRAM_API_KEYMake your agent remember this setup
mengram's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.
npx conare@latestFree · one command · indexes the sessions already on disk. Set up in the browser instead →
What it does
- Three types of memory: semantic (facts), episodic (events), and procedural (workflows).
- Procedures that evolve automatically based on past failures.
- Zero-config Claude Code integration for automatic save and recall.
- Multi-user isolation and knowledge graph support.
- File upload support for PDF, DOCX, TXT, and MD with vision AI extraction.
Tools 4
add_memoryAdds content to memory, automatically extracting facts, events, and workflows.search_memorySearches across semantic, episodic, and procedural memory types.get_episodesRetrieves episodic memory events based on a query.get_proceduresRetrieves procedural memory workflows.Environment Variables
MENGRAM_API_KEYrequiredAPI key for authenticating with the Mengram service.Try it
Original README from alibaizhanov/mengram
Give your AI agents memory that actually learns
Website · Get API Key · Docs · Console · Examples
pip install mengram-ai # or: npm install mengram-ai
from mengram import Mengram
m = Mengram(api_key="om-...") # Free key → mengram.io
m.add([{"role": "user", "content": "I use Python and deploy to Railway"}])
m.search("tech stack") # → facts
m.episodes(query="deployment") # → events
m.procedures(query="deploy") # → workflows that evolve from failures
Claude Code — Zero-Config Memory
Two commands. Claude Code remembers everything across sessions automatically.
pip install mengram-ai
mengram setup # Sign up + install hooks (interactive)
Or manually: export MENGRAM_API_KEY=om-... → mengram hook install
What happens:
Session Start → Loads your cognitive profile (who you are, preferences, tech stack)
Every Prompt → Searches past sessions for relevant context (auto-recall)
After Response → Saves new knowledge in background (auto-save)
No manual saves. No tool calls. Claude just knows what you worked on yesterday.
mengram hook status # check what's installed
mengram hook uninstall # remove all hooks
Why Mengram?
Every AI memory tool stores facts. Mengram stores 3 types of memory — and procedures evolve when they fail.
| Mengram | Mem0 | Zep | Letta | |
|---|---|---|---|---|
| Semantic memory (facts, preferences) | Yes | Yes | Yes | Yes |
| Episodic memory (events, decisions) | Yes | No | No | Partial |
| Procedural memory (workflows) | Yes | No | No | No |
| Procedures evolve from failures | Yes | No | No | No |
| Cognitive Profile | Yes | No | No | No |
| Multi-user isolation | Yes | Yes | Yes | No |
| Knowledge graph | Yes | Yes | Yes | Yes |
| Claude Code hooks (auto-save/recall) | Yes | No | No | No |
| LangChain + CrewAI + MCP | Yes | Partial | Partial | Partial |
| Import ChatGPT / Obsidian | Yes | No | No | No |
| Pricing | Free tier | $19-249/mo | Enterprise | Self-host |
Get Started in 30 Seconds
1. Install
pip install mengram-ai
2. Setup (creates account + installs Claude Code hooks)
mengram setup
Or get a key manually at mengram.io and export MENGRAM_API_KEY=om-...
3. Use
from mengram import Mengram
m = Mengram(api_key="om-...")
# Add a conversation — auto-extracts facts, events, and workflows
m.add([
{"role": "user", "content": "Deployed to Railway today. Build passed but forgot migrations — DB crashed. Fixed by adding a pre-deploy check."},
])
# Search across all 3 memory types at once
results = m.search_all("deployment issues")
# → {semantic: [...], episodic: [...], procedural: [...]}
<details>
<summary><b>File Upload (PDF, DOCX, TXT, MD)</b></summary>
# Upload a PDF — auto-extracts memories using vision AI
result = m.add_file("meeting-notes.pdf")
# → {"status": "accepted", "job_id": "job-...", "page_count": 12}
# Poll for completion
m.job_status(result["job_id"])
// Node.js — pass a file path
await m.addFile('./report.pdf');
// Browser — pass a File object from <input type="file">
await m.addFile(fileInput.files[0]);
# REST API
curl -X POST https://mengram