An MCP server that makes your Claude Code conversation history searchable and proactively useful. Indexes all past sessions with hybrid BM25 + TF-IDF search, extracts knowledge (decisions, solutions, error fixes), and auto-injects project context at session start.
What it does
Claude Code stores full conversation transcripts as JSONL files in . This MCP server indexes them and provides 6 tools:
MCP server for searching and surfacing Claude Code conversation history
स्टार
67
टूल
—
अपटाइम
—
~/.claude/projects/
Tool
Purpose
search_history
Full-text search across all conversations with filter syntax
find_solutions
Find how you fixed errors/problems before
get_session_summary
Structured summary of any session
list_projects
List all projects with session counts and dates
find_patterns
Discover recurring topics, workflows, and issues
get_project_context
Full project context (recent sessions, decisions, knowledge)
git clone https://github.com/jhammant/ClaudeHistoryMCP.git
cd ClaudeHistoryMCP
npm install
npm run build
1. Build the search index
npm run build-index
This parses all your Claude Code conversation history and builds the search index. Takes ~10 seconds for ~170 sessions.
2. Register the MCP server
claude mcp add claude-history -- node "/path/to/ClaudeHistoryMCP/dist/index.js"
3. Install the session-start hook and skill (optional)
npm run install-hook
This registers a SessionStart hook in ~/.claude/settings.json that auto-injects project context, and installs the /claude-history skill.
4. Add to your CLAUDE.md (recommended)
Add the following to your global ~/.claude/CLAUDE.md to ensure Claude proactively uses history tools:
## 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 for the current project
- **Debugging**: Use `find_solutions` to search history for past fixes before starting from scratch
- **Context questions**: When the user asks "have we done X before", "what did we decide", or similar — use `search_history` to find relevant past conversations
- **Patterns**: Use `find_patterns` to identify recurring workflows or issues when relevant
Without this, Claude has access to the tools but may not always think to reach for them.
5. Configure cloud sync (optional)
To sync knowledge across devices or share with a team, set up ClaudeHistory Cloud:
export CLAUDE_HISTORY_API_URL=https://your-server.com
export CLAUDE_HISTORY_API_KEY=your-api-key
export CLAUDE_HISTORY_TEAM_ID=optional-team-uuid # for team sync
Then use the cloud_sync_push and cloud_sync_pull tools to sync.
Usage
Via MCP tools (automatic)
Once registered, Claude Code can use the tools directly:
User: "Have I dealt with this ECONNREFUSED error before?"
Claude: [calls find_solutions with "ECONNREFUSED"]
→ Shows past solutions from your history
Via the /claude-history skill
/claude-history docker network error # General search
/claude-history --solutions ECONNREFUSED # Find past error fixes
/claude-history --summary # Summarize last session
/claude-history --patterns # Discover recurring patterns
/claude-history --context # Get full project context
/claude-history --projects # List all projects
project:name — filter to a project (partial match)
before:date / after:date — date filter (ISO or relative: 7d, 1w, 1m, 1y)
tool:name — filter to sessions using a specific tool
Session-start hook
When you start a new Claude Code session, the hook automatically outputs:
[ClaudeHistory] Previous context for myproject:
- Last session (2 days ago): Fixed Docker networking — switched to host networking
- Key decision: Use systemd timer instead of cron for scheduling
- Solution found: CORS issue resolved by adding proxy config
Porter stemmer and stop words are implemented inline.
Development
npm run dev # Run with tsx (no build needed)
npm run build # Compile TypeScript
npm test # Run tests
npm run test:watch # Watch mode
npm run build-index # Rebuild the search index
License
MIT
C
ClaudeHistoryMCP
jhammant·67 स्टार·
MCP server for searching and surfacing Claude Code conversation history
अभी टूल सूची नहीं है। रिमोट सर्वर को पहले हेल्थ चेक के बाद सूची मिलती है।
FAQ
सवाल
ClaudeHistoryMCP कैसे इंस्टॉल करें?
इस पेज पर Cursor, Claude Desktop, Claude Code या VS Code के लिए stdio कॉन्फ़िग कॉपी करें। यह पब्लिशर का इंस्टॉल इस्तेमाल करता है, PlugMCP प्रॉक्सी नहीं।
क्या ClaudeHistoryMCP के लिए API key चाहिए?
इस रिकॉर्ड में कोई ज़रूरी एनवायरनमेंट वेरिएबल दर्ज नहीं है।
ClaudeHistoryMCP कौन सा ट्रांसपोर्ट इस्तेमाल करता है?
ClaudeHistoryMCP stdio पर लोकल चलता है।
ClaudeHistoryMCP की पिछली जाँच कब हुई थी?
पिछली जाँच 2026-10-27 को हुई। MCP server for searching and surfacing Claude Code conversation history