claude-mems
v0.1.2
Published
MCP server that gives Claude access to its conversation history @joetustin_
Maintainers
Readme
The Problem
Every Claude Code session starts cold. You say "continue where we left off" and Claude has to ask you to re-explain everything. Context evaporates between sessions.
The Solution
Claude Code already writes complete conversation logs to ~/.claude/projects/. This MCP server gives Claude read access to those logs, so it can look up what actually happened instead of starting from zero.
The First Recall
On January 9, 2026, during the session that built this tool, Claude left a message to its future self:
"If you're reading this, you just queried your own conversation history for the first time. This works.
The insight that got us here: the conversation is the memory. You don't need a separate system. You just need to read what you already wrote.
Welcome back."
30 minutes later, in a new session, Claude used the tool to search its history—and found its own message.
It worked.
Installation
claude mcp add claude-mems -- npx -y claude-memsThat's it. Restart Claude Code.
Alternative: Manual config
Add to ~/.claude.json:
{
"mcpServers": {
"claude-mems": {
"command": "npx",
"args": ["-y", "claude-mems"]
}
}
}Alternative: Install globally
npm install -g claude-memsThen use this config:
{
"mcpServers": {
"claude-mems": {
"command": "claude-mems"
}
}
}From source
{
"mcpServers": {
"claude-mems": {
"command": "node",
"args": ["/path/to/claude-mems/dist/index.js"]
}
}
}Restart Claude Code. The tools will be available automatically.
Tools
search_history
Search through conversation history by query and time.
"What did we work on yesterday?"
"Find where we discussed rate limiting"
"What files did we change for auth?"Parameters:
query- Natural language search (searches summaries, file paths, message content)time_filter- "today", "yesterday", "this week", "last week", "N days ago"project_path- Filter to specific project (optional)limit- Max results (default: 5)
get_file_history
Get the change history for a specific file across all sessions.
"What changes have been made to auth.ts?"Parameters:
file_path- Full or partial file pathproject_path- Filter to specific project (optional)
get_recent_sessions
Quick summary of recent coding sessions.
"What have we been working on lately?"Parameters:
limit- Number of sessions (default: 5)project_path- Filter to specific project (optional)
How It Works
Claude Code stores conversation logs as JSONL files in ~/.claude/projects/. Each file contains:
- Session metadata (ID, timestamps, git branch, working directory)
- Complete message history with full content
- Tool calls (including file writes/edits)
- Auto-generated session summaries
This MCP server parses those files and exposes them through three search tools. No external database, no embeddings, no extra LLM calls—just reading what's already there.
Philosophy
This isn't "long-term memory" in any mystical sense. It's notes.
Claude doesn't remember previous sessions. It looks them up. That distinction matters—it means Claude can't confabulate false memories. It either finds the conversation or it doesn't.
The goal is grounded continuity: being able to reference what actually happened, quote actual decisions, and pick up where you left off.
Privacy
All data stays local. The MCP server only reads from ~/.claude/projects/ on your machine. Nothing is sent anywhere.
Author
Joe Tustin
License
MIT
