Give Claude Code Persistent Memory in 60 Seconds

Every time you start a new Claude Code session, it forgets everything. Your architecture decisions, your coding preferences, the bugs you already fixed — gone. You end up re-explaining the same things over and over.

CogmemAi fixes this. It’s an MCP server that gives Claude Code persistent memory across every session. Your agent remembers your tech stack, your conventions, your preferences — automatically.

3-Step Setup

Step 1: Get Your Free API Key

Head to hifriendbot.com/developer and sign up for a free account. Once registered, generate your API key from the developer dashboard. Your key will start with cm_ — copy it, you’ll need it in the next step.

Step 2: Run the Setup Wizard

Open your terminal and run:

npx cogmemai-mcp setup

The wizard will ask for your API key, verify it, and automatically configure Claude Code. No manual config files to edit.

Prefer a manual one-liner?

claude mcp add cogmemai cogmemai-mcp -e COGMEMAI_API_KEY=cm_your_key_here --scope user

Replace cm_your_key_here with the API key you copied in Step 1. The --scope user flag makes CogmemAi available in every project globally.

Step 3: Restart Claude Code

Close and reopen Claude Code. That’s it — Claude now has persistent memory. Type /mcp in Claude Code to verify CogmemAi is connected.

What It Remembers

CogmemAi stores facts about your projects and preferences in the cloud — no local databases, no Docker, no vector stores. Just a thin MCP client.

  • Architecture decisions — “We use Next.js 15 with the app router”
  • Coding preferences — “Always use bun, never npm”
  • Bug fixes and gotchas — “PHP json_decode converts {} to array(), breaks Anthropic API”
  • Key file paths — “Auth logic lives in src/lib/auth.ts”
  • Dependency constraints — “Pinned to React 18 due to library X”

Memories are scoped per project (detected from your git remote) or globally for preferences that apply everywhere.

12 Tools, Zero Config

Once installed, Claude Code gets 12 memory tools automatically:

Tool What It Does
save_memory Store a fact with category, importance, and scope
recall_memories Semantic search — finds memories by meaning, not keywords
get_project_context Load top memories for the current project on session start
extract_memories Ai-powered extraction of facts from a conversation exchange
list_memories Browse stored memories with filters
update_memory Edit content, importance, or scope
delete_memory Remove a memory permanently
ingest_document Feed in READMEs, architecture docs, or API specs
export_memories Back up all memories as JSON
import_memories Bulk import memories with deduplication
save_session_summary Capture what was accomplished and next steps
get_usage Check memory count, extractions, and tier info

How It Works

  1. On session start, Claude calls get_project_context to load your most important memories for the current repo.
  2. While working, Claude saves new facts when it learns something important — architecture decisions, bug fixes, your preferences.
  3. On recall, semantic search finds relevant memories ranked by importance, relevance, and recency.
  4. After compaction, CogmemAi automatically recovers context so you never lose your place, even in long sessions.

Everything runs server-side. No local databases to corrupt, no RAM to leak, no version conflicts. Your memories sync across machines automatically.

Works With More Than Claude Code

CogmemAi uses the standard MCP configuration format, so it works with:

  • Claude Code (terminal)
  • Cursor
  • Windsurf
  • Cline
  • Continue

Same .mcp.json config, same memory, any editor.

Privacy and Security

  • API keys and secrets are automatically detected and blocked from being stored
  • Smart deduplication prevents redundant or conflicting memories
  • All data encrypted in transit (HTTPS) and at rest
  • You own your data — export or delete anytime

Pricing

Free Pro Team Enterprise
Price $0 $14.99/mo $39.99/mo $99.99/mo
Memories 1,000 2,000 10,000 50,000
Extractions/mo 500 2,000 5,000 20,000
Projects 5 20 50 200

The free tier is generous enough for most solo developers. Upgrade when you need more capacity.

Get Started Now

1. Sign up and grab your free API key at hifriendbot.com/developer

2. Run the setup wizard and paste your key when prompted:

npx cogmemai-mcp setup

3. Restart Claude Code

That’s it. Claude now remembers.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *