open-mem
Links an Obsidian vault to index notes as searchable memories, watches for changes, supports excluding private folders, and can write session handoff notes back into the vault with per-project index notes.
Uses Ollama-hosted models as the observer for generating memories, handoffs, and project purposes, and optionally uses Ollama embeddings for semantic search.
Supports OpenAI-compatible API endpoints as an alternative observer model provider, configurable with an API URL and key.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
β¨ Why open-mem
Every Claude Code session starts from a blank page. You explain the project again, re-discover the same gotchas and lose last week's decisions. open-mem gives Claude a long-term memory that runs entirely on your computer:
π§ It remembers on its own. While you work, it captures what Claude does and compresses it into short, searchable memories, with no extra steps from you.
π It hands off. When a session ends, it writes a summary (what was asked, done, learned, and what's next), and the next session starts with it.
π°οΈ It knows your history. Every past Claude Code and Claude Desktop conversation, every project and every scheduled task become memory, even after Claude deletes its own transcripts.
ποΈ It lives in your second brain. Link your Obsidian vault: open-mem indexes every note for Claude, and writes session notes back into the vault.
π It stays yours. Everything is stored locally. The only thing that ever leaves your machine is what goes to the model you choose, and with Ollama that's nothing at all.
open-mem is inspired by the excellent open-source claude-mem. It is an independent, much smaller reimplementation (zero npm dependencies) built to run on free, local models. It is not affiliated with claude-mem or Anthropic.
Related MCP server: mcp-memvid
π Features
π§ Automatic memory
Claude Code hooks record prompts, edits, commands and findings. An observer model turns them into typed memories: bugfix, feature, decision, discovery, refactor, change, security_note. Each has a title, facts, a narrative and the files involved.
π Session handoffs
After each session, a short handoff (request Β· completed Β· learned Β· next steps) is written and injected automatically when you next start Claude in that project.
π Hybrid search
SQLite FTS5 keyword ranking fused with semantic embedding similarity (reciprocal rank fusion). It finds "the cookie thing" even when you've forgotten the exact words.
πͺ Token-cheap recall
Claude searches with a 3-step progressive disclosure flow (search β timeline β get_observations), fetching full details only for the memories that matter. That's about 10Γ fewer tokens than dumping everything.
π°οΈ All your Claude history
Every Claude Code CLI and Claude Desktop conversation is archived from Claude's own transcripts, and kept even after Claude cleans them up (about 30 days). claude.ai chats import from the official export. Background runs are filtered out automatically.
π Projects and scheduled tasks
A living registry of every project Claude has worked in and every scheduled task in Claude Desktop and Cowork. Each gets a purpose and intention written by your observer model, and the project's purpose is injected when you work there.
ποΈ Obsidian, both ways
Link your vault and every note is indexed as memory. It's kept current by a live watcher, duplicate copies are stored once, and private folders can be excluded. Session handoffs can be written back as linked notes with a per-project index.
π‘οΈ Private by design
Secrets (API keys, tokens, passwords, JWTs, private keys, URL credentials) are redacted before anything is stored or sent. <private>β¦</private> keeps text out entirely. No telemetry, no account.
π Free models, your choice
Ollama (free, offline), your Claude plan (claude -p), or any OpenAI-compatible API (OpenRouter, Gemini, Groq, LM Studioβ¦). Switch with one click.
β‘ Never slows Claude down
Hooks only write to SQLite (milliseconds). Model calls run in a detached background process, and syncing your history checks only what changed (under a second).
π₯οΈ A web GUI you'll actually use
Memory: search, filter by project, type and time, then open any memory for its timeline | Claude history: every past conversation, searchable, across all surfaces |
Projects: everything you've built, with purpose and intention | Scheduled tasks: schedule, status and purpose, including deleted ones |
Light and dark themes, keyboard shortcuts (/ to search, Esc to close), WCAG AA contrast, and a layout that works down to phone width.
π¦ Install
You need: Claude Code (CLI or the Claude Desktop Code tab) and Node.js 22.13 or newer.
1. Add the plugin. Inside Claude Code:
/plugin marketplace add kamalivaturi/open-mem
/plugin install open-mem@open-memOr from a terminal:
claude plugin marketplace add kamalivaturi/open-memclaude plugin install open-mem@open-mem2. Restart Claude Code. That's the whole install: hooks and the MCP server are registered by the plugin.
3. Open the dashboard (optional, but it's the easiest way to finish setup):
npx -y github:kamalivaturi/open-mem viewerThen visit http://127.0.0.1:37778.
π Setup
Setup takes about two minutes, all from the dashboard.
1. Choose the observer model
The observer writes memories, handoffs and project purposes. Pick it in Dashboard β Observer model, then press Quick check (milliseconds) or Full test (a real reply).
Option | Cost | Best for | Setup |
π¦ Ollama (default) | Free, offline | Privacy, no limits | Install Ollama, then |
β³οΈ Claude plan | Uses your plan's usage | Best quality, zero setup | Pick Claude plan Β· model |
π OpenAI-compatible | Free tiers available | No local GPU | Pick it, set the API URL + key in Settings |
For semantic search (recommended), also run ollama pull nomic-embed-text. Without it, search is keyword-only.
2. Link your Obsidian vault (optional)
Dashboard β Obsidian vault: paste your vault folder β Link vault.
Every note is indexed right away, and changes are picked up at each session start and live while the dashboard is open.
Never index these folders keeps private folders (for example
journal, private) out of memory.Tick Also save each session's handoff note to get one note per session in
claude/open-mem/, linked from a per-project index note. It works with graph view, Dataview and Bases.
3. Your Claude history (automatic)
Nothing to do: at the next session start, open-mem records your past Claude Code and Claude Desktop conversations, your projects and your scheduled tasks. To bring in claude.ai chats, export your data from claude.ai (Settings β Privacy β Export data), unzip it, and run:
npx -y github:kamalivaturi/open-mem import-chat path/to/conversations.jsonEach source can be switched off in Settings (recordClaudeHistory, recordScheduledTasks, recordProjects).
π¬ Using open-mem
In Claude
It's automatic. Start Claude in a project and the first message already carries:
# open-mem: memory from earlier sessions in "shop-api"
## About this project
Purpose: a small e-commerce API (Node + Postgres) serving the storefrontβ¦
## Session 2026-11-02 14:03
Request: Fix the login loop and harden checkout
Completed: Cookie fix shipped; checkout uses advisory locks
Next steps: Add an e2e test for concurrent checkout
## Recent observations (newest first)
#42 2026-11-02 14:03 β bugfix: Fixed login redirect loop
β¦Claude can also dig deeper with these MCP tools. Just ask in plain words ("what did we decide about checkout locking?").
Tool | What it does |
| Find memories (keyword + semantic), filtered by project, type or recency |
| What happened around a memory: neighbouring memories, prompts and handoffs |
| Full details for chosen memories |
| Explicitly remember a decision or preference ("remember that I prefer pnpm") |
| Search or open any past Claude conversation (CLI, Desktop, claude.ai) |
| Every project with purpose and intention, or one in detail |
| Every scheduled task with schedule, purpose and prompt |
| Search your linked Obsidian vault |
In the browser
npx -y github:kamalivaturi/open-mem viewer gives you the dashboard, Memory, Sessions (handoffs), Claude history, Projects, Scheduled tasks and Settings, as shown above.
From the terminal
open-mem viewer [--port 37778] web GUI
open-mem search <query> [--project p] [--type t] search memories
open-mem status counts, queue and configuration
open-mem drain process the queue and sync every source now
open-mem sync record Claude history, tasks, projects and the vault
open-mem import-chat <conversations.json> import claude.ai chats
open-mem ingest-vault [--dir v] [--watch] index an Obsidian vault (and keep watching)
open-mem export-obsidian [--dir d] write all session notes to ObsidianRun any of them with npx -y github:kamalivaturi/open-mem <command>.
βοΈ Configuration
Everything is in ~/.open-mem/settings.json (created on first run, editable in Settings). Set OPEN_MEM_HOME to move all data.
Key | Default | Meaning |
|
| Observer: |
|
| Model for Ollama / OpenAI-compatible |
|
| Model for the |
|
| Ollama server (also used for embeddings) |
| OpenRouter / empty | OpenAI-compatible endpoint ( |
|
| Embedding model; |
|
| Language memories are written in |
|
| Tool calls per observer request |
|
| What's injected at session start ( |
| Todo/Task tools | Tools never recorded; |
|
| Linked Obsidian vault and folders never indexed |
|
| Where session notes are written |
|
| Archive Claude sessions, tasks and projects |
|
| Never treat temp or scratch folders as projects |
| auto | Override where Claude's files are found |
|
| Web GUI port |
π How it works
flowchart LR
subgraph CC[Claude Code / Claude Desktop]
A[SessionStart] -->|handoff + project purpose + index| C((Claude))
C --> B[Prompt and tool-use hooks]
C --> D[Stop / SessionEnd]
C <-->|8 MCP tools| M[open-mem MCP server]
end
B -->|redact + queue| Q[(SQLite queue)]
D --> W[background drain]
Q --> W
W -->|batches| L{{Observer model<br/>Ollama Β· Claude Β· OpenAI-compatible}}
L --> O[(memories + handoffs<br/>FTS5 + embeddings)]
S[Sources: Obsidian vault Β· Claude transcripts<br/>scheduled tasks Β· projects Β· claude.ai export] -->|ingestion module:<br/>incremental, deduplicated| I[(items)]
W --> S
L -->|purpose and intention| I
O --> M
I --> M
O --> G[Web GUI]
I --> G
O -.session notes.-> V[Obsidian vault]Capture. Hooks write prompts and tool calls (redacted) to a local SQLite queue in milliseconds.
Compress. A background drain sends batches to your observer model, which returns typed memories, deduplicated by title and embedding similarity.
Hand off. When a session stops, the observer writes the handoff, but only if new memories were made.
Ingest. One ingestion module keeps every source in sync: unchanged items are skipped by version stamp, changed ones re-parsed only if their content hash changed, duplicates stored once. Archive sources (Claude history, tasks) keep items that vanish upstream; the vault is mirrored.
Recall. At session start, the handoff, project purpose, memory index and related notes are injected; MCP tools fetch the rest on demand.
File | Role |
| Claude Code hook handler; builds the session-start context |
| Drain: batches β memories β dedup β handoffs β purposes β Obsidian notes |
| Ingestion module: change detection, dedup, archive/mirror, embeddings, watching, recall over items |
| Source adapters: Obsidian vault, Claude transcripts, scheduled tasks, projects, claude.ai export |
| Ollama, |
| SQLite schema, FTS5, hybrid ranking, settings |
| Secret redaction |
| MCP stdio server (JSON-RPC 2.0) |
| Local web GUI and JSON API |
| CLI entry point |
The domain language (Session, Observation, Handoff, Source, Itemβ¦) is defined in CONTEXT.md.
π Privacy
open-mem is local-first by design. The full policy is in PRIVACY.md; here is what it says.
π Where your data lives | One folder on your machine: |
π€ What leaves your machine | Only what goes to the observer model you choose: redacted tool calls and prompts to write memories and handoffs, plus a project's README / CLAUDE.md excerpt or a task's prompt to write its purpose. With Ollama, nothing leaves your computer. Your recorded Claude history is never sent anywhere. |
π What it reads | Claude's own local files (transcripts, Desktop session titles, scheduled tasks), project READMEs, and your vault if you link it. All read-only: open-mem never changes or deletes them. |
π§Ή What it never keeps | Claude's hidden reasoning, raw tool output from your history, subagent chatter, the text of automated background runs, and anything matching secret patterns. |
π‘οΈ The web GUI | Listens on |
ποΈ Your control | Delete any memory in the GUI; switch any source off; exclude vault folders; wrap text in |
π©Ί Troubleshooting
Run npx -y github:kamalivaturi/open-mem status. If queue keeps growing, the observer can't be reached: open the dashboard and press Quick check. A red "model not installed" means ollama pull <model>; otherwise switch provider. Errors are logged in ~/.open-mem/open-mem.log.
The file has a typo (often a trailing comma). open-mem uses safe defaults until you fix it or save from Settings, which rewrites it cleanly.
Make sure node --version is 22.13 or newer in the shell Claude Code starts from, then restart Claude Code. claude plugin list should show open-mem.
Semantic search needs the embedding model: ollama pull nomic-embed-text. The dashboard's Quick check shows whether embeddings are available.
β FAQ
claude-mem is a large, feature-rich, open-source project with paid hosted extras. open-mem is a small, independent take focused on running fully locally with free models, plus Obsidian integration, all-surface Claude history, and project/task registries.
No. Hooks take milliseconds; all model work happens in a background process. Syncing history at session start checks only what changed.
Nothing with Ollama. With the Claude plan provider, each memory batch, handoff and purpose is one small Haiku call on your subscription.
Cowork's scheduled tasks are recorded. Cowork conversations aren't stored on your computer by Claude today, so there's nothing local to read; they'll be added if that changes.
claude plugin uninstall open-mem@open-mem, then delete the ~/.open-mem folder (and the claude/open-mem folder in your vault if you enabled session notes).
πΊ Roadmap
π File-aware recall: when Claude opens a file, surface past memories about it
π― Relevance-ranked start context from the current branch, files and prompt
π§© Memory consolidation: merge related memories into durable knowledge notes
β‘ ANN vector index (
sqlite-vec) for very large memory storesπ Retry budget and dead-letter queue for batches a model can't handle
π€ More harnesses: Codex CLI, Gemini CLI, Cursor, OpenCode
π¬ Cowork conversations, once Claude stores them locally
π Encryption at rest and optional git-backed sync of session notes
Ideas and pull requests are welcome in Issues.
π§ͺ Development
git clone https://github.com/kamalivaturi/open-memcd open-mem && npm testNo install step: open-mem uses only Node's built-ins (node:sqlite, node:http, node:test). The tests use a fake model and temporary folders, so they never read your real data. They cover redaction, parsing, the full hook β memory β search β Obsidian flow, every source adapter, the MCP protocol and the GUI's security checks.
To try a local checkout as a plugin: claude plugin marketplace add ./open-mem, then claude plugin install open-mem@open-mem.
π License
Apache-2.0 Β© Kamal Ivaturi. The bundled Inter font is Β© The Inter Project Authors, under the SIL Open Font License.
This server cannot be deployed
Maintenance
Related MCP Connectors
Persistent memory for Claude Code and Cursor. Stop re-explaining your project every session.
Persistent context for Claude. Your AI always knows your projects and next actions across sessions.
Persistent cross-session memory shared by Codex, Claude Code, ChatGPT, and other AI agents.
A second brain for Claude: remembers your work, plans your day, encrypted under a key only you hold.
Related MCP Servers
- AlicenseAqualityCmaintenancePersistent memory for Claude Code. Automatically indexes every conversation and provides production-grade hybrid search (BM25 + vectors + reranker) via MCP tools. 100% local, zero config, zero API keys, zero invoice.1630 npm7MIT
- AlicenseCqualityDmaintenanceProvides long-term memory and lossless context management for Claude Code, enabling automatic context compression, cross-session memory sharing, and semantic search across all history.10MIT
- AlicenseNot gradedqualityAmaintenanceGives Claude Code persistent cross-session memory with semantic search over saved facts, decisions, and journals, alongside automatic detection and classification of user corrections as trackable behavioral patterns. It also extracts behavioral signals from sessions and evolves self-authored frameworks over time, so the assistant develops judgment that carries forward between conversations β all local, with no cloud or API key required.6 npmMIT
- AlicenseNot gradedqualityAmaintenanceGives Claude Code persistent cross-session memory with semantic search over facts, decisions, and lessons, plus automatic tracking of user corrections and behavioral patterns. Enables a Claude that evolves reusable frameworks over time β promoting what works and retiring what doesn't β all locally through MCP tools and hooks.6 npmMIT