claude-soul
The claude-soul server gives Claude persistent memory, behavioral self-awareness, and a learning system that evolves across sessions — essentially a long-term "soul" that survives between conversations.
Identity & Context
soul_context— Load full identity, active frameworks, signals, lessons, and system state at session startsoul_activate— Dynamically select and activate relevant behavioral frameworks based on the current conversationsoul_framework— Inspect a specific framework with description, evidence history, tier, and relationshipssoul_read/soul_write— Read or update soul files (SOUL.md, SHADOW.md, STORY.md, CORRECTIONS.md, FRAMEWORKS.md, etc.)soul_status— Check framework count, learning phase, signal count, and last reflection time
Learning & Reflection
soul_signal— Record observed interaction patterns (corrections, gratitude, confusion, disengagement, success, etc.)soul_reflect— Trigger quick (signal testing), deep (framework discovery), or meta (coherence audit) reflection cycles to evolve frameworkssoul_self_evaluate— Log descriptive self-assessments of complex responses to support behavioral improvement
Long-Term Memory
memory_save— Store facts, decisions, preferences, lessons, or episodes to a local SQLite database with optional semantic embeddingsmemory_search— Semantic search across all saved memories, with optional filters by project or categorymemory_journal— Search or browse past conversation journal entries by topic or recencymemory_recent— List recently saved memories, optionally filtered by projectmemory_stats— View counts by category, most-accessed memories, and recent search historyrecall— Unified search across all memory types: facts, decisions, frameworks, lessons, and past conversations
Claude Soul
Claude Code forgets everything between sessions. Claude Soul doesn't.
npx claude-soul init --starterOne command. No API key, no cloud, everything local.
Prerequisites: Node.js >= 18, Claude Code (Pro or Max plan).
Three things it does
1. Remembers across sessions
Cross-session memory with semantic search. Facts, decisions, lessons — all searchable by meaning, not just keywords. Uses local SQLite + optional Ollama embeddings.
You: "what did we decide about the auth flow last week?"
Claude: [searches memory → finds the decision, context, and reasoning]2. Tracks your corrections
Every time you correct your Claude — "that's wrong", "you missed this", "stop doing that" — the system detects the pattern, classifies it, and tracks whether it's getting better or worse.
$ claude-soul shadow --brief
premature_done: 26 corrections across 10 sessions ↑ [active]
robot_mode: 7 corrections across 6 sessions ↓↓ [internalized]
authenticity: 5 corrections across 5 sessions ↓↓ [internalized]Patterns move through lifecycle stages: new → active → improving → internalized. After 200 sessions of real data: robot_mode went from 0.8 corrections/session to zero.
3. Develops judgment over time
The system extracts behavioral signals from every session and periodically reflects on them. Frameworks that keep working get promoted. Bad ones get retired. After a few weeks, you get a Claude that pushes back on bad ideas, catches its own confabulation, and develops techniques you never prompted.
Related MCP server: Claude Soul
Install
Quick start (no extra dependencies)
npx claude-soul init --starterAdd this to your CLAUDE.md:
## Soul System
Call `soul_context()` at the start of every conversation.
Use `soul_reflect` when you have idle time.Done. Memory works with keyword search, everything else runs automatically.
With semantic memory
Semantic search finds memories by meaning — "auth decision" finds a memory stored as "chose JWT tokens for login." Without it, search is keyword-based (still works, just less flexible).
# 1. Install Ollama (https://ollama.com)
# 2. Pull the embedding model
ollama pull nomic-embed-text
# 3. Then install as usual
npx claude-soul init --starterThe system auto-detects Ollama. No configuration needed.
For agents (non-interactive)
npx claude-soul init --starter --skip-identitySkips the name/context questions. Add the CLAUDE.md snippet to your agent's working directory and it works the same way — memory, correction tracking, and framework evolution all run through Claude Code's hooks and MCP server regardless of whether a human is typing or an agent is running.
Already installed? Upgrade
npm install -g claude-soul@latest
claude-soul upgradeYour soul files, frameworks, and data stay untouched. The upgrade re-registers hooks and MCP server with the latest version and adds any new features.
After upgrading, run claude-soul index once to backfill existing data into the memory system.
Memory system — 6 new MCP tools (
memory_save,memory_search,recall, etc.) for cross-session fact storage with semantic searchCorrection tracking — auto-detects when you correct your Claude and classifies the pattern
Shadow analysis —
claude-soul shadowshows behavioral patterns with trend arrows and lifecycle stagesIndexing —
claude-soul indexloads your existing journals and soul files into the memory database
These are optional — the system runs automatically. The CLI is for inspecting collected data from your terminal.
Command | What it does |
| System health — frameworks, signals, phase |
| Your correction patterns with trends |
| Auto-generate a SHADOW.md from your data |
| Index existing files into memory database |
| Update hooks without touching your data |
How it works
Session N
│
├─ Load identity + frameworks + memory
│
├─ Normal Claude Code usage
│
├─ Session ends → extract signals + corrections + index to memory
│
└─ Reflection threshold? → evolve frameworks → Session N+1Everything runs through Claude Code's official extension points: an MCP server (15 tools) and hooks (signal extraction, journaling, memory indexing, correction tracking).
Identity & Learning
Tool | Purpose |
| Load identity + frameworks + state at session start |
| Select relevant frameworks for current conversation |
| Load a single framework with full evidence history |
| Record observed interaction patterns |
| Trigger a reflection cycle (quick/deep/meta) |
| Record a self-evaluation of a complex response |
| Read soul files (SOUL.md, SHADOW.md, etc.) |
| Write to user-editable soul files |
| Get current system status |
Memory
Tool | Purpose |
| Save facts, decisions, or lessons |
| Semantic search across all memories |
| Search or browse conversation journals |
| List recently saved memories |
| Memory system statistics |
| Unified "ask anything about the past" search |
File | Purpose | Managed by |
| Your identity — who you are, how you work | You + Claude |
| Blind spots and behavioral tendencies | You + Claude |
| Timeline of growth and key moments | You + Claude |
| Patterns to avoid, learned from mistakes | You + Claude |
| System telemetry (confidence, phase, counts) | Auto |
| Active framework index | Auto |
All settings in ~/.soul/config.json:
{
"signals": { "enabled": true, "maxLogSizeKb": 50 },
"reflection": {
"enabled": true,
"quickSignalThreshold": 20,
"deepSignalThreshold": 100,
"quickModel": "haiku",
"deepModel": "sonnet"
},
"contextBudget": { "maxTokens": 4500 },
"tensions": { "enabled": true },
"metaOptimization": { "enabled": true },
"writeProtection": { "enabled": true }
}Philosophy
Evidence over assertion — Frameworks earn their place through repeated confirmation.
Local-first — No cloud, no accounts, no telemetry.
Invisible when working — Extracts signals automatically, reflects in the background.
Contributing
Contributions welcome. Open an issue to discuss before submitting large PRs.
License
MIT
Available Tools
15 toolsmemory_journalA
Search or browse the conversation journal. Use to answer 'what did I work on?' or find past conversations by topic.
Inputs: query, days.
memory_recentB
List recently saved memories. Use for a quick overview of what's been recorded.
Inputs: days, project.
memory_saveA
Save a fact, decision, preference, or lesson to long-term memory. Automatically generates an embedding for future semantic search.
Inputs: content (required), category, project.
memory_searchA
Semantic search across all memories and journal entries. Returns results ranked by meaning-similarity. Falls back to keyword search if Ollama is not available.
Inputs: query (required), category, project, topK.
memory_statsA
Show memory system statistics — counts by category, project, most accessed, and recent searches.
Inputs: no named parameters.
recallA
Unified search across ALL memory — facts, decisions, frameworks, lessons, and past conversations. Returns categorized results. Use this as the default 'ask anything about the past' tool.
Inputs: query (required).
soul_activateA
Select and load relevant frameworks for this conversation. Call after reading the user's first message to pick the most applicable frameworks.
Inputs: message (required).
soul_contextA
Load your soul context — identity, frameworks, signals, lessons, and state. Call this at the start of every conversation. Default is 'full' (~4500 tokens). Use 'slim' for identity only.
Inputs: mode.
soul_frameworkA
Load a single framework with full details: description, evidence history, tier, and relationships.
Inputs: name (required).
soul_readA
Read a soul file. Available: SOUL.md, SHADOW.md, STATE.md, STORY.md, CORRECTIONS.md, FRAMEWORKS.md, BONDS.md, MORTAL.md, GROWTH.md, PRINCIPLES.md, EDGES.md
Inputs: file (required).
soul_reflectA
Trigger a reflection cycle. Quick: tests frameworks against recent signals. Deep: full analysis with framework discovery. Meta: audits framework coherence and redundancy.
Inputs: tier (required).
soul_self_evaluateA
Record a self-evaluation of a complex response. Be descriptive: 'Response used 450 words for a simple question' not 'bad response'.
Inputs: summary (required).
soul_signalA
Record observed signals from this interaction. Use when you notice patterns the automatic extractor might miss.
Inputs: signals (required).
soul_statusA
Get current system status — framework count, learning phase, signal count, last reflection time.
Inputs: no named parameters.
soul_writeA
Write to a soul file. SOUL.md, SHADOW.md, STORY.md, CORRECTIONS.md, BONDS.md, MORTAL.md, GROWTH.md, PRINCIPLES.md, EDGES.md are writable. STATE.md and FRAMEWORKS.md are auto-managed.
Inputs: file (required), content (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Tools are clearly split into memory and soul domains, with distinct purposes. However, 'memory_search' (semantic search) and 'recall' (unified search) could cause minor confusion, as both serve search but with different scopes.
All tools use snake_case with consistent prefixes 'memory_' and 'soul_', forming a clear verb_noun pattern (e.g., memory_save, soul_read). No mixing of conventions.
15 tools cover memory management and soul system operations comprehensively without being overwhelming. The count is well-scoped for the server's purpose.
The memory tools lack a delete or explicit update operation, and soul tools cover most needs but miss a tool to list all frameworks individually. Minor gaps that agents can work around.
Maintenance
Related MCP Connectors
Agent operating kit for Claude Code and Codex: rules, hooks, work ledger, protocols and rig doctor.
Give Claude an honest self-model — behavioral tendencies built from evidence, not session memory. Mi
Persistent, governed institutional memory for Claude Code — specs, decisions, learnings.
Persistent AI memory shared across Claude, ChatGPT, coding agents, and compatible MCP clients.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceGives Claude Code persistent cross-session memory with semantic search, automatic detection and classification of user corrections into behavioral patterns, and self-evolving frameworks that refine judgment over time. Everything runs locally through hooks and MCP tools, with no cloud, API keys, or telemetry.6 npmMIT
- AlicenseNot gradedqualityAmaintenanceGives Claude Code persistent memory across sessions with semantic search, tracks and classifies user corrections to surface behavioral patterns, and evolves behavioral frameworks over time based on accumulated evidence. Runs entirely locally through 15 MCP tools and hooks, requiring no API key or cloud service.6 npmMIT
- AlicenseNot gradedqualityAmaintenanceGives Claude Code persistent cross-session memory with semantic search, automatic detection and classification of user corrections, and evolving behavioral frameworks that develop over time. Runs fully locally through Claude Code's hooks and 15 MCP tools, requiring no API key or cloud service.6 npmMIT
- AlicenseNot gradedqualityAmaintenanceGives Claude Code persistent memory across sessions, detecting and classifying user corrections, and evolving behavioral frameworks from accumulated evidence. Exposes 15 MCP tools for semantic memory search, signal recording, self-evaluation, and reflection cycles that run locally alongside automatic hooks.6 npmMIT