tim0120

Claude Code History MCP

Community tim0120
Updated

MCP server for searching Claude Code conversation history with AI-powered summaries

Claude Code History MCP

๐Ÿค– Built with Claude Code - This entire project was created through pair programming with Claude Code, demonstrating its capability to build tools that enhance its own functionality!

Search and reference your Claude Code conversation history directly from Claude!

Features

  • ๐Ÿ” Full-text search across all your Claude Code conversations
  • ๐Ÿ“ View complete conversations with context
  • ๐Ÿท๏ธ Browse by project to see all your work
  • โšก Fast keyword search using SQLite FTS5

Installation

  1. Clone this repository:
git clone https://github.com/tim0120/claude-code-history-mcp.git
cd claude-code-history-mcp
  1. Install dependencies and build:
npm install
npm run build
  1. Add to your Claude Code MCP settings (~/.claude/claude_desktop_config.json):
{
  "mcpServers": {
    "claude-history": {
      "command": "node",
      "args": ["/path/to/claude-code-history-mcp/dist/index.js"]
    }
  }
}
  1. Restart Claude Code

Usage

First Time Setup

When you first use the MCP, you need to index your existing conversations:

Use the tool: index_conversations

This will scan your ~/.claude/projects directory and index all conversations.

Searching Your History

Search for specific errors, code patterns, or topics:

Use the tool: search_history with query: "CORS error"
Use the tool: search_history with query: "database connection"
Use the tool: search_history with query: "TypeError"

Getting Full Conversation Details

After searching, you can get the full conversation:

Use the tool: get_conversation with conversationId: "abc123"

Listing All Projects

See all your indexed projects:

Use the tool: list_projects

How It Works

The MCP:

  1. Reads your Claude Code conversation history from ~/.claude/projects
  2. Indexes conversations in a local SQLite database
  3. Provides full-text search capabilities
  4. Returns relevant snippets and full conversation details

Data Storage

  • Database location: ~/.claude-code-mcp/history.db
  • No data is sent to external services
  • Your conversation history stays local

Roadmap (v2)

  • Semantic search using embeddings
  • Auto-indexing with file watcher
  • Conversation summarization with GPT-4
  • Export/import functionality
  • Search filters (date, project, success/failure)

Contributing

Contributions welcome! Please feel free to submit issues and PRs.

License

MIT

MCP Server ยท Populars

MCP Server ยท New

    respawn-llc

    tool-filter-mcp

    MCP proxy server that filters tools from upstream MCP servers via regex-based deny list

    Community respawn-llc
    Kaelio

    ktx-ai-data-agents-context

    ktx is an executable context layer for data and analytics agents ๐Ÿ™ Allow Claude Code, Codex, and any AI agent to query data accurately through MCP with skills, memory and a semantic layer

    Community Kaelio
    bergside

    TypeUI - Build better UI with AI

    Build better UI with Codex, Claude, Cursor and other AI tools

    Community bergside
    Regsorm

    code-index-mcp

    Rust-native code index MCP server with first-class 1C:Enterprise (BSL) support. Static binary, no runtime. 25 tools โ€” 18 universal + 7 BSL-specific. Tree-sitter AST for 10 languages. Federation across multiple repos. Built for production-scale monorepos.

    Community Regsorm
    chirikuuka

    MLIT Geospatial MCP Server

    MCP Server

    Community chirikuuka