
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
claude-code-memory
Advanced tools
Persistent memory for Claude Code. Never lose context between sessions again.
Every few days, you start a new Claude Code session and have to re-explain your project — the architecture, the decisions you made, the patterns you follow, the gotchas you discovered. All that context is gone.
memory-mcp silently captures what matters during your sessions and makes it available to every future session — automatically.
Session 1: Claude works → hooks silently extract memories → saved
Session 2: Claude starts → reads CLAUDE.md → instantly knows everything
No commands to run. No "remember this". It just works.
Two-tier memory architecture:
| Layer | Purpose | Size |
|---|---|---|
CLAUDE.md | Auto-read on session start. Top ~150 lines of the most important context. | Compact |
.memory/state.json | Full memory store. Searchable via MCP tools mid-conversation. | Unlimited |
Silent capture via hooks:
Claude Code hooks fire after every response (Stop), before context compaction (PreCompact), and at session end (SessionEnd). A fast LLM (Haiku) reads the transcript and extracts:
Smart memory management:
# Install globally
npm install -g memory-mcp
# Interactive setup (API key + hooks)
memory-mcp setup
# Initialize a project
memory-mcp init ~/Projects/my-app
That's it. Start a Claude Code session and memories will begin accumulating automatically.
memory-mcp setup Interactive first-time setup
memory-mcp init [dir] Initialize memory for a project
memory-mcp status [dir] Show memory status and health
memory-mcp search <query> Search memories by keyword
memory-mcp ask <question> Ask a question, get answer from memory
memory-mcp consolidate [dir] Merge duplicates, prune stale memories
memory-mcp key [api-key] Set or check Anthropic API key
memory-mcp help Show help
When configured as an MCP server, Claude can access these tools during a session:
| Tool | Description |
|---|---|
memory_search | Keyword search across all memories |
memory_related | Get memories by tag or area |
memory_ask | Ask a question, get an LLM-synthesized answer from memory |
memory_save | Manually save a memory |
memory_recall | List all memories with filters |
memory_delete | Remove a memory |
memory_consolidate | Trigger memory consolidation |
memory_consciousness | Generate the full consciousness document |
memory_stats | Show memory statistics |
memory_init | Set project name and description |
Memories are categorized into six types:
architecture "Next.js 14 app router with Supabase backend, Stripe for billing"
decision "Chose server components for public pages because of SEO requirements"
pattern "All API routes validate input with zod and return NextResponse"
gotcha "Supabase RLS policy on word_lists requires user_id OR org_id, not both"
progress "Auth complete, billing webhook handling in progress"
context "Client wants launch by March, focus on core features only"
After initialization, your project gets:
your-project/
├── CLAUDE.md ← auto-updated memory summary (read on session start)
├── .memory/
│ ├── state.json ← full memory store
│ └── cursor.json ← tracks what's been processed
├── .mcp.json ← MCP server configuration
└── .claude/
└── settings.json ← hook configuration
The memory block is inserted between markers, preserving any existing CLAUDE.md content:
<!-- MEMORY:START -->
# MyProject
A brief description
_Last updated: 2026-01-27 | 45 active memories, 62 total_
## Architecture
- Next.js 14 app router with Supabase backend
- Auth via NextAuth with Google and email providers
## Key Decisions
- Chose server components for SEO pages
- Using Supabase RLS instead of API-level auth
## Patterns & Conventions
- All API routes use zod validation
- Tailwind only, no CSS modules
## Gotchas & Pitfalls
- RLS policy requires user_id OR org_id, not both
## Current Progress
- Auth: complete
- Billing: in progress
## Context
- Launch target: March
_For deeper context, use memory_search, memory_related, or memory_ask tools._
<!-- MEMORY:END -->
Global (recommended): hooks work for all projects automatically.
memory-mcp setup # select "global" when prompted
Per-project: hooks and MCP configured per project.
memory-mcp init /path/to/project
API key is resolved in order:
ANTHROPIC_API_KEY environment variable~/.memory-mcp/config.json~/.config/anthropic/api_key~/.anthropic/api_keyThe extractor uses Claude Haiku for memory extraction and consolidation. Typical cost:
MIT
FAQs
Persistent memory for Claude Code — never lose context between sessions
The npm package claude-code-memory receives a total of 26 weekly downloads. As such, claude-code-memory popularity was classified as not popular.
We found that claude-code-memory demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.