Mengram MCP

Memory for AI agents with three types: facts, events and procedures that learn from failures; cloud by key or a local folder

  • 207 ★ on the repository
  • Last commit
  • Apache-2.0
MCP server

Extended access

Why this level

  • In cloud mode memories of your projects and decisions are stored on the mengram.io server
  • Hooks run on their own and write to memory after each reply, and a hook may ask for confirmation before a Bash command
All reasons and checks

alibaizhanov/mengram

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add mcp/mengram

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • In cloud mode memories of your projects and decisions are stored on the mengram.io server
  • Hooks run on their own and write to memory after each reply, and a hook may ask for confirmation before a Bash command

This is third-party code. Review the repository files before installing.

What it does

Mengram keeps three kinds of memory: semantic (facts and preferences), episodic (events and decisions) and procedural (workflows). Procedures change when they fail. For Claude Code there is a plugin with hooks and an MCP server: the profile loads at session start, including after `/clear` and auto-compaction, a search over past sessions runs before each prompt and after a reply new knowledge is saved in the background. The same hook set installs into Codex and Cursor so the three agents share memory. Cloud mode works with a free key from mengram.io and local mode keeps memory in a Markdown folder with no account: `mengram server --memory ./memory` starts an MCP server for Claude Desktop, Cursor and other clients. Retrieval works across 23 languages, Russian included.

Who it is for. People working in Claude Code, Codex and Cursor who want shared memory that survives context clearing, machine switches and task handoffs.

Good fit when

  • The agent starts from zero after `/clear` and the profile and project context should return on their own
  • A deploy procedure that keeps failing at one step should change and track successes and failures
  • Accumulated Claude Code session history has to be moved with `mengram import claude-code`
  • Memory is kept in a local Markdown folder so data stays on the machine and opens in Obsidian

Not a fit when

  • Cloud mode is out because of the data: memory goes to the mengram.io service and only the local folder remains
  • You only need project documentation search: a dedicated server is simpler
  • You do not want background hooks: they install themselves and write to memory after replies

Example request

Recall how we deployed the last release, which steps failed and suggest a procedure that accounts for those failures

MCP

Transport
stdio
Authentication
key is optional

Environment variables

MENGRAM_API_KEY secret
Free key from mengram.io for cloud mode, not needed in local mode

Limitations

Cloud mode needs a free key from mengram.io and memory sits on the service's server, with secrets stripped on your machine before history is uploaded. Local mode works with no account but processing needs a key from Anthropic, OpenAI or a local Ollama, and its search matches Unicode words with no embeddings and no query translation. The hooks for Claude Code, Codex and Cursor are installed with `mengram setup`, and Cursor has no per-prompt hook. The comparison table in the README is compiled by the author. The license is Apache-2.0 and the package is `mengram-ai`.

How to disable. Uninstall the plugin (`claude plugin uninstall mengram`) or the hooks with `mengram hook` per the project's guide and delete the key from `~/.mengram/config.json`. The local memory folder is deleted by hand.

FAQ

How do I install Mengram in Claude Code?

Save the key in `~/.mengram/config.json`, run `claude plugin marketplace add alibaizhanov/mengram`, then `claude plugin install mengram@mengram`. Or `pip install mengram-ai && mengram setup`.

What do the hooks do?

At session start they load the profile, before a prompt they search for context, after a reply they save knowledge, before compaction they write the working state down and restore it after.

Can I use it with no account?

Yes, local mode: `mengram local init ./memory`, then `mengram server --memory ./memory`. Memory lives in a Markdown folder.

Does it work with Russian?

Yes, cloud retrieval works across 23 languages and local search matches Unicode words, Russian included, without embeddings.

What is procedural memory?

Workflows with versions and success and failure counts per step. When a procedure fails it evolves.

Discussion

No questions or reviews yet.

Local memory about you and your projects: Claude Code, Codex and Cursor read the same preferences and lessons from your disk

MCP serverExtended access165Repository stars
Official

Local persistent memory for coding agents: hooks record every session, and Claude Code, Codex or Cursor recall past decisions through 54 MCP tools

MCP serverExtended access30.3KRepository stars

Agent memory as a graph of linked facts: decisions and errors outlive the session, with no vector database or paid API calls

MCP serverExtended access244Repository stars
Official

Membase keeps one shared memory for AI agents that Claude Code, Cursor and Codex read through MCP, an SDK or the membase command

MCP serverExtended access141Repository stars

Engram by Gentleman Programming

Engram (Gentleman Programming)

Persistent memory for AI coding agents in a single Go binary: an MCP server on SQLite with full-text search that remembers your project across sessions

MCP serverExtended access8KRepository stars

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
Mengram (this card)nokey is optional207
Mem0no68,887stores facts in a vector database, while Mengram also keeps events and procedures that change after failures
SupermemoryyesOAuth31,602works as a cloud service, while Mengram has a local Markdown folder mode with no account

README in short

The text opens with install commands and an SDK example, then a one-prompt install for any agent, the Claude Code plugin with hooks, shared memory with Codex and Cursor, local folder mode and a comparison table with other memory systems.

README badge

Report a problem