Claude Code History MCP
Click on "Install 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 Code History MCPsearch history for 'CORS error'"
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 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
Related MCP server: mcp-sessions
Installation
Clone this repository:
git clone https://github.com/tim0120/claude-code-history-mcp.git
cd claude-code-history-mcpInstall dependencies and build:
npm install
npm run buildAdd 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"]
}
}
}Restart Claude Code
Usage
First Time Setup
When you first use the MCP, you need to index your existing conversations:
Use the tool: index_conversationsThis 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_projectsHow It Works
The MCP:
Reads your Claude Code conversation history from
~/.claude/projectsIndexes conversations in a local SQLite database
Provides full-text search capabilities
Returns relevant snippets and full conversation details
Data Storage
Database location:
~/.claude-code-mcp/history.dbNo 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
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityAmaintenanceEnables searching and retrieving Claude Code conversation history that would otherwise expire after 30 days. Supports full-text search, semantic search, and session management with automatic backup of all conversations.Last updated1828MIT
- Alicense-qualityCmaintenanceSearch and browse Claude Code conversation history across all your projects.Last updated1MIT
- AlicenseAqualityDmaintenanceEnables Claude Code to search, browse, and read its own past conversation history across all projects using BM25 keyword search.Last updated117MIT
- Alicense-qualityDmaintenanceEnables searching and browsing past Claude Code conversations directly from within an active Claude session, with full-text search and cost tracking.Last updatedMIT
Related MCP Connectors
Persistent context for Claude. Your AI always knows your projects and next actions across sessions.
Search and read your Laxis meeting transcripts, AI summaries, and participants from Claude.
Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tim0120/claude-code-history-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server