Mengram MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add -e "MENGRAM_API_KEY=${MENGRAM_API_KEY}" mengram -- npx -y @alibaizhanov/mengram-mcp
Required:MENGRAM_API_KEY
README.md

Give your AI agents memory that actually learns

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: [...]}
File Upload (PDF, DOCX, TXT, MD)
# 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

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.

Configuration

claude_desktop_config.json
{ "mcpServers": { "mengram": { "command": "npx", "args": ["-y", "@alibaizhanov/mengram-mcp"] } } }

Try it

Search my memory for the deployment steps I used for the Railway project.
What were the specific issues I encountered during the last database migration?
Recall my preferred tech stack and coding style preferences.
Find the procedural workflow for handling build failures in my current project.

Frequently Asked Questions

What are the key features of Mengram?

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..

What can I use Mengram for?

Maintaining long-term context for AI coding agents across multiple sessions.. Tracking project-specific deployment workflows and troubleshooting history.. Storing and retrieving personal preferences and tech stack details for consistent AI assistance.. Analyzing past project failures to improve future procedural execution..

How do I install Mengram?

Install Mengram by running: pip install mengram-ai

What MCP clients work with Mengram?

Mengram works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Mengram docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare