Claude History
MCP server for searching and surfacing Claude Code conversation history
What is Claude History?
Claude History is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp server for searching and surfacing claude code conversation history
MCP server for searching and surfacing Claude Code conversation history
This server falls under the Knowledge & Memory and Developer Tools categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- MCP server for searching and surfacing Claude Code conversat
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx claudehistorymcpConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Claude History
Claude History MCP is a TypeScript MCP server that indexes and searches your Claude Code conversation history stored in ~/.claude/projects/, giving your AI assistant the ability to retrieve past solutions, find recurring patterns, summarize previous sessions, and inject relevant historical context into new conversations. It exposes nine tools covering full-text search with filter syntax, error resolution lookup, project listing, pattern discovery, and optional cloud sync — making it practical for developers who want their AI assistant to remember and build on previous work rather than starting from scratch each session.
Prerequisites
- Node.js with npm installed
- Claude Code installed with existing conversation history in ~/.claude/projects/
- Git (for cloning the repository)
- Optional: a cloud storage account and API key if using the cloud sync features (CLAUDE_HISTORY_API_URL and CLAUDE_HISTORY_API_KEY)
- An MCP-compatible client — Claude Code is the primary supported client
Clone and install dependencies
Clone the ClaudeHistoryMCP repository and install the Node.js dependencies.
git clone https://github.com/jhammant/ClaudeHistoryMCP.git
cd ClaudeHistoryMCP
npm installBuild the project and index your history
Compile the TypeScript source and build the search index from your Claude Code conversation history.
npm run build
npm run build-indexAdd the server to Claude Code
Register the MCP server with Claude Code, pointing to the compiled index.js file. Replace the path with your actual installation directory.
claude mcp add claude-history -- node "/path/to/ClaudeHistoryMCP/dist/index.js"Install the post-session hook (optional)
Install the session hook to automatically update the search index after each Claude Code session completes.
npm run install-hookConfigure cloud sync (optional)
If you want to sync history across machines, set the cloud storage environment variables in your MCP client configuration.
{
"mcpServers": {
"claude-history": {
"command": "node",
"args": ["/path/to/ClaudeHistoryMCP/dist/index.js"],
"env": {
"CLAUDE_HISTORY_API_URL": "https://your-server.com",
"CLAUDE_HISTORY_API_KEY": "your-api-key",
"CLAUDE_HISTORY_TEAM_ID": "optional-team-uuid"
}
}
}
}Claude History Examples
Client configuration
Claude Desktop config for the Claude History MCP server (basic, no cloud sync).
{
"mcpServers": {
"claude-history": {
"command": "node",
"args": ["/path/to/ClaudeHistoryMCP/dist/index.js"]
}
}
}Prompts to try
Example requests once the Claude History MCP server is connected.
- "Search my conversation history for how I solved the Docker network ECONNREFUSED error"
- "Find all sessions where I worked on authentication and used the Bash tool"
- "What patterns appear most often in my Claude Code sessions this month?"
- "Summarize the session where I built the payment integration last week"
- "List all my projects and show me which ones I've worked on most recently"
- "Search my history for any TypeScript generics issues I've solved: project:myapp after:2024-01-01"Troubleshooting Claude History
Search returns no results even though conversation history exists
The search index must be built before the server can find anything. Run 'npm run build-index' in the ClaudeHistoryMCP directory to generate the index from your ~/.claude/projects/ history. If you installed the post-session hook, the index updates automatically going forward.
Server fails to start with 'Cannot find module' or path errors
Ensure you ran 'npm run build' to compile TypeScript before starting the server. The dist/index.js file must exist. Also verify the absolute path in your MCP client config matches the actual location where you cloned the repository.
Cloud sync push/pull fails with authentication errors
Verify that CLAUDE_HISTORY_API_URL and CLAUDE_HISTORY_API_KEY are correctly set in your MCP client config env block. The API URL must be a full URL including protocol (https://). Check that your cloud storage server is running and accessible from your machine.
Frequently Asked Questions about Claude History
What is Claude History?
Claude History is a Model Context Protocol (MCP) server that mcp server for searching and surfacing claude code conversation history It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Claude History?
Follow the installation instructions on the Claude History GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Claude History?
Claude History works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Claude History free to use?
Yes, Claude History is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Claude History Alternatives — Similar Knowledge & Memory Servers
Looking for alternatives to Claude History? Here are other popular knowledge & memory servers you can use with Claude, Cursor, and VS Code.
MemPalace
★ 52.6kA local AI memory system that stores all conversations verbatim and organizes them into navigable structures. It provides 19 MCP tools for AI assistants to search and retrieve past decisions, debugging sessions, and architecture debates automatically
Kratos
★ 25.7k🏛️ Memory System for AI Coding Tools - Never explain your codebase again. MCP server with perfect project isolation, 95.8% context accuracy, and the Four Pillars Framework.
Context Mode
★ 15.4kAn MCP server that preserves LLM context by intercepting large data outputs and returning only concise summaries or relevant sections. It enables efficient sandboxed code execution, file processing, and documentation indexing across multiple programm
Memu
★ 13.7kMemory for 24/7 proactive agents like OpenClaw.
MemOS
★ 9.3kMemOS (Memory Operating System) is a memory management operating system designed for AI applications. Its goal is: to enable your AI system to have long-term memory like a human, not only remembering what users have said but also actively invoking, u
Everos
★ 5.4kBuild, evaluate, and integrate long-term memory for self-evolving agents.
Browse More Knowledge & Memory MCP Servers
Explore all knowledge & memory servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Claude History in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Claude History?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.