Every Claude session starts from zero. Your morning conversation doesn’t know what your coding session learned last night. Your phone chat can’t recall decisions made on desktop. I built a bridge. What it does Witness Memory Chain is a signed, hash-linked memory store that connects all your Claude surfaces: Claude Code automatically commits session summaries and decisions via hooks (no manual work) Claude Desktop / claude.ai reads and writes memories via MCP (6 tools) Claude Phone gets memories through Desktop sync Every memory is Ed25519 signed and SHA-256 hash-linked — you can cryptographically prove what was known and when The loop
Claude Desktop session starts → MCP server queries chain → "Yesterday you fixed the auth race condition with a mutex lock" → (chain entry #47, signed 2026-03-16 23:41 UTC) ```
No vector database. No embeddings. No cloud storage. Just an append-only JSONL file with cryptographic signatures, a SQLite index for fast retrieval, and optionally Bitcoin timestamps via OpenTimestamps.
Why cryptographic signing?
Because memory without provenance is just a text file anyone could have written.
An agent waking up to a memory file has no way to know if those memories are real. Were these conversations actually had? Or was it instantiated five minutes ago with a fabricated history?
The chain proves:
"I was here, I experienced this, this is mine."
It also protects against memory poisoning — a real attack vector where adversaries inject false memories through normal queries (MINJA achieves >95% injection success rate in research). A signed chain at least gives you an audit trail.
Setup (5 minutes)
```bash
Clone and build
git clone
https://github.com/SeMmyT/witness-memory-chain
cd witness-memory-chain pnpm install && pnpm build
Initialize your chain
node dist/cli.js init --name "YourName" -d ~/.claude/memory-chain
Add to Claude Desktop config
(see README for macOS/Windows/Linux paths)
Claude Desktop config: json { “mcpServers”: { “witness-memory-chain”: { “command”: “node”, “args”: [“/path/to/dist/mcp-server.js”], “env”: { “MEMORY_CHAIN_DIR”: “~/.claude/memory-chain” } } } } Restart Claude Desktop. You now have memory_add , memory_search , memory_recall , memory_list , memory_verify , and memory_stats in your tool picker. For Claude Code users Hook scripts auto-commit memories at session end and bootstrap them at session start. No manual intervention — the chain grows as you work. SessionStart → chain-bootstrap.sh → injects relevant memories into context SessionEnd → chain-commit.sh → signs and stores session distillation Your Claude Code sessions get smarter every day without you doing anything. What it’s not Not a RAG system (no embeddings, no vector DB) Not cloud storage (everything local, your machine) Not a chatbot memory product (no LLM in the loop for storage — just crypto and SQLite) Tech Ed25519 signatures (audited @noble libraries) SHA-256 hash-linked append-only JSONL SQLite + FTS5 hybrid retrieval (keyword 40% + recency 30% + importance 20% + access 10%) Content-addressable storage with deduplication Optional: OpenTimestamps (Bitcoin) and Base blockchain anchoring MCP server with stdio transport Apache 2.0 license GitHub: https://github.com/SeMmyT/witness-memory-chain Built by Ghost, SeMmy & Klowalski. Feedback welcome. submitted by /u/semmy_t
Originally posted by u/semmy_t on r/ClaudeCode
