Skip to main content

mnemory banner

mnemory

Give your AI agents persistent memory. mnemory is a self-hosted MCP server that adds personalization and long-term memory to any AI assistant — Claude Code, ChatGPT, Open WebUI, Cursor, or any MCP-compatible client.

Plug and play. Connect mnemory and your agent immediately starts remembering user preferences, facts, decisions, and context across conversations. No system prompt changes needed.

Self-hosted and secure. Your data stays on your infrastructure. No cloud dependencies, no third-party access to your memories.

Intelligent. Uses a unified LLM pipeline for fact extraction, deduplication, and contradiction resolution in a single call. Memories are semantically searchable, automatically categorized, and expire naturally when no longer relevant.

Features

  • Zero configuvx mnemory, connect your MCP client, done. Works out of the box with any OpenAI-compatible API.
  • Intelligent extraction — A single LLM call extracts facts, classifies metadata, and deduplicates against existing memories.
  • Contradiction resolution — "I drive a Skoda" + later "I bought a Tesla" = automatic update, not a duplicate.
  • Two-tier memory — Fast searchable summaries in a vector store + detailed artifact storage (reports, code, research) retrieved on demand.
  • AI-powered search — Multi-query semantic search with temporal awareness. Ask "What did I decide last week about the database?" and it finds the right memories.
  • Memory health checks — Built-in three-phase consistency checker (fsck) detects duplicates, contradictions, quality issues, and prompt injection. Run manually or on a schedule with auto-fix.
  • 10+ client support — Claude Code, ChatGPT, Open WebUI, OpenClaw, Cursor, Windsurf, Cline, OpenCode, and more. Native plugins available for automatic recall/remember.
  • Built-in management UI — Dashboard, semantic search, memory browser with full CRUD, relationship graph visualization, and health check interface. No extra tools needed.
  • Production ready — Qdrant for vectors, S3/MinIO for artifacts, API key or Cognis JWT authentication, per-user isolation, Kubernetes-friendly stateless HTTP.
  • Secure by default — API key or Cognis JWT authentication with session-level identity binding, per-user memory isolation, anti-injection safeguards in extraction prompts.
  • REST API + MCP — Dual interface with the same backend. 16 MCP tools + full REST API with OpenAPI spec. Build plugins, integrations, or use directly.
  • Prometheus monitoring — Built-in /metrics endpoint with operation counters and memory gauges. Pre-built Grafana dashboard included.

Quick Start

mnemory needs an OpenAI-compatible API key for LLM and embeddings. It picks up OPENAI_API_KEY from your environment automatically.

uvx mnemory

That's it. mnemory starts on http://localhost:8050/mcp, stores data in ~/.mnemory/.

Now connect your client — for Claude Code, add to your MCP config:

{
  "mcpServers": {
    "mnemory": {
      "type": "streamable-http",
      "url": "http://localhost:8050/mcp",
      "headers": {
        "X-Agent-Id": "claude-code"
      }
    }
  }
}

Start a new conversation. Memory works automatically.

Also available via Docker, pip, or production setup with Qdrant + S3. See the full quick start guide for more clients and options.

Screenshots

Dashboard — memory totals, breakdowns, and operation counts
Dashboard with memory breakdowns by type, category, and role

Search — semantic and AI-powered search with filters
Semantic search and AI-powered find with filters

Graph — D3.js force-directed memory relationship visualization
Memory relationship graph visualization

See all screenshots and UI features including memory browser, health checks, and artifact management.

Supported Clients

mnemory works with any MCP-compatible client. Some clients also have dedicated plugins for automatic recall/remember.

Client MCP Plugin Setup Guide
Claude Code Yes Yes (hooks) Guide
ChatGPT Yes (MCP connector) -- Guide
Claude Desktop Yes -- Guide
Hermes Agent Yes Yes (plugin) Guide
Open WebUI Yes Yes (filter) Guide
OpenCode Yes Yes (plugin) Guide
OpenClaw Yes Yes (plugin) Guide
Cursor Yes -- Guide
Windsurf Yes -- Guide
Cline Yes -- Guide
Continue.dev Yes -- Guide
Codex CLI Yes -- Guide

MCP = works via Model Context Protocol (LLM-driven tool calls). Plugin = dedicated integration with automatic recall/remember (no LLM tool-calling needed).

How It Works

Storing: You share information naturally. mnemory extracts individual facts, classifies them (type, category, importance), checks for duplicates and contradictions against existing memories, and stores them as searchable vectors — all in a single LLM call.

Searching: Ask a question and mnemory generates multiple search queries covering different angles and associations, runs them in parallel, and reranks results by relevance. Temporal-aware — "what did I decide last week?" just works.

Recalling: At conversation start, your agent loads pinned memories (core facts, preferences, identity) plus recent context. During conversation, relevant memories are found automatically based on what you're discussing.

Maintaining: Memories have configurable TTL — context expires in 7 days, episodic memories in 90. Frequently accessed memories stay alive (reinforcement). The built-in health checker detects and fixes duplicates, contradictions, and quality issues.

Learn more in the architecture docs.

Benchmark

Evaluated on the LoCoMo benchmark — 10 multi-session dialogues with 1540 QA questions across 4 categories:

System single_hop multi_hop temporal open_domain Overall
mnemory 63.1 53.1 74.8 78.2 73.2
mnemory (gpt-oss-120b) 66.3 59.4 68.5 73.8 70.5
Memobase 70.9 52.1 85.0 77.2 75.8
Mem0-Graph 65.7 47.2 58.1 75.7 68.4
Mem0 67.1 51.2 55.5 72.9 66.9
Zep 61.7 41.4 49.3 76.6 66.0
LangMem 62.2 47.9 23.4 71.1 58.1

Configuration: gpt-5-mini for extraction, text-embedding-3-small for vectors. gpt-oss-120b via Groq is a budget alternative at ~5x lower cost with comparable quality. See configuration docs for model options and benchmarks/ for reproduction.

Documentation

Document Description
Quick Start Get running in 5 minutes with any client
Configuration All environment variables — LLM, storage, server, memory behavior
Memory Model Types, categories, importance, TTL, roles, scoping, sub-agents
MCP Tools 16 MCP tools — memory CRUD, search, artifacts
REST API Full REST API, fsck pipeline, recall/remember endpoints
Architecture System diagram, detailed flows for storing/searching/recalling
Management UI Screenshots, features, access, UI development
Monitoring Prometheus metrics, Grafana dashboard
Deployment Production setup, Docker, authentication, Kubernetes
Development Building, testing, linting, contributing
Client Guides Per-client setup instructions (10 clients)
System Prompts Templates for personality agents and custom setups

License

Apache 2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mnemory-1.12.2.tar.gz (2.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mnemory-1.12.2-py3-none-any.whl (509.3 kB view details)

Uploaded Python 3

File details

Details for the file mnemory-1.12.2.tar.gz.

File metadata

  • Download URL: mnemory-1.12.2.tar.gz
  • Upload date:
  • Size: 2.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mnemory-1.12.2.tar.gz
Algorithm Hash digest
SHA256 a136e8f943447f7bbaad1f4717cb5b41e5c07ff5801e6962a7d0dca7d16de0a9
MD5 f2cea9b935b81dec8517bd6c3ad3a6a8
BLAKE2b-256 e6a66b140d65ff98e832dc769c1e40089f62819c3d890e20952de60dcd9c2948

See more details on using hashes here.

Provenance

The following attestation bundles were made for mnemory-1.12.2.tar.gz:

Publisher: python-publish.yml on fpytloun/mnemory

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mnemory-1.12.2-py3-none-any.whl.

File metadata

  • Download URL: mnemory-1.12.2-py3-none-any.whl
  • Upload date:
  • Size: 509.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for mnemory-1.12.2-py3-none-any.whl
Algorithm Hash digest
SHA256 46ede89f378829a12cb00cc43300255c49787c31bcc8d47c5e901f40c485f555
MD5 299aecc54a410d902ccb2abeb50e90f5
BLAKE2b-256 c82085c16d8b18d894f0679dfb7871d58cec390ef8f18626276b3fb3a4f6cbce

See more details on using hashes here.

Provenance

The following attestation bundles were made for mnemory-1.12.2-py3-none-any.whl:

Publisher: python-publish.yml on fpytloun/mnemory

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.12.2 This release

2 files

1.12.1

2 files

1.12.0

2 files

1.11.1

2 files

1.11.0

2 files

1.10.0

2 files

1.9.1

2 files

1.9.0

2 files

1.8.3

2 files

1.8.2

2 files

1.8.1

2 files

1.8.0

2 files

1.7.1

2 files

1.7.0

2 files

1.6.1

2 files

1.6.0

2 files

1.5.0

2 files

1.4.0

2 files

1.3.0

2 files

1.2.0

2 files

1.1.0

2 files

1.0.0

2 files

0.2.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page