All Posts
技术实践2026-03-146 min read

How to Give Claude Persistent Memory with KnowMine MCP

Claude forgets everything when you close a conversation. Learn how to give Claude persistent, cross-session memory using KnowMine's MCP server — save decisions, lessons, and insights that carry over to every future conversation.

Claude memorypersistent memoryMCP serverClaude CodeAI memory toolknowledge base

The Problem: Claude Forgets You Every Time

You've spent 30 minutes with Claude solving a complex architecture problem. You've made a key decision: use Drizzle ORM over Prisma because of cold start performance in serverless environments. Claude helped you think through it carefully.

Tomorrow, you start a new conversation. Claude doesn't remember any of it.

This isn't a bug — it's how all current AI systems work. Conversations are stateless. Every session starts from zero.

But what if Claude could remember your decisions, preferences, and hard-won lessons — not just for one session, but permanently, across every conversation?

That's what KnowMine's MCP memory tools enable.

What Is MCP (and Why It Matters for Memory)

MCP (Model Context Protocol) is an open standard that lets AI assistants like Claude connect to external tools and data sources. Instead of Claude being a closed system, MCP turns it into an extensible platform.

KnowMine is an MCP server. When you connect it to Claude Code, Claude gains three new tools:

  • save_memory — Save a knowledge crystal from the current conversation
  • recall_memory — Search your memory library semantically
  • get_soul — Get your AI-generated user profile (System Prompt)

These tools give Claude access to a personal knowledge base that you own and control.

How Persistent Memory Works

Here's the flow:

Conversation with Claude Code
         ↓
Claude identifies a key decision, lesson, or insight
         ↓
Claude calls save_memory() automatically
         ↓
Your KnowMine knowledge base (stored in YOUR database)
         ↓
Next conversation: Claude calls recall_memory() to retrieve context

The key difference from Claude's built-in memory: your data lives in your database, not Anthropic's servers. You can export it, search it, and use it with any AI platform.

Five Types of Memory Worth Saving

Not all conversation content deserves to be saved. KnowMine focuses on knowledge crystals — the 5% of conversations that contain lasting value:

1. Decisions (decision)

Technical and product decisions with their reasoning:

"Chose Drizzle ORM over Prisma because Prisma has 2-3 second
cold start delay in serverless environments. This matters for
our Neon + Vercel stack."

Why save this: Next time you're evaluating ORMs, or advising someone else, this context is instantly retrievable.

2. Lessons (lesson)

Hard-won experience from mistakes and debugging:

"When using Alibaba Cloud OSS SDK V1 (aliyun-oss-go-sdk),
there's no go.mod file — it doesn't follow Go module standards.
Use V2 (alibabacloud-oss-go-sdk-v2) instead."

Why save this: Prevents repeating expensive mistakes. The more you save, the smarter your future self becomes.

3. Insights (insight)

Creative connections and 'aha' moments:

"The real value of a knowledge management system isn't saving
information — it's surfacing the right information at the right
moment. Like GPS: not a map, but knowing where you are and
what to do next."

4. Preferences (preference)

How you like to work:

"Prefer clean, minimal code following YAGNI principles.
Three similar lines of code beats a premature abstraction.
Don't design for hypothetical future requirements."

Why save this: Claude can tailor every response to your style without you repeating yourself in every session.

5. Domain Knowledge (domain_knowledge)

Technical knowledge worth preserving:

"pgvector cosine similarity thresholds:
>0.95 = near-duplicate content
0.85-0.95 = highly related, slight variation
0.70-0.85 = semantically related
<0.70 = different topics"

Smart Deduplication: Memory Gets Richer, Not Noisier

A common concern: won't saving from every conversation create a cluttered database?

KnowMine uses vector similarity deduplication. When you save something new, the system generates an embedding and compares it to existing ai_memory entries. If similarity exceeds 90%, instead of creating a duplicate, it reinforces the existing memory:

First save: "Chose Drizzle — Prisma cold start is too slow"
→ Action: "created" — new memory entry

Second save: "Drizzle wins over Prisma for serverless cold start"
→ Similarity: 93% (above 90% threshold)
→ Action: "reinforced" — strengthens existing entry, no new entry

More important decisions get reinforced more often, giving them higher weight in search results. Your memory library becomes more refined over time, not more cluttered.

Searching Your Memory Semantically

recall_memory uses vector search — you query with natural language, not exact keywords:

Claude: "What database decisions have I made before?"
→ Calls recall_memory("database decisions I've made")
→ Returns: Drizzle vs Prisma decision (similarity: 0.87)

Claude: "Are there any gotchas I should know about?"
→ Calls recall_memory("gotchas lessons learned mistakes")
→ Returns: 3 lesson-type memories, ranked by relevance

This works across languages — save in Chinese, query in English, get relevant results.

Automatic Folder Organization

When Claude saves a memory, it's automatically sorted into a preset folder based on type:

Memory TypeAuto-saved to Folder
decision, lesson🔧 Dev Notes
insight💡 Insights
domain_knowledge📖 Learning
preference📌 Quick Notes

No manual filing. Your memories are organized the moment they're saved.

The Soul Profile: Your Portable AI Context

As your memory library grows, KnowMine distills it into a Soul profile — a structured summary of who you are, how you think, and what you know.

get_soul(format="system_prompt")

Returns:
"You're speaking with a full-stack developer who builds SaaS products
with Next.js 15 + Drizzle ORM + Neon PostgreSQL. They follow YAGNI
principles and are sensitive to serverless performance. Key past
decisions include: chose Drizzle over Prisma (cold start)..."

The key insight: Paste this System Prompt into Claude.ai, ChatGPT, or any AI platform. From the very first message, the AI knows you. No introductions needed.

KnowMine Memory vs. Claude's Built-in Memory

FeatureClaude's MemoryKnowMine MCP Memory
Data ownershipAnthropic's serversYour database
Cross-platformClaude onlyAny MCP-compatible AI
SearchLimitedSemantic vector search
Web UI managementNoneFull web interface
Export as System PromptNoneOne-click export
Memory typesUnstructured5 structured types
DeduplicationNone0.90 similarity threshold

Getting Started

  1. Sign up at knowmine.app
  2. Get your MCP API key from Settings → Connect
  3. Add KnowMine to your Claude Code MCP configuration
  4. Start a conversation — Claude will automatically save key memories

From that point on, every important decision, lesson, and insight you share with Claude is preserved — in your database, searchable, exportable, and portable to any AI platform.


Give Claude the memory it deservesknowmine.app

Start building your AI-native knowledge base

Free to start. Connect to Claude, ChatGPT, and more.

Get Started Free
How to Give Claude Persistent Memory with KnowMine MCP - KnowMine Blog