M3 Memory logo

M3 Memory

Local-first MCP memory layer with typed memories, hybrid search, history, knowledge graphs, and shared storage across AI clients.

Install M3 Memory

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": {
    "m3-memory": {
      "command": "uvx",
      "args": [
        "m3-memory"
      ]
    }
  }
}

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

Claude Code command
claude mcp add --transport stdio m3-memory -- uvx m3-memory

Run in your terminal. Add --scope project to share it with your team through .mcp.json.

We couldn’t confirm it starts correctly

We hit an unexpected error while testing this listing automatically.

uvx m3-memory

Rate limit exceeded, please try again later - you have reached the maximum number of concurrent E2B sandboxes (20). If you need more, please visit 'https://e2b.dev/docs/billing'

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

M3 Memory MCP server gives AI assistants persistent, shared memory across sessions, tools, and machines. It stores typed memories, conversation history, entity relationships, and earlier versions in a local SQLite database by default, with PostgreSQL available as an option. MCP clients and the `m3` CLI can save, search, update, and supersede memories using hybrid keyword-and-meaning retrieval. Reach for it when assistants need project continuity, cross-agent handoffs, or an offline-first memory store.

Use cases

  • Persist project decisions across assistant sessions
  • Share context between Claude Code, Cursor, Codex, and Gemini CLI
  • Search past conversations using keywords or meaning
  • Track changing decisions with version history and supersession
  • Run an offline memory store on a local machine

Key features

  • Typed memories with source and confidence metadata
  • Hybrid keyword and semantic search
  • Entity knowledge graph with configurable ontology
  • Version history and contradiction detection
  • SQLite storage with optional PostgreSQL
  • GDPR export, erasure, and audited reads

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.

17/17 checks healthy over the last 88d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 16d ago via OSV.dev · m3-memory (PyPI)

Adoption & maintenance

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

GitHub stars32Stargazers on the source repository.
Last commit28d agoMost recent push to the default branch.
Install checkInconclusiveWe hit an unexpected error running the automated check.
Directory activity3 viewsConfig copies, upvotes, and views on AllMCPs.

How M3 Memory works

What M3 Memory does

M3 Memory provides a persistent knowledge layer for AI assistants rather than acting as a chatbot or language model. Assistants connect over MCP, while the same data can also be managed from the m3 command-line interface. The store is designed to preserve facts, decisions, preferences, project context, and conversation history between sessions.

Memories are typed instead of being treated only as unstructured text. Each memory can retain its source, confidence, change history, and relationships to entities such as people, places, and projects. When a decision changes, earlier versions remain available; newer information can supersede an older memory, and contradictory writes can be detected.

The Knowledge & Memory design supports multiple assistants using one shared store. This allows an agent such as Claude Code, Cursor, Codex, or Gemini CLI to continue work recorded by another agent.

How it works

MCP clients call M3 Memory tools to write and retrieve information. Search combines keyword matching with semantic meaning, so queries can find relevant memories without reproducing their original wording. Related entities form a knowledge graph that assistants can follow across multiple hops.

SQLite is the default storage backend and keeps data on the local computer. PostgreSQL can be used instead, and the project supports synchronizing memory across machines. A web dashboard and generated wiki provide additional ways to inspect the stored knowledge.

Optional background maintenance is provided by the cognitive loop. It can connect related facts, merge duplicates, and let stale notes fade. Observer and Reflector stages are also part of the stable feature set. A local model from Ollama or LM Studio can optionally help summarize and link memories; that model is not required for the core MCP server.

Setup and configuration

M3 Memory requires Python 3.12 or newer. Install the package with either pipx install m3-memory or pip install m3-memory inside a virtual environment. After installation, run:

bash
m3 setup
m3 doctor

m3 setup detects available AI agents and adds the M3 connection to them. It can also offer an installed local LLM for optional memory enrichment. m3 doctor checks the installation and configuration. The project supports macOS, Windows, and Linux.

Configuration is held in one m3_config.toml file. The m3 config show command displays settings and their sources. The default deployment needs no cloud account or API key for M3 itself, and it can operate offline.

Tools and capabilities

The MCP interface covers more than 100 tools, including capabilities for:

  • Saving, searching, updating, and superseding memories
  • Retrieving conversation history and project context
  • Hybrid keyword and semantic search
  • Reading version history and querying information as of a date
  • Navigating entity relationships in the knowledge graph
  • Sharing memory between agents, including handoffs and scoped collaboration
  • Supporting GDPR export and erasure workflows

When an assistant connects, M3 can expose a smaller initial tool set so the client receives fewer tool descriptions. Memory reads and search hits are audited with the reader, data owner, and timestamp; these records are retained for 90 days and included in GDPR export and erasure.

Limitations and notes

M3 Memory is a memory layer, not an AI model or conversational application. The assistants connected to it may have separate model, account, or API requirements. Local LLM enrichment is optional and requires Ollama or LM Studio to be installed before setup.

SQLite is the default backend, while PostgreSQL is an alternative. The project describes the core server, dashboard, cognitive loop, Observer, and Reflector stages as stable. Health and Prometheus metrics, along with HNSW approximate search on PostgreSQL, are planned rather than part of the stable feature set.

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 M3 Memory

M3 Memory is an MCP server that connects AI assistants to a local memory layer, using one shared store across sessions and clients. Its main tools save, search, update, and supersede typed memories, while also supporting conversation history, entity relationships, version history, and hybrid keyword-plus-meaning retrieval.

Install it with `pipx install m3-memory` or with `pip install m3-memory` inside a virtual environment, then run `m3 setup` and `m3 doctor`. Setup detects supported agents and connects them to M3. Python 3.12 or newer is required.

Yes, M3 Memory is described as working with Cursor through MCP. Cursor can share the same local memory store with other connected assistants, allowing project context, decisions, and conversation history to carry across tools.

Yes, M3 Memory can run offline with local storage. SQLite is used by default, and the server itself needs no cloud account or API key. Optional local-model enrichment can use Ollama or LM Studio.

Yes, GDPR export and erasure are supported. Memory reads and search hits are audited with reader, data owner, and timestamp information; those audit records are retained for 90 days and included in export and erasure workflows.

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 PreviewM3 Memory AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/m3-memory?style=directory)](https://allmcps.com/mcp/m3-memory)
HTML Embed
<a href="https://allmcps.com/mcp/m3-memory"><img src="https://allmcps.com/api/badge/m3-memory?style=directory" alt="M3 Memory on AllMCPs" /></a>