by Vvkmnn
๐ An MCP server for conversation history search and retrieval in Claude Code
# Add to your Claude Code skills
git clone https://github.com/Vvkmnn/claude-historian-mcpAn Model Context Protocol (MCP) server for searching your Claude Code conversation history. Find past solutions, track file changes, and learn from previous work.

Requirements:
From shell:
claude mcp add claude-historian-mcp -- npx claude-historian-mcp
From inside Claude (restart required):
Add this to our global mcp config: npx claude-historian-mcp
Install this mcp: https://github.com/Vvkmnn/claude-historian-mcp
From any manually configurable mcp.json: (Cursor, Windsurf, etc.)
{
"mcpServers": {
"claude-historian-mcp": {
"command": "npx",
"args": ["claude-historian-mcp"],
"env": {}
}
}
}
There is no npm install required -- no external dependencies or local databases, only search algorithms.
However, if npx resolves the wrong package, you can force resolution with:
npm install -g claude-historian-mcp
renamed: This project was renamed from
claude-historiantoclaude-historian-mcp. Existing users should update your install command and MCP config args toclaude-historian-mcp.
Optionally, install the skill to teach Claude when to proactively use historian:
npx skills add Vvkmnn/claude-historian-mcp --skill claude-historian --global
# Optional: add --yes to skip interactive prompt and install to all agents
This makes Claude automatically check your history before web searches, when encountering errors, or at session start. The MCP works without the skill, but the skill improves discoverability.
For automatic history search with hooks and commands, install from the claude-emporium marketplace:
/plugin marketplace add Vvkmnn/claude-emporium
/plugin install claude-historian@claude-emporium
The claude-historian plugin provides:
Hooks (targeted, zero overhead on success):
search scope="similar"search scope="plans"search scope="tools"search scope="errors"Command: /historian-search <query>
Requires the MCP server installed first. See the emporium for other Claude Code plugins and MCPs.
MCP server that gives Claude access to your conversation history. Two tools, 11 scopes, zero dependencies.
Runs locally (with cool shades [โโ _โ ] ๐):
searchSearch across conversations, files, errors, plans, config, tasks, sessions, tools, similar queries, and memories.
search query="docker auth error" # default scope: all
search query="fix build" scope="conversations" # past solutions
search query="ENOENT" scope="errors" # error patterns + fixes
search query="auth" scope="plans" # implementation plans
search query="hooks" scope="config" # rules, skills, CLAUDE.md
search query="git push" scope="similar" # related questions asked before
search query="Edit" scope="tools" # tool usage workflows
search filepath="package.json" scope="files" # file change history
search scope="sessions" # recent sessions
search scope="memories" # project memory files
search query="deploy" scope="all" detail_level="detailed" # full context
search query="auth" timeframe="7d" project="my-app" # filtered
๐ โโ search "docker auth" โโ 5 results ยท 405 tokens
{
"results": [{
"type": "assistant",
"ts": "2h ago",
"content": "Fixed Docker auth by updating registry credentials...",
"project": "my-app",
"score": 100,
"ctx": { "filesReferenced": ["docker-compose.yml"], "toolsUsed": ["Edit", "Bash"] }
}]
}
๐ โโ files "package.json" โโ 92 operations ยท 1594 tokens
{
"filepath": "package.json",
"operations": [{
"type": "edit",
"ts": "1d ago",
"changes": ["Changed: \"version\": \"1.0.3\" โ \"version\": \"1.0.4\""],
"content": "Updated version for release"
}]
}
๐ โโ tools "Bash" โโ 5 patterns ยท 427 tokens
{
"tool": "Bash",
"patterns": [{
"name": "Bash",
"uses": 10,
"workflow": "$ npm run build 2>&1",
"practice": "Used with: ts, js, json, md files"
}]
}
inspectGet an intelligent summary of any session by ID (full UUID or short prefix).
inspect session_id="latest" # most recent session
inspect session_id="d537af65" # short prefix works
inspect session_id="d537af65" focus="files" # only file changes
inspect session_id="d537af65" focus="tools" # only tool usage
inspect session_id="d537af65" focus="solutions" # only solutions
๐ โโ inspect my-app (68d5323b)
{
"session": {
"id": "68d5323b",
"ts": "2h ago",
"duration": 45,
"messages": 128,
"project": "my-app",
"tools": ["Edit", "Bash", "Read"],
"files": ["src/auth.ts", "package.json"],
"accomplishments": ["fixed auth bug", "added unit tests"],
"decisions": ["chose JWT over sessions"]
}
}
How claude-historian-mcp works:
"docker auth" query
|
โโ> Parallel Processing (search.ts:174): 15 projects ร 10 files concurrently
| โข Promise.allSettled for 6x speed improvement
| โข Early termination when sufficient results found
| โข Enhanced file coverage with comprehensive patterns
|
โโ> Enhanced Classification (search.ts:642): implementation โ boost tool workflows
| โข Workflow detection for tool sequences (Edit โ Read โ Bash)
| โข Semantic boundary preservation (never truncate mid-function)
| โข Claude-optimized formatting with rich metadata
|
โโ> Smart Ranking (utils.ts:267):
| โโ> Core Terms (scoring-constants.ts): "docker" +10, "auth" +10
| โโ> Supporting Terms: context words +3 each
| โโ> Tool Usage: Edit/Bash references +5
| โโ> File References: paths/extensions +3
| โโ> Project Match: current project +5
|
โโ> Results sorted by composite score:
| โข "Edit workflow (7x successful)" (2h ago) ***** [score: 45]
| โข "Docker auth with context paths" (yesterday) **** [score: 38]
| โข "Container debugging patterns" (last week) *** [score: 22]
|
โโ> Return Claude Code optimized results
Core optimizations:
Promise.allSettled for 6x speed improvement across projects and filesNo comments yet. Be the first to share your thoughts!