Claude HistoryBLOCK
MCP server for searching and surfacing Claude Code conversation history
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
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 ~/.claude/projects/. This MCP server indexes them and provides 6 tools:
Key features
- Hybrid search: BM25 (keyword precision) + TF-IDF (semantic recall) fused with Reciprocal Rank Fusion
- Filter syntax:
project:name,before:7d,after:2024-01-15,tool:Bash - Knowledge extraction: Automatically extracts decisions, solutions, and error→fix patterns from conversations
- Proactive context: Session-start hook injects relevant project history into new sessions
- Incremental indexing: File watcher detects new/changed sessions and re-indexes automatically
- Fast: Index build ~9s for 170 sessions, searches <200ms
How it works
┌──────────────────────────────────────────────────────┐ │ ClaudeHistoryMCP │ ├──────────────┬───────────────┬───────────────────────┤ │ MCP Server │ /claude-history │ SessionStart Hook │ │ (6 tools) │ Skill
200fd4ef0952OBSERVED · 2026-10-07Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add claude-history-mcp --env CLAUDE_HISTORY_API_KEY=${CLAUDE_HISTORY_API_KEY} -- npx -y [email protected]{
"mcpServers": {
"claude-history-mcp": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"CLAUDE_HISTORY_API_KEY": "${CLAUDE_HISTORY_API_KEY}"
}
}
}
}Exposed tools (9)
6 read · 3 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
cloud_sync_pull | write | Pull knowledge entries and session summaries from the cloud server. Merges with local data without duplicates. |
cloud_sync_push | write | Push local knowledge entries and session summaries to the cloud server. Only pushes entries newer than the last sync. |
cloud_sync_status | write | Check cloud sync configuration and connection status. Shows whether sync is configured, last sync times, and connection health. |
find_patterns | read | Discover recurring patterns in conversation history: common topics, frequent workflows, repeated issues. |
find_solutions | read | Search past conversations for solutions to errors or problems. Prioritizes results containing fix/resolution language. |
get_project_context | read | Get comprehensive context for a project: recent sessions, key topics, common tools, and patterns. Useful for session-start context injection. |
get_session_summary | read | Get a structured summary of a conversation session. Provide either a session ID or project name (returns most recent session). |
list_projects | read | List all projects that have Claude Code conversation history, with session counts and activity dates. |
search_history | read | Search past Claude Code conversations. Supports filter syntax: project:name, before:date, after:date, tool:name. Dates can be relative (7d, 30d, 1w) or ISO (2024-01-15). |
Trust audit
BLOCKgrade D · trust 69/100 Do not install this without reading the findings. The audit found something that could harm you or your machine.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | FAIL |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- declared (1 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (7)
Push local knowledge entries and session summaries to the cloud server. Only pushes entries newer than the last sync.
import { BM25Index } from "../../src/indexing/bm25.js";import { TFIDFIndex } from "../../src/indexing/tfidf.js";import { tokenize, termFrequency } from "../../src/indexing/tokenizer.js";import { IndexManager } from "../../src/indexing/index-manager.js";import { SearchEngine } from "../../src/search/search-engine.js";@modelcontextprotocol/sdk, msgpackr, zod, @types/node, tsx, typescript, vitest
Gates applied: critical_finding, no_behavioural_pass, undeclared_transfer.
200fd4ef0952full audit observations/trust-audit/mcp-server/jhammant__claude-history.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-07 | 200fd4ef0952 | BLOCK | D | 69 | first audit |
Questions
What is the Claude History MCP server?
MCP server for searching and surfacing Claude Code conversation history
What tools does Claude History expose?
9 in total: 6 read-only, 3 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Claude History safe to connect to an agent?
No — not without reading the findings first. The audit graded it D (69/100) and found 1 critical or high issue in the source. Each one is listed on this page with the file and line it is on.
What credentials does Claude History need?
It reads CLAUDE_HISTORY_API_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Claude History run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as claude-history-mcp at 0.1.0.
How current is this page?
The grade is for one exact copy of the source (200fd4ef0952), read on 2026-10-07. The repository is watched and re-audited when it changes.