Open-source MCP server

Long-term memory for Claude, as a Markdown repo you own.

Memoria gives Claude Code and claude.ai one shared memory. Every memory is a plain file in a folder you control: searchable, synced between your machines with git, and readable without the tool.

Apache-2.0 · Node 20+ · embeddings run locally · no account, no telemetry · also works with Codex CLI, Gemini CLI and Cursor. Demo key: memoria-demo

30 seconds, with narration. A scripted illustration: the prompts and Claude's replies are written, and everything Memoria outputs in it is real, from the demo data.

Every session starts from zero. This one doesn't.

Claude calls Memoria's tools over MCP: it searches the store when a task begins and writes down what is worth keeping as you work.

1 · Recall

Claude searches what you decided

A question about last month's architecture choice is answered from your own notes, with the file it came from.

2 · Record

Decisions are written as you go

Durable facts become their own notes. Day-to-day events go to an append-only daily log. A check before each write returns the three most similar memories, so Claude updates a note where it would otherwise duplicate one.

3 · Read

The memory is a file

Open it, fix it, delete it, grep the folder. The SQLite search index beside it is derived: remove it and it rebuilds from the files.

claude · ~/code/atlas-api
> We're moving the job queue to Postgres, with
  SKIP LOCKED. Remember that.

● memoria · memory_write("decisions/job-queue-postgres.md")
  └ Written: decisions/job-queue-postgres.md
    (1 chunks indexed)

● Saved as a decision, linked to the
  Postgres-over-Mongo note.
~/.memoria/memories/decisions/job-queue-postgres.md
---
name: Job queue on Postgres
type: decision
importance: 6
tags: [architecture, database, queue]
related: [decisions/postgres-over-mongo.md]
---

## Decision: job queue on Postgres

Move the Atlas API job queue to Postgres, using
`SELECT ... FOR UPDATE SKIP LOCKED`.

Sync is git. There is no service.

Put the store in a private git repository. The plugin adds two Claude Code hooks: commit and push when Claude stops, pull when the next session starts. Both fail soft when you are offline.

Laptop · Claude stops
# the Stop hook ran memoria-sync-push.sh
$ tail -2 .sync.log
push: committed session changes
push: pushed to origin/main
Desktop · a new session
# the SessionStart hook ran memoria-sync-pull.sh
$ grep pull: .sync.log
pull: committed unflushed local changes before pulling
pull: merged 1 commit(s) from origin/main

> What do we use for the job queue?

● memoria · memory_search(…)
  └ 1. decisions/job-queue-postgres.md  0.528
    2. daily/2026-11-19.md              0.475

Two machines, same day, no conflict

Daily logs are append-only, so when two machines both write to today's file the answer is mechanical: keep both sides. Git ships a merge driver that does exactly that, and one line in the store's .gitattributes turns it on.

memories/daily/2026-11-19.md · after the merge
## 02:13 UTC — note
Fixed the sync cursor off-by-one in Atlas API.
Regression test added first.
## 02:15 UTC — note
Moved the Atlas API job queue to Postgres
(SKIP LOCKED). See decisions/job-queue-postgres.md.
.gitattributes
memories/daily/*.md merge=union

Curated notes keep git's normal three-way merge on purpose: if both machines edited the same decision, that is a real disagreement and you should see it. Log lines above are shortened by their timestamps.

One memory. Every Claude.

The same store serves Claude Code over stdio and claude.ai over HTTP. A decision recorded in a terminal can be found from a chat on your phone. It is a standard MCP server, so other assistants can share that store too.

  • Claude Code: installs as a plugin, or with claude mcp add.
  • claude.ai: a custom connector. The HTTP transport implements OAuth 2.1 with PKCE, dynamic client registration and metadata discovery.
  • Codex CLI and Gemini CLI: both were run against Memoria and connect, list all 17 tools and complete a tool call. One command each, under Install.
  • Other MCP clients: any client should work. Cursor has a tested setup; Kimi Code is documented but untested. Details are in the client guide.

The claude.ai side means running the HTTP server somewhere reachable, with your own TLS in front. A Docker Compose file and a Cloud Run template are in the repository.

Claude Codestdio · plugin
claude.aiHTTP · OAuth 2.1
Cursorstdio · npx
Codex CLIstdio or HTTP
Gemini CLIstdio or HTTP
↓
~/.memoria/memories/Markdown files · the source of truth
↓
SQLite + FTS5 indexderived · rebuildable

A dashboard on the same files.

Browse the store as a wiki with related links and backlinks, search it with the same ranking Claude uses, and add notes of your own in the journal.

The dashboard's wiki view: the Postgres over Mongo decision rendered from Markdown, with its details, related memories, and a backlink from the newer Job queue on Postgres decision
The wiki view. The older decision shows a backlink from the one recorded in the demo.
Overview tab: 31 memory files, 98 indexed chunks, average importance 5.5, no stale files, and the most recent journal entries
Overview
Memories tab: a search for 'what do we use for the job queue?' returns the job-queue decision first, with its score
Search
Journal tab: a text box for a new entry with mood buttons and tags, above the recent entries
Journal

All four views show generated demo data. Open the live demo (key: memoria-demo) to click through it yourself.

The whole story in 84 seconds.

One decision, followed from a laptop to a desktop and into the dashboard.

With narration; the same captions are on screen. A scripted illustration with real Memoria output, as above.

What it is not.

A tool that holds your memory should say where it is thin. The README keeps a full Known Limitations section; these are the ones to know first.

  • Not multi-user. It is single-tenant, for your own assistant. If you are building memory into a product, use something built for that.
  • Not a replacement for CLAUDE.md. Standing instructions belong there. Memoria is for the long tail that is searched when relevant and never loaded otherwise.
  • One key, one writer. The hosted setup has a single static key as its perimeter and runs one instance per store.
  • The collector is experimental. Optional ingestion of email, calendar and messages ships switched off. Consent can only be given in the dashboard. Read SECURITY.md first.
  • Solo project. Used daily by its maintainer since spring 2026; reviews are asynchronous.

Install

The store defaults to ~/.memoria and is created on the first write. Node 20 or newer.

Current release: 0.3.3, 30 November 2026, on npm and in the MCP Registry as io.github.Agripp87/memoria-mcp. Release notes.

Claude Code plugin

Registers the server and wires the sync hooks. The first start builds from source and takes about a minute.

in Claude Code
/plugin marketplace add Agripp87/memoria_mcp
/plugin install memoria@memoria

From npm

The server alone, without the hooks. Other MCP clients use the same command.

terminal
$ claude mcp add memoria -s user -- \
    npx -y @agrippa87/memoria-mcp

Codex CLI

Tested with Codex CLI 0.172. Codex asks before each tool call unless you pre-approve the server in its config.

terminal
$ codex mcp add memoria -- \
    npx -y @agrippa87/memoria-mcp

Gemini CLI

Tested with Gemini CLI 0.71. It only starts MCP servers in a folder you have marked as trusted.

terminal
$ gemini mcp add -s user memoria \
    npx -y @agrippa87/memoria-mcp

The git sync hooks ship in the Claude Code plugin only. Other clients share the same store, and sync it with a scheduled job or their own hooks. Codex and Gemini need Memoria 0.3.3 or later, which is what npx -y installs. Both were tested against a stand-in model endpoint, not against OpenAI's or Google's own models. See the client guide.

Then tell the assistant how to use it

Add a standing instruction to your CLAUDE.md, AGENTS.md or GEMINI.md, for example:

CLAUDE.md
At session start, memory_search for context relevant to the task. Record decisions, solved bugs and preferences with memory_daily during the session, memory_write for durable facts. Do not capture transactional work.

From 0.3.3 the server also sends a short note of its own on when to search and what to record, so this is optional.

For claude.ai, Docker, multi-device sync and every setting, see the Quick Start in the README.