Skip to main content
Glama
xhusnain

mcp-claude-memory

by xhusnain

mcp-claude-memory

Smart, self-maintaining, cross-machine memory for Claude Code — Postgres-backed, no rented LLM brain.

mem0 and Honcho are memory stores that pay a separate LLM (OpenAI) to do the thinking. mcp-claude-memory flips that: in Claude Code the LLM is already in the room, so Claude does the extraction, reasoning, and background reconciliation itself — for free. The backend is just Postgres.

npm install -g mcp-claude-memory
mcp-claude-memory init

What you get

  • Follows you across machines — every machine points at one shared Postgres, so office / home / laptop share a single brain. Postgres is the sync.

  • Works in every project — registered at user scope, so the memory tools are available everywhere, not per-repo.

  • Automatic or manual capture — choose auto (Claude saves and updates memories silently as you work, no commands) or manual (only when you ask). Manual remember/forget work in both modes.

  • Semantic recall — optional embeddings (OpenAI or local Ollama, no key required) give vector search blended with full-text via Reciprocal Rank Fusion. Without embeddings it falls back to Postgres full-text — it works with just a Postgres URL.

  • Self-healing (living memory) — every fact tracks source, confidence, and freshness. Confidence grows as facts are re-confirmed; the review tool surfaces stale memories; contradictions get superseded.

  • Background dreamingmcp-claude-memory dream archives duplicates and runs a headless Claude pass to reconcile stale/contradictory memories. Schedule it with cron.

  • Yours — plain rows in your own Postgres, no opaque vendor store, no required LLM API key.

Related MCP server: claude-crowed

Setup

npm install -g mcp-claude-memory
mcp-claude-memory init     # global setup, then restart Claude Code

The wizard asks for:

  • Postgres connection string (Supabase / Neon / Railway / self-hosted all work).

  • Namespace — your identity; the same namespace on another machine shares one brain.

  • Capture modeauto (recommended) or manual.

  • Embeddings providernone (full-text only), openai, or ollama.

It migrates the schema, registers the MCP server at user scope, and (in auto mode) installs a small instruction block into ~/.claude/CLAUDE.md.

Add another machine by running the same init with the same Postgres URL, namespace, and capture mode.

Note: Switching embedding provider or model does not re-embed existing memories — older memories remain searchable via full-text until they are saved again.

Memory tools (used by Claude)

Tool

Purpose

remember

Store a distilled fact (content, kind, tags, source, confidence).

recall

Hybrid full-text + vector search.

review

List stale memories to reconcile.

confirm

Mark a fact still true (refreshes freshness, raises confidence).

supersede

Replace an outdated fact with a corrected one.

forget

Archive a fact.

list

Browse / audit memories.

In auto mode Claude calls these proactively; you can also just say "remember this" / "forget that".

Dreaming (background maintenance)

mcp-claude-memory dream                # run a maintenance pass now
mcp-claude-memory dream --print-cron   # print a crontab line to schedule it

The pass archives exact-duplicate memories, then launches a headless Claude pass (claude -p) that reviews and reconciles stale/contradictory memories. The semantic pass needs the claude CLI logged in on the machine running the job; if it's unavailable the duplicate cleanup still runs and the semantic step is logged and skipped.

Requirements

  • Node ≥ 20.

  • A Postgres database. For semantic embeddings, Postgres with the pgvector extension (Supabase / Neon provide it; self-hosted needs CREATE EXTENSION vector, done automatically when you enable a provider).

License

MIT

A
license - permissive license
-
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/xhusnain/mcp-claude-memory'

If you have feedback or need assistance with the MCP directory API, please join our Discord server