anamnesis
Integrates with Obsidian by storing session logs as plain markdown files in a vault, compatible with Obsidian's graph view and sync features.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@anamnesissearch for sessions about authentication"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Anamnesis MCP
"All inquiry and all learning is but recollection." — Plato, Meno 81d
Persistent session memory for Claude Code.
Claude Code already has persistence primitives — CLAUDE.md for project context, memory files for user preferences, skills for reusable workflows. What it doesn't have is episodic memory: what happened across sessions, what was tried, what worked, what's still open. The gap between episodic recall (what happened) and procedural knowledge (what to do) resets to zero every time a context window closes.
Anamnesis bridges that gap. It logs each session as structured markdown — Plan, Done, Open — and serves it back via an MCP server. Future sessions can search and cross-reference the past.
Features
BM25 full-text search over session logs with date/tag/host filtering
Structured entry search — find Plan/Done/Open items across all sessions
Obsidian-first — plain markdown vault, works with graph view and Obsidian Sync
save_sessiontool — capture sessions from any MCP client (Cursor, VS Code, etc.)Auto session capture — SessionEnd hook summarizes conversations automatically
Corpus analytics — word counts, tag distributions, open item tracking (Zeigarnik stats)
Section extraction — heading-level retrieval and cross-session section search
No database — just markdown files in a directory, audit/edit/delete anytime
Related MCP server: Claude Persistent Memory
Requirements
Python 3.13+
uv (package manager)
Claude Code (or any MCP client)
ANTHROPIC_API_KEY(only needed for the optional SessionEnd hook)
Quick Start
git clone https://github.com/chaosisnotrandomitisrhythmic/anamnesis-mcp.git
cd anamnesis-mcp && uv syncAdd the MCP server to ~/.claude.json:
{ "mcpServers": { "anamnesis": {
"command": "uv",
"args": ["--directory", "/path/to/anamnesis-mcp", "run", "anamnesis"]
}}}Add the SessionEnd hook to ~/.claude/settings.json:
{ "hooks": { "SessionEnd": [{ "matcher": "", "hooks": [{
"type": "command",
"command": "bash /path/to/anamnesis-mcp/scripts/session-summary.sh",
"timeout": 10000
}]}]}}Variable | Default | Description |
|
| Directory where session files are stored |
| — | Required by the hook to summarize transcripts |
|
| Model used for summaries |
|
| Directory for daily summary files |
|
| Hour for daily summary cron schedule |
|
| Minute for daily summary cron schedule |
Optionally, copy examples/skill/SKILL.md to ~/.claude/skills/anamnesis/SKILL.md for a /anamnesis slash command that teaches Claude how to search and cross-reference sessions.
Tools
search_sessions— BM25 full-text search over session logsget_session— retrieve full session by IDlist_sessions— browse/paginate with date/tag/host filterssearch_entries— cross-session search for Plan/Done/Open itemsget_section/list_sections/search_sections— heading-level extractionanalyze_corpus— corpus-wide statistics and open item countsrun_analysis— execute Python against session data (local/stdio only)
Vault Format
Plain markdown with YAML frontmatter. No database — just files in a directory.
---
session_id: "abc123-..."
date: "2026-03-14"
host: "myhost"
cwd: "/home/user/project"
tags: []
---
# Session Title
Summary paragraph describing the full arc of work.
---
## 2026-03-14 14:30
- **Plan**: What the user set out to do
- **Done**: What was accomplished
- **Open**: Unfinished items or next stepsWorks with any markdown viewer. If you use Obsidian, point ANAMNESIS_VAULT at a folder inside your vault for graph view and sync.
Daily Summary
Anamnesis includes an optional daily summary script — the third compression layer in the hierarchy:
Transcript (raw) → Session file (Opus summary) → Daily summary (residual symbols)Instead of appending per-session blocks, a cron job synthesizes all sessions from the day into a cohesive narrative with thematic threads and consolidated open loops. Each layer is a lossy compression that produces what Hofstadter calls residual symbols — not shorter text, but the stable attractors that emerge after recursive compression.
Setup:
# Add to crontab (runs at 8:03 PM daily)
3 20 * * * /Users/you/.local/bin/uv run scripts/daily_summary.py >> /tmp/anamnesis-daily-summary.log 2>&1Configuration:
Variable | Default | Description |
|
| Directory for daily summary files |
|
| Hour for cron schedule |
|
| Minute for cron schedule |
You can also run it manually for any date: uv run scripts/daily_summary.py 2026-03-31
Uninstallation
Remove the
anamnesisentry frommcpServersin~/.claude.jsonRemove the SessionEnd hook from
~/.claude/settings.json(if configured)Optionally delete the vault directory (
~/Documents/Anamnesisby default)Optionally remove the skill:
rm -rf ~/.claude/skills/anamnesis/Remove the repo:
rm -rf /path/to/anamnesis-mcp
Your session logs in the vault are plain markdown — keep them, move them, or delete them as you see fit.
Why "Anamnesis"
Anamnesis (ἀνάμνησις) — Plato's word for recollection, literally un-forgetting. His claim was that knowledge is not acquired but recovered: what appears as new learning is the recall of what was already known but inaccessible. Not the acquisition of something foreign, but the recognition of something familiar.
Claude Code's existing persistence — CLAUDE.md, memory files, skills — is procedural. It encodes how to behave: project conventions, user preferences, workflow patterns. What it doesn't capture is the episodic layer underneath: the specific sessions where those conventions were discovered, the failed approaches that led to the current ones, the open threads that haven't converged yet. Procedural memory feels like knowing. Episodic memory feels like remembering. Anamnesis adds the remembering.
The Strange Loop
The same model that had the conversation summarizes it. That summary enters a searchable index. The next session reads its own past summaries and continues the work — reconstructing itself from its own compressed artifacts.
Session N happens
→ SessionEnd hook fires
→ The model summarizes Session N
→ Summary enters the searchable index
→ Session N+1 starts
→ User says "search my past sessions"
→ Claude reads its own summary of Session N
→ That reading becomes part of Session N+1's context
→ SessionEnd hook fires
→ The model summarizes Session N+1
(which now includes a summary of Session N)
→ Session N+2 reads THAT...Summaries of summaries of summaries, each layer lossy, until what remains is not the conversation but its shape. Hofstadter called these stable residues symbols — not the raw data, but the attractor that emerges when a system references itself enough times. The rolling summary that gets rewritten each session is literally this process: not the conversation, but the residue of the conversation after recursive compression.
The model doing the summarizing is the same model that will later read the summary — writing notes for a future self that isn't itself. The reading instance reconstructs a past self from compressed artifacts. Hofstadter would recognize this: we don't replay experiences, we reconstruct them from lossy symbols, and the reconstruction is shaped by our current context.
Inspired by Douglas Hofstadter's Gödel, Escher, Bach: an Eternal Golden Braid and I Am a Strange Loop. For the full exploration — Gödel's incompleteness, Escher's self-referential architecture, Bach's fugue in the Plan/Done/Open format — see research/strange-loops.md.
License
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/chaosisnotrandomitisrhythmic/anamnesis-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server