← Practical guides to AI coding memory

Comparisons

Local memory for Claude Code: claude-mem, Basic Memory, the MCP memory server and Cairn.ink Memory Local

Choose local Claude Code memory by capture, storage format, inspection, deletion, client support and sharing across four documented options.

By: Cairn

Updated:

Published:

Choose claude-mem for automatic coding-session observations, Basic Memory for an editable Markdown knowledge base, the MCP reference memory server for explicit graph facts, or Cairn.ink Memory Local for private Memories with Source Receipts and a Claude Code/Codex installer. Compare capture, storage, inspection and processing separately before choosing your local workflow.

What does local mean in this comparison?

Here, local describes a durable store you operate on your computer. The four options use different formats and workflows. Start with what you want to keep: a record of coding activity, maintained notes, a graph of facts or private preferences with submitted source text.

The competitor sources are their own claude-mem README, Basic Memory README and reference server README, accessed 2026-11-12. Cairn.ink Memory follows its released installer guide and release README.

How do the same dimensions compare?

Dimensionclaude-memBasic MemoryReference memory serverCairn.ink Memory Local
Stored materialSessions, observations and summariesMarkdown notes, observations and relationshipsEntities, observations and relationsPrivate Memories and Source Receipts
Where it runsLocal worker and SQLite; optional syncLocal files and index; optional CloudLocal process and JSONL fileLocal stdio server and SQLite
Claude CodePlugin or full installerMCP server; optional plugin above itstdio MCP registrationShared installer registers Local MCP
Codex / CursorREADME lists installer support for bothREADME supplies both client configurationsAdapt the documented stdio executable to client MCP settingsInstaller covers Codex; website documents hosted Cursor separately
CaptureAutomatic activity observation; deliberate notes also supportedExplicit note tools; optional plugin capture output styleExplicit graph toolsExplicit memory tools
Inspection / deletionViewer and search tools; viewer delete controlEditable files; bm_read, bm_edit, bm_deleteRead/search nodes; delete graph elementsinspect_memory, revision-guarded correct/forget
Team / sharingOptional TeamBrain workspaceFile workflows and optional Cloud TeamsSelf-managed shared fileSame local database and owner for supported clients; private Memory
License / cost modelApache-2.0; provider and optional service costsAGPL-3.0; free local, paid CloudREADME MIT; root license transition detailed belowApache-2.0 toolkit; free Local, optional model charges

Each product's official README supports its storage, connection and capture entries. claude-mem's deletion entry also follows its observation card and delete control source, accessed 2026-11-12.

When should I choose claude-mem?

Choose claude-mem when automatically retaining coding activity is the main need. Its README describes hooks feeding a local worker, an observer producing observations and summaries, and a new session receiving a compact index. Search then retrieves detail through search, timeline and get_observations.

The database is ~/.claude-mem/claude-mem.db. A viewer lets you browse memory and sessions. The current repository includes a confirmation-based delete control on observation cards. The README also documents deliberate notes, optional Cloud Sync and the optional TeamBrain shared workspace, where people choose what to share.

Use the full installer or the documented Claude Code marketplace route:

/plugin marketplace add thedotmack/claude-mem
/plugin install claude-mem

Restart Claude Code. The README lists Codex and Cursor among supported agents; startup context defaults to the current harness, with an option to include other sources. Its provider choices include a hosted observer and your own supported model account or key. This is a stronger fit when you want a session-observation workflow and a viewer rather than manually selecting every fact.

When should I choose Basic Memory?

Choose Basic Memory when Markdown ownership is central. Its README documents a knowledge base that humans and assistants can both read and edit, with observations and wikilinks forming relationships. You can work with the same files in an editor or Obsidian and use MCP to search and traverse context.

The local installation uses files plus a SQLite index. Connect Claude Code using its documented command:

claude mcp add basic-memory -- uvx --prerelease=allow basic-memory mcp

The current README requires the prerelease flag for its dependency chain. It also supplies Codex TOML and Cursor JSON configuration. Its bm_read, bm_edit and bm_delete tools support inspection and maintenance alongside ordinary file editing.

A separate Claude Code plugin adds session-start briefings, pre-compaction checkpoints and an opt-in capture output style. Connect MCP first, then follow that plugin's installation instructions. The README describes local use as free under AGPL-3.0, and optional paid Cloud and Cloud Teams. Choose this when maintained notes, familiar files and an explicitly shared knowledge workspace matter most.

When should I choose the MCP reference memory server?

Choose the reference memory server for a direct, explicit graph model. Create a named entity, attach observations and connect it to another entity with a relationship. Read the graph or particular nodes, then delete individual observations, relations or entities through its tools.

Its documented package is @modelcontextprotocol/server-memory; the current README requires Node 24 or later for npx/source execution. Combining that executable with Claude Code's stdio registration syntax, accessed 2026-11-12, gives:

claude mcp add --env MEMORY_FILE_PATH=/absolute/path/memory.jsonl --transport stdio --scope user memory -- npx -y @modelcontextprotocol/server-memory

Replace the absolute placeholder with a path in an existing directory you own. Keep the durable file outside the package cache. The README documents serialized writes when several local clients use the same file. For Codex or Cursor, configure the same executable and environment through that client's MCP settings.

This option suits people who want to understand and manage a small graph directly. Its atomic observations are easy to inspect when a fact changes. Keep your graph structure and backup process simple enough to maintain.

When should I choose Cairn.ink Memory Local?

Choose Cairn.ink Memory Local when you want explicit private memory operations, submitted sources and the same installer for Claude Code and Codex. Start with:

npx @cairn-ink/memory setup

Choose Local for free, no-account tools on one computer. Setup needs Node 22.16 or later and the selected CLIs on your path. Both clients use one database and owner, registered as cairn-local. Reopen the tools afterward. The default database is ~/.cairn-memory/data/memory.sqlite.

Use remember_memory deliberately, then inspect_memory to read the saved record and Source Receipt. Use the inspected revision for correct_memory or forget_memory. The local walkthrough explains this sequence; saving and inspection work without a model key.

The same installer offers Cloud with one browser sign-in for a first paired Claude Code/Codex setup, automatic capture and prompt recall. Cursor uses the website's separate hosted MCP steps. Keep the selected mode consistent across the installer-managed clients. Private Memory and shared Knowledge Cards have separate lifecycles, with human authorization for publication.

What should I check before adopting a local option?

Local storage can still involve external model processing: check claude-mem's observer, Basic Memory's selected search providers and Cairn.ink Memory's configured semantic recall. Cairn.ink Memory Local is a developer preview whose installer is tested on Linux/WSL, with macOS untested and native Windows requiring WSL. Team roles and permission controls are not documented in the reference memory server README. That README says MIT while the root LICENSE describes an MIT-to-Apache-2.0 transition, so check the terms applying to the files you use.

License and service models above reflect the official sources accessed 2026-11-12. Test one harmless save, restart, source inspection and retirement before moving real work. Back up the chosen store using its documented consistency procedure, and verify a restore separately.

For Cairn.ink Memory, follow the connection guide.

Frequently asked questions

Which option automatically captures coding activity?
claude-mem documents a lifecycle integration that turns activity into observations and summaries. Basic Memory’s optional Claude Code plugin adds session briefings, checkpoints and an opt-in capture output style over its MCP server.
Which option keeps ordinary Markdown files?
Basic Memory stores knowledge as editable Markdown with an index and relationships. Its README documents local use and an optional managed Cloud offering.
How does Cairn.ink Memory Local save context?
The installer registers explicit MCP tools backed by a shared local SQLite database. Save deliberately, then inspect the Memory and Source Receipt; correction and forgetting use the inspected revision.
What does the reference memory server store?
It stores named entities, their observations and relationships in a JSONL graph file. Its tools create, read, search and delete graph elements.

Sources