claude-history-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@claude-history-mcp search my history for conversations about Python"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
claude-history-mcp
MCP server that makes your Claude conversation history searchable. Export your conversations from claude.ai, ingest them into a local SQLite database with full-text search, and query them from Claude Code or Claude Desktop.
Prerequisites
Python 3.11+
Related MCP server: ClaudeX
Setup
1. Export your Claude history
Go to claude.ai → Settings → Export Data. You'll receive an email with a download link containing a folder with conversations.json.
2. Clone and ingest
git clone https://github.com/fifeek0/claude-history-mcp.git
cd claude-history-mcp
# Ingest exported conversations into a local SQLite database
uv run python -m claude_history.ingest /path/to/exported/data/This creates history.db in the project root with FTS5 full-text search indexes.
3. Configure as MCP server
Claude Code
Add to ~/.claude/.mcp.json:
{
"mcpServers": {
"claude-history": {
"command": "uv",
"args": ["run", "--directory", "/absolute/path/to/claude-history-mcp", "python", "-m", "claude_history"]
}
}
}Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"claude-history": {
"command": "uv",
"args": ["run", "--directory", "/absolute/path/to/claude-history-mcp", "python", "-m", "claude_history"]
}
}
}Config file location:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Available MCP Tools
Tool | Description |
| Full-text search across all messages. Supports FTS5 syntax ( |
| Get full conversation content with pagination (20 messages per page). |
| List topic categories with conversation and message counts. |
| Browse conversations by topic, sorted by date or size. |
| Quick overview: stats, first and last human message. |
Customizing Topic Classification
Topics are assigned by keyword matching during ingestion. Edit src/claude_history/classify.py to customize the TOPIC_RULES dictionary:
TOPIC_RULES = {
"Your Topic": ["keyword1", "keyword2", ...],
...
}After editing, re-run the ingest command to reclassify all conversations.
Re-ingesting
Running ingest again deletes the existing database and rebuilds it from scratch — safe to re-run after a fresh export or after changing classification rules.
Available Tools
5 toolsbrowse_conversationsB
Browse conversations by topic and/or date.
Args: topic: Optional topic filter sort_by: "date" (newest first) or "size" (largest first) limit: Max results (default 20)
Inputs: limit, topic, sort_by. Returns: result
conversation_summaryC
Get a quick overview of a conversation: stats, first and last human message.
Args: uuid: Conversation UUID
Inputs: uuid (required). Returns: result
get_conversation_messagesB
Get full conversation content with pagination (20 messages per page).
Args: uuid: Conversation UUID page: Page number (default 1)
Returns conversation metadata and messages for the requested page.
Inputs: uuid (required), page. Returns: result
list_all_topicsA
List all conversation topic categories with counts.
Returns topic names, conversation counts, and total message counts.
Inputs: no named parameters. Returns: result
search_historyA
Search across all Claude conversation messages using full-text search.
Args: query: Search query (supports FTS5 syntax: AND, OR, NOT, "phrases") topic: Optional topic filter (ERP/NAV, AI/ML, DevOps, Business/EVORA, Development, Hackathon, Personal, Other) limit: Max results (default 10)
Returns matching conversations with text snippets showing where the match occurred.
Inputs: query (required), limit, topic. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool targets a distinct operation: listing topics, browsing conversations, summarizing a conversation, searching messages, and fetching full messages. The uuid-based summary and full-message tools are clearly differentiated by scope.
Mostly snake_case with verb_noun pattern (browse_conversations, search_history, get_conversation_messages), but conversation_summary is a noun phrase and list_all_topics inserts 'all', creating minor inconsistency.
Five tools is a well-scoped, focused set for a read-only conversation history server; no tool feels redundant and the count matches the domain.
Core read operations (topics, browse, summary, search, full messages) are covered, but browse_conversations lacks pagination offset and a date filter despite the description, leaving minor gaps.
Maintenance
Related MCP Connectors
Your WhatsApp history in Claude and ChatGPT: search years of chats, voice notes transcribed.
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Your own computer's files from ChatGPT or Claude: folder rules, confirmations and undo.
Swiss encrypted cloud drive for Claude, ChatGPT and AI agents: search, read and save files.
Related MCP Servers
- -licenseNot gradedqualityNot gradedmaintenanceEnables comprehensive search and analysis of Claude Code conversation history using full-text search, optional semantic vector search, and conversation management tools. Provides fast SQLite-based indexing with role-based filtering, project organization, and hybrid search capabilities combining keyword and semantic matching.-
- AlicenseAqualityDmaintenancePersistent memory + FTS5 full-text search for Claude Code conversation history. Indexes ~/.claude/projects/ JSONL into SQLite, exposes 10 MCP tools (store/recall/search memories, browse sessions, get summaries) plus prompts. Includes a web UI for visual exploration10102 npm97MIT
- AlicenseNot gradedqualityDmaintenanceEnables Claude to search through its own past sessions using full-text search and resume them. Works offline with zero runtime dependencies.MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude to full-text search, list, and read your exported ChatGPT and Claude conversations from a local conversations.json file, running locally with read-only file access and no network requests. Supports both official export formats with automatic detection.MIT