AgentStack
MCP verified MIT Self-run

Claude Historian Mcp

mcp-vvkmnn-claude-historian-mcp Β· by Vvkmnn

πŸ“œ An MCP server for conversation history search and retrieval in Claude Code

β€” No reviews yet
0 installs
8 views
0.0% view→install

Install

$ agentstack add mcp-vvkmnn-claude-historian-mcp

βœ“ scanned Β· βœ“ verified β€” works with Claude Code, Cursor, and more.

Security review

βœ“ Passed

No issues found. Passed automated security review. Β· v0.1.0 How review works β†’

  • βœ“ Prompt-injection patterns
  • βœ“ Secret / credential exfiltration
  • βœ“ Dangerous shell & filesystem operations
  • βœ“ Untrusted network calls
  • βœ“ Known-malicious package signatures

What it can access

  • βœ“ Network access No
  • βœ“ Filesystem access No
  • βœ“ Shell / process execution No
  • βœ“ Environment & secrets No
  • βœ“ Dynamic code execution No

From automated source analysis of v0.1.0. β€œUsed” means the capability is present in the source β€” more access means more to trust, not that it’s unsafe.

Are you the author of Claude Historian Mcp? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

claude-historian-mcp

An Model Context Protocol (MCP) server for searching your Claude Code conversation history. Find past solutions, track file changes, and learn from previous work.

[](https://www.npmjs.com/package/claude-historian-mcp) [](https://opensource.org/licenses/MIT) [](https://www.typescriptlang.org/) [](https://nodejs.org/) [](#) [](https://github.com/Vvkmnn/claude-historian-mcp)


install

Requirements:

[](https://claude.ai/code)

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-historian to claude-historian-mcp. Existing users should update your install command and MCP config args to claude-historian-mcp.

[skill](.claude/skills/claude-historian)

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.

plugin

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):

  • Before WebSearch/WebFetch β†’ Check search scope="similar"
  • Before EnterPlanMode β†’ Check search scope="plans"
  • Before Task agents β†’ Check search scope="tools"
  • After Bash errors β†’ Check search scope="errors"

Command: /historian-search

Requires the MCP server installed first. See the emporium for other Claude Code plugins and MCPs.

features

MCP server that gives Claude access to your conversation history. Two tools, 11 scopes, zero dependencies.

Runs locally (with cool shades [βŒβ– _β– ] πŸ“œ):

search

Search 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"
  }]
}
inspect

Get 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"]
  }
}

methodology

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:

Search strategies:

Design principles:

  • Universal engine -- single search backend for all Claude Code conversations
  • Parallel processing -- concurrent file scanning across session directories
  • Semantic expansion -- query synonyms and related terms for better recall
  • Zero dependencies -- only @modelcontextprotocol/sdk, no databases required
  • Offline -- never leaves your machine, scans local JSONL files only

File access:

  • Reads from: ~/.claude/conversations/
  • Zero persistent storage or indexing
  • Never leaves your machine

Performance: See [PERFORMANCE.md](./PERFORMANCE.md) for benchmarks, optimization history, and quality scores.

alternatives

Every conversation history tool either loads context always (burning tokens when unused) or requires external runtimes and databases. Historian searches on-demand with zero dependencies.

| Feature | historian | Claude Memory | claude-mem | deja | conversation-search | | ----------------------- | ----------------------- | ----------------------- | -------------------------------- | ------------------- | ---------------------------- | | Dependencies | Zero | Built-in | Bun + Python + SQLite + Chroma | Python | Rust toolchain | | Background service | No | No | Yes (port 37777) | No | No | | Writes to disk | Never | Yes (auto-memory files) | Yes (SQLite + Chroma DB) | Yes (breadcrumbs) | Yes (~10% index overhead) | | Session startup | 0 tokens | ~200 lines loaded | 5-8k tokens every session | Skill prompt loaded | 0 tokens | | Token cost (idle) | 0 | 200 lines/session | 5-8k/session | Skill prompt/session| 0 | | Search algorithms | [12](#methodology) | None (file read) | Vector + keyword | Weighted signals | BM25 full-text | | Fuzzy matching | Yes | No | Yes (vector similarity) | No | No | | Workflow detection | Yes | No | No | No | No | | Raw conversations | Yes | No (summaries only) | No (compressed observations) | Yes | Yes (filtered) | | Maintenance | Zero | Zero | Worker daemons, migrations | Skill config | Index rebuilds |

Claude Memory -- Claude's built-in memory (CLAUDE.md + auto-memory). Persists project rules and preferences across sessions. Forward-looking ("always use ESM imports"); not conversation search. Complementary: memory for rules, historian for past solutions.

claude-mem -- Plugin that captures observations via lifecycle hooks, compresses them into SQLite + Chroma, and loads context every session. Requires Bun, Python, and a background worker on port 37777. Real-world testing (270+ sessions): 95% of sessions never query history -- always-on tools pay 5-8k tokens per session regardless. Historian pays 0 tokens idle, 500-2k per query, saving ~475k tokens over 100 sessions. Known issues: creates stub session files that break --continue, worker daemon version conflicts, security hooks blocking valid edits.

deja -- Python skill that indexes sessions by episodes and accomplishments. Uses weighted signal ranking (todos > files > text). Requires Python and TodoWrite integration.

conversation-search -- Rust MCP server using Tantivy BM25 full-text search. Fast indexing (~1000 conversations/second) but requires Rust toolchain and persistent disk index.

desktop

Note: Claude Desktop stores conversations server-side, not locally. The local LevelDB files (~/Library/Application Support/Claude/) contain only session tokens, UI preferences, and Intercom state - not conversation content. Claude Desktop support is also blocked by LevelDB locks and Electron sandboxing.

This means local history search for Claude Desktop is not currently possible. This project focuses on Claude Code, which stores full conversation history locally in ~/.claude/projects/.

You may get some Claude Desktop from Claude Code, but **o

…

Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source β€” we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet β€” be the first.

Versions

  • v0.1.0 Imported from the upstream source.