claude-history-mcp
Enables full-text search and browsing of Claude.ai conversation history by ingesting exported conversations into a local SQLite database with FTS5 indexes.
README
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+
- uv
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.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Available MCP Tools
| Tool | Description |
|---|---|
search_history |
Full-text search across all messages. Supports FTS5 syntax (AND, OR, NOT, "phrases"). Optional topic filter. |
get_conversation_messages |
Get full conversation content with pagination (20 messages per page). |
list_all_topics |
List topic categories with conversation and message counts. |
browse_conversations |
Browse conversations by topic, sorted by date or size. |
conversation_summary |
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.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.