claude-code-memory
Give Claude Code a memory. Save architectural decisions during conversations, query them forever. 100% local, zero telemetry.
Install / Use
claude mcp add yahav10 -- npx -y github:yahav10/claude-code-memoryIf the server publishes to npm under a different name, use that package instead β check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
Data & AnalyticsSupported Platforms
Our assessment of claude-code-memory
claude-code-memory scores 78/100 on our quality scale, 538th of 599 Data & Analytics skills we index.
Its MCP Server is 14 KB long, well organised into 27 sections with 13 code examples: a thorough specification that gives an agent plenty to work with.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 78/100, with 2 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit β read the skill file before letting an agent act on it.
claude-code-memory compared with similar skills
All 4 of these similar skills score higher than claude-code-memory; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| claude-code-memory (this skill)by yahav10 | 78 | 3 | 4mo ago | MCP Server |
| claude-memby thedotmack | 100 | 101.8k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 99.6k | 4d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 76.2k | 2d ago | CLAUDE.md |
| CowAgentby zhayujie | 100 | 47.5k | today | CLAUDE.md |
Frequently asked questions
- How do I install claude-code-memory?
- Run
claude mcp add yahav10 -- npx -y github:yahav10/claude-code-memory. The install tabs above show the steps for each supported agent. - Which AI agents does claude-code-memory work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is claude-code-memory safe to use?
- It declares no license and scores 78/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is claude-code-memory still maintained?
- The repository was last updated about 4 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubπ§ claude-session-memory
Give Claude Code a memory. Never re-explain architectural decisions again.
Save decisions. Auto-load context. Prove the ROI. 100% local.
</div>π€ The Problem
Every new Claude Code session starts from scratch.
Session 1: "Let's use JWT for authentication because our microservices need stateless auth..."
Session 14: "Why are we using JWT?" β Claude has no idea.
Session 27: You're explaining the same decision for the fifth time.
CLAUDE.md helps but it's static, non-queryable, and becomes a dumping ground.
<div align="center">
π° The Real Cost of Forgetting
</div>Every time Claude doesn't know your project context, you pay for it β in tokens, in time, and in wrong answers.
Without memory With memory
βββββββββββββββββ βββββββββββββββββ
You: "Add auth to /orders" You: "Add auth to /orders"
β β
βΌ βΌ
Claude: "What auth system Claude calls query_memory("auth")
do you use? JWT? Sessions? β
OAuth? What middleware?" βΌ
β Claude: "Adding JWT middleware
βΌ using your existing auth pattern
You: [5 minutes re-explaining] from decision #12..."
β β
βΌ βΌ
Claude: "Got it. And what β
Correct implementation
database? What ORM?" on first try
β
βΌ
You: [3 more minutes explaining]
β
βΌ
Claude builds it wrong anyway
because context was incomplete
<table>
<tr>
<td width="50%">
Without memory (session 30)
- π Re-explain 3-5 decisions per session
- π¬ 10-15 extra back-and-forth messages
- β Wrong assumptions from missing context
- π₯ Token burn on repeated explanations
- β±οΈ ~15 min wasted per session
With memory (session 30)
- β Claude recalls all 47 decisions instantly
- π¬ Skip straight to implementation
- π― Correct assumptions from day one
- π Fewer tokens, faster completions
- β±οΈ Time saved compounds every session
The math: If you run 3 Claude Code sessions/day and waste ~15 min each re-explaining context, that's 5+ hours/week. With a team of 4, that's 20 hours/week β gone. Project memory eliminates this entirely.
π‘ The Solution
An MCP server that gives Claude Code a queryable SQLite database of your project's architectural decisions β plus automatic session intelligence that loads the right context at the right time.
β¨ Why Use It
| Benefit | What it means for you |
|---------|----------------------|
| π§ Auto session continuity | Claude knows what you worked on last session β branch, decisions, files changed |
| βοΈ Automatic capture | A SessionEnd hook saves decisions from every session β no need to remember to ask |
| π Semantic search | Paraphrased questions still find the right decision, even with zero shared keywords |
| π― Smart context loading | Relevant decisions are surfaced automatically based on your current branch and files |
| π° Proven ROI | Track token savings, time saved, and hit rate β with real numbers |
| π Never re-explain decisions | Claude remembers what you decided and why, across every session |
| π Session review | Get prompted to save decisions before ending a session β nothing slips through |
| π 100% local and private | SQLite on your machine, zero network calls, zero telemetry |
β‘ Quick Start
npx claude-session-memory init
Restart Claude Code. That's it. π
π§ Session Intelligence
Every session is smarter than the last:
Session Start (get_stats) Session End (review_session)
βββββββββββββββββββββββββ ββββββββββββββββββββββββββββ
β
Last session context β
Decisions saved this session
Branch, decisions, files What you captured
β
Relevant decisions β
Files changed without decisions
Matched by branch + files What you might have missed
β
Token savings ROI β
Suggestions
Queries, hit rate, time saved "Consider saving for auth.ts"
How context matching works:
- File matching β decisions linked to files you're currently modifying
- Branch keywords β
feature/authβ finds decisions taggedauth - Recent fallback β always shows latest decisions if no specific match
βοΈ Automatic Capture
init installs a SessionEnd hook so memory fills itself. When a session ends, decisions are extracted (via Haiku) and saved automatically β you don't have to remember to ask Claude to save them.
Session ends βββΆ SessionEnd hook βββΆ extract decisions βββΆ save to memory
- Idempotent β sessions already captured are skipped, so nothing is double-saved.
- No key? No problem β without an Anthropic API key it stores session metadata only (no extraction), and you can still save decisions explicitly via
save_decision. - The 5-minute auto-import in the web dashboard still works too; the hook just makes capture immediate.
π Semantic Search
query_memory blends keyword search with vector similarity, so questions match by meaning, not just shared words:
"How do users prove their identity to the API?"
β
βΌ
β
finds "Adopt stateless token authentication" (zero keywords in common)
- Runs 100% locally via a small sentence-embedding model (
multi-qa-MiniLM-L6-cos-v1, 384-dim) β the model weights (~25MB) download once on first use, then everything stays on your machine. - Keyword/FTS matches come first (they capture explicit intent like file paths and tags); semantic matches fill any remaining slots.
- Powered by the optional
@xenova/transformersdependency. If it's not installed, search gracefully falls back to keyword-only. Runreindexto embed decisions saved before you enabled it.
π How It Works
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Claude Code Conversation β
β β
β You: "Let's use PostgreSQL with Prisma ORM" β
β β
β Claude: "That sounds like an architectural decision. β
β Want me to save it?" β
β β
β You: "Yes" β
β β β
β βΌ β
β βββββββββββββββββββ ββββββββββββββββββββββββββββ β
β β save_decision βββββΆβ .claude/project-memory.dbβ β
β βββββββββββββββββββ ββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Β·Β·Β· Next session Β·Β·Β·
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β You: "Why did we choose PostgreSQL?" β
β β β
β βΌ β
β βββββββββββββββββββ ββββββββββββββββββββββββββββ β
β β query_memory βββββ .claude/project-memory.dbβ β
β βββββββββββββββββββ ββββββββββββββββββββββββββββ β
β β β
β βΌ β
β Claude: "You chose PostgreSQL 16 with Prisma ORM β
β because of ACID compliance, JSON support, and strong β
β community. Alternatives considered: MySQL, MongoDB." β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π οΈ MCP Tools
| Tool | Description |
|------|-------------|
| save_decision | πΎ Save an architectural decision with title, rationale, alternatives. Auto-detects duplicates via Jaccard similarity |
| query_memory | π Search decisions using natural language. Logs every query for ROI tracking |
| list_recent | π List recent decisions across sessions |
| update_decision | β»οΈ Deprecate or supersede a decision |
| get_stats | π§ Session intelligence β last session context, relevant decisions for current work, token savings ROI |
| review_session | π Review current session before ending β shows files changed without decisions, suggests what to save |
| sync_claude_md | π Export active decisions into your CLAUDE.md with auto-managed markers |
π¬ Query Examples
"Why did we choose JWT?"
"What decisions affect src/auth.ts?"
"Show me recent decisions"
"Compare Pinia vs Vuex"
"Show deprecated decisions"
"What are the alternatives to Redis?"
π₯οΈ CLI Commands
| Command | Description |
|---------|-------------|
| npx claude-session-memory init | π Initialize project memory |
| npx claude-session-memory workspace-setup [dir] | π Share context memory across all sub-projects in a workspace |
| npx claude-session-memory export | π€ Export decisions (JSON/Markdown/CSV) |
| npx claude-session-memory import <file> | π₯ Import decisions from JSON |
| npx claude-session-memory sync-claudemd | π Sync active decisions into CLAUDE.md |
| npx claude-session-memory reindex | π Build semantic-search embeddings for existing decisions |
| npx claude-session-memory stats | π Show memory statistics |
Workspace Setup
If you have a monorepo or workspace with multiple sub-projects (each with their own .git), use workspace-setup to share context memory across all of them:
npx claude-session-memory workspace-setup /path/to/workspace
npx claude-session-memory workspace-setup --dry-run # Preview changes
npx claude-session-memory workspace-setup --force # Overwrite existing configs
This symlinks the root .mcp.json into every git sub-project so they all share the same decision history.
Export Formats
npx claude-session-memory export # JSON (default)
npx claude-session-memory export --format markdown # Human-readable
npx claude-session-memory export --format csv # Spreadsheet
npx claude-session-memory export --output ./backup.json # Custom path
π§Ή Smart Deduplication
When saving a new decision, the server automatically compares it against existing ones using Jaccard similarity on tokenized text:
| Similarity | Action | |------------|--------| | > 0.8 | Auto-supersedes the older decision β you don't need to clean up | | 0.6 β 0.8 | Returns a warning with similar decisions so you can decide | | < 0.6 | Saved without warnings |
No configuration needed β dedup runs on every save_decision call.
β³ Confidence Decay
Decisions tagged temporary or experimental automatically fade over 30 days:
Day 0 β confidence 1.0 (full strength)
Day 15 β confidence 0.5 (half strength)
Day 30 β confidence 0.0 (fully faded)
Faded decisions (confidence < 0.3) are excluded from CLAUDE.md sync but remain queryable. Regular decisions never decay regardless of age.
π CLAUDE.md Sync
Auto-generate a structured decisions section in your CLAUDE.md:
npx claude-session-memory sync-claudemd
Or ca
Truncated for display β read the full file on GitHub.
Related Skills
claude-mem
101.8kPersistent Context Across Sessions for Every Agent β Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
99.6kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu β one CLI, zero API fees.
headroom
76.2kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
CowAgent
47.5kOpen-source personal AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit β see the Safety scan above for what the skill file itself contains.
