Get the FREE Ultimate OpenClaw Setup Guide →

mengram

Human-like memory for AI agents — semantic, episodic & procedural. Experience-driven procedures that learn from failures. Free API, Python & JS SDKs, LangChain & CrewAI integrations.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio alibaizhanov-mengram mengram server --cloud \
  --env MENGRAM_API_KEY="om-..."

How to use

Mengram exposes a Claude Code–style memory system that stores semantic facts, episodic events, and procedural workflows, with auto-evolving capabilities when failures occur. The MCP server allows you to run Mengram in a cloud-enabled or client context (via the provided cloud flag) and access 29 tools for memory management through its integrations. Users can add conversations, search across memories, and trigger automated procedure evolution as failures are detected. The server also supports importing external data sources (Obsidian, ChatGPT exports, files), retrieving a cognitive profile for prompt personalization, and integrating with LangChain or other retrievers for advanced querying. In practice, you would start Mengram through the MCP server entry, provide your API key in the environment, and then invoke the server’s endpoints or local commands to manage memories, search results, and procedure updates across semantic, episodic, and procedural memory layers.

How to install

Prerequisites:

  • Python 3.8+ or Node.js (depending on installation method)
  • Access to the internet to fetch packages
  • Optional: API key from Mengram (for cloud memory features)

Install and run (Python):

  1. Create a virtual environment (optional but recommended) python -m venv venv && source venv/bin/activate
  2. Install Mengram AI package pip install mengram-ai
  3. Run the MCP server configuration (example) or use the CLI to start the server mengram server --cloud

Install and run (Node):

  1. Install Mengram AI package npm install mengram-ai
  2. Start the MCP server (if your setup uses the CLI variant) npx mengram server --cloud

Environment setup (example):

  • export MENGRAM_API_KEY=your-api-key
  • Ensure network access to Mengram services if using cloud memory

Configuration (example):

  • Create a config file or pass environment variables as shown in the mcp_config example
  • Use the provided mcpServers.mengram block to point the MCP runner to the Mengram CLI with appropriate env vars

Additional notes

Tips and common issues:

  • Make sure the API key is valid and has the required permissions for memory operations.
  • When running with --cloud, ensure network egress is allowed to Mengram services.
  • If you encounter memory retrieval latency, consider adjusting the procedural memory defaults or increasing the cadence of automatic saves after prompts.
  • The MCP config shown uses the key MENGRAM_API_KEY; replace with your actual key or leverage your environment management to inject it securely.
  • For local development without cloud memory, you can run Mengram without the --cloud flag and rely on local storage for memories.
  • If you upgrade Mengram, verify compatibility of memory types and the API endpoints used by MCP integrations.

Related MCP Servers

Sponsor this space

Reach thousands of developers