ClaudeHistoryMCP
by jhammant·★ 65·Score 48
MCP server for searching Claude Code conversation history with hybrid BM25 + TF-IDF search and knowledge extraction.
Overview
ClaudeHistoryMCP is a specialized MCP server that indexes Claude Code conversation history to make it searchable and reusable. It uses a hybrid search approach combining BM25 for keyword precision and TF-IDF for semantic recall, with Reciprocal Rank Fusion to combine results. The server automatically extracts knowledge from conversations, including decisions, solutions, and error-fix patterns, and can inject project context at the start of new sessions. It supports filter syntax for targeted searches and includes cloud sync capabilities for knowledge sharing.
Try asking AI
After installing, here are 6 things you can ask your AI assistant:
When to choose this
Choose ClaudeHistoryMCP when you work frequently with Claude Code and need to efficiently search and retrieve past solutions, decisions, and patterns from your conversation history.
When NOT to choose this
Avoid this if you're not using Claude Code, as it's specifically designed to work with Claude's conversation format and stores data in Claude's directory structure.
Tools this server exposes
9 tools extracted from the READMEsearch_historyFull-text search across all conversations with filter syntax
find_solutionsFind how you fixed errors/problems before
get_session_summaryStructured summary of any session
list_projectsList all projects with session counts and dates
find_patternsDiscover recurring topics, workflows, and issues
get_project_contextFull project context (recent sessions, decisions, knowledge)
cloud_sync_pushPush knowledge and sessions to cloud server
cloud_sync_pullPull knowledge and sessions from cloud server
cloud_sync_statusCheck cloud sync configuration and connection
Comparable tools
Installation
Installation
- Clone and build the server:
git clone https://github.com/jhammant/ClaudeHistoryMCP.git
cd ClaudeHistoryMCP
npm install
npm run build- Build the search index:
npm run build-index- Register the MCP server with Claude:
claude mcp add claude-history -- node "/path/to/ClaudeHistoryMCP/dist/index.js"- Install the session-start hook (optional):
npm run install-hook- Add to your global CLAUDE.md (recommended):
## Claude History MCP
When the `claude-history` MCP is available, use it proactively:
- **Session start**: Use `get_project_context` to check for prior decisions, patterns, and recent session summaries
- **Debugging**: Use `find_solutions` to search history for past fixes before starting from scratchFAQ
- Does this work with all Claude Code conversations?
- Yes, it indexes all JSONL conversation files stored in ~/.claude/projects/
- How large can the history database be?
- Tests show ~9s index build time for ~170 sessions, with searches <200ms
- Can I sync knowledge across devices?
- Yes, using the optional cloud sync feature with ClaudeHistory Cloud
Compare ClaudeHistoryMCP with
Last updated · Auto-generated from public README + GitHub signals.