Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
Your own AI agent, running 24/7 with QwikClaw logoYour own AI agent, running 24/7 with QwikClaw

QwikClaw sets up and runs an always-on OpenClaw agent for you. One click, no config files, no server setup.

Deploy now
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 47,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

Enables full-text search and browsing of Claude.ai conversation history by ingesting exported conversations into a local SQLite database with FTS5 indexes.

README.md

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.

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Databases servers.