Mengram logo

Mengram

by alibaizhanov

Adds semantic, episodic, and procedural memory to AI agents through MCP, with cloud and local storage modes.

Install Mengram

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "alibaizhanov-mengram": {
      "command": "uvx",
      "args": [
        "mengram-ai"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

alibaizhanov/mengram connects AI agents to a persistent memory system covering semantic facts, episodic events, and procedural workflows. Its MCP interface provides memory operations such as adding knowledge, searching, asking for synthesized answers with citations, and querying episodes or procedures; the project describes 29 MCP tools in total. Reach for it when an agent needs context across sessions, compaction, machines, or supported coding environments, with either a hosted account or a local Markdown-backed memory folder.

Use cases

  • Persist project facts across agent sessions
  • Recall deployment history and technical decisions
  • Resume coding tasks after compaction or machine changes
  • Store and refine repeatable development workflows

Key features

  • Semantic, episodic, and procedural memory
  • Fact search and cited question answering
  • Knowledge graph and smart triggers
  • Local Markdown-backed memory mode
  • Claude Code, Codex, and Cursor lifecycle hooks
  • Multilingual retrieval across 23 languages

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

36/36 checks healthy over the last 112d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 10d ago via OSV.dev · mengram-ai (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars207Stargazers on the source repository.
Last commit21d agoMost recent push to the default branch.
Directory activity4 viewsConfig copies, upvotes, and views on AllMCPs.

How Mengram works

What alibaizhanov/mengram MCP server does

alibaizhanov/mengram gives AI agents a memory layer organized around three types of knowledge: semantic facts, episodic events, and procedural workflows. The server can retain information from agent interactions, retrieve relevant facts, synthesize answers with citations, and surface workflows that change as their outcomes are recorded.

The project also supports a knowledge graph, smart triggers, and multi-user isolation. Its multilingual retrieval supports queries and answers across 23 languages. A fact can retain metadata about which tool created it and when, helping recall show the source context.

How it works

The hosted setup uses an API key associated with Mengram. Python and JavaScript interfaces are available, while MCP-compatible clients can connect through the configured server. Example SDK operations include adding messages, searching for facts, asking a question, and querying episodes or procedures.

A local mode stores memory in a directory as a memfmt tree of Markdown files. That folder can be inspected with Git, viewed in Obsidian, and checked with memfmt validate. Local memory can use Anthropic, OpenAI, or Ollama as its provider, and the local MCP server can be started against the selected memory directory.

For Claude Code, Codex, and Cursor, lifecycle hooks can provide session context, recall, compaction checkpoints, and automatic saving. Claude Code hooks also cover session starts, prompts, responses, Bash policy checks, and compaction. Cursor does not provide a per-prompt context hook, so mid-conversation recall there is requested through MCP tools instead.

Setup and configuration

For the hosted package, install the Python CLI with pip install mengram-ai, obtain an API key from Mengram, and configure the key in ~/.mengram/config.json. The JavaScript SDK is installed with npm install mengram-ai.

Claude Code can install the plugin from the Mengram marketplace, which includes hooks, the MCP server, and a skill. Existing Claude Code history can be imported with mengram import claude-code. Alternatively, mengram setup installs lifecycle hooks through the CLI; separate options install hooks for Codex or Cursor.

A local setup uses commands such as mengram local init ./memory --provider anthropic --api-key ..., followed by mengram server --memory ./memory. Claude Code history can be seeded into that directory with mengram import claude-code --memory ./memory.

Tools and capabilities

  • Add conversational content to memory.
  • Search stored facts and retrieve relevant knowledge.
  • Ask questions for synthesized answers with citations.
  • Query episodic events and procedural workflows.
  • Preserve session state through hooks and compaction checkpoints.
  • Share one memory across supported coding clients while filtering host-specific facts.

Limitations and notes

Hosted use requires an API key, while local mode keeps the memory in a user-owned folder and uses a model provider selected during initialization. The resume task card is stored under ~/.mengram/resume/; its task, completed-work, and remaining-work draft uses a model, while confirmed text is not redrafted. Cursor's hook model limits automatic mid-conversation recall, so MCP tools are used on request for that case.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Mengram

alibaizhanov/mengram is an MCP server that connects AI agents to Mengram's persistent memory system. Its main tools add and search facts, ask questions for synthesized answers with citations, and query episodic events or procedural workflows. It supports hosted API-key usage and a local Markdown-backed memory mode.

Install the Python package with `pip install mengram-ai`, configure a Mengram API key, and use `mengram setup` or the documented client configuration. Claude Code can install the marketplace plugin, while a local deployment can start with `mengram local init` and run using `mengram server --memory ./memory`.

Yes, alibaizhanov/mengram works with Cursor through its MCP server and optional lifecycle hooks. Run `mengram hook install --cursor` to install the Cursor hooks. Session context and compaction checkpoints are supported automatically, while mid-conversation recall is requested through MCP tools because Cursor has no per-prompt context hook.

Yes, use its local mode without a Mengram account. Initialize a memory directory with `mengram local init`, choose Anthropic, OpenAI, or Ollama as the provider, and run the MCP server against that folder. The memory remains in the local memfmt Markdown tree.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMengram AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/alibaizhanov-mengram?style=directory)](https://allmcps.com/mcp/alibaizhanov-mengram)
HTML Embed
<a href="https://allmcps.com/mcp/alibaizhanov-mengram"><img src="https://allmcps.com/api/badge/alibaizhanov-mengram?style=directory" alt="Mengram on AllMCPs" /></a>