Skip to main content
MCP server CX Codex

mengram — Claude Code MCP server: long-term memory for agents

Keeps facts, past sessions and learned workflows across agent runs, so a coding session survives /clear and auto-compaction.

Install into Claude Code · Platform CLI: remote server All methods and platforms ↓
claude mcp add --transport http mengram https://mengram.io/mcp
Open on GitHub

What mengram does

The server splits memory into three kinds: semantic facts about you and the repo, episodic records of earlier sessions, and procedures that get refined when a step failed. You can search them, ask a question and get a synthesized answer with citations, or list episodes and workflows. Queries work in Russian, Spanish or Chinese as well, because retrieval runs on multilingual embeddings with rerank.

In Claude the plugin wires hooks plus a skill. Session start loads your profile, each prompt triggers a recall search, and the reply is followed by a background save. A policy gate can stop a risky Bash command when it matches a procedure with a poor track record. Hook installers also exist for Codex and Cursor. Cursor has no per-prompt context hook, so recall mid-conversation goes through the MCP tools; session start and compaction stay automatic.

An API key from mengram.io is required. Store it once in ~/.mengram/config.json or hand it to the SDK constructor after pip install mengram-ai or npm install mengram-ai. Every fact carries the host and timestamp that wrote it, so a filesystem path learned on macOS stays out of a Linux session. No key, no memory: the server rejects the connection.

What it helps with

  • keep project context between agent sessions
  • restore working state after /clear and auto-compaction
  • pick up an unfinished task on a repo branch
  • pull a fact out of earlier conversations by query
  • share one memory across Codex and Cursor

Example prompts for the agent

  • Install Mengram following https://mengram.io/agent-install.txt, my email is [email protected]
  • Give me back the working context from the last session on this branch
  • Search my memory for how deploys are set up in this repo

How to install mengram

Platform CLI: remote server

claude mcp add --transport http mengram https://mengram.io/mcp

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about mengram

How to install mengram in Claude Code?

Run claude mcp add --transport http mengram https://mengram.io/mcp and put your key in ~/.mengram/config.json. For hooks and the skill use the plugin: claude plugin marketplace add alibaizhanov/mengram, then claude plugin install mengram@mengram.

What does mengram do?

It gives agents persistent memory of facts, episodes and procedures, fetched on demand and loaded when a session opens. Hooks write new knowledge in the background and rebuild context after compaction.

Can I try it without an API key?

mengram try runs entirely on your machine with no account and uploads nothing. Saving to the hosted memory needs a key.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor