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 MCP Serversearch my recent sessions for 'OAuth implementation'"
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 Server
An MCP server for retrieving and analyzing Claude Code conversation history with smart filtering and pagination.
Features
This MCP server provides 4 powerful tools for exploring your Claude Code conversation history:
1. list_projects 👀 Start Here
Discover all projects with Claude Code conversation history.
Why use this first: Get an overview of all available data before diving deeper.
Returns: Project paths, session counts, message counts, and last activity time.
2. list_sessions 📁 Explore Sessions
List conversation sessions for exploration and filtering.
Parameters:
projectPath(optional): Filter by specific projectstartDate(optional): Start date (e.g., "2025-06-30")endDate(optional): End date (e.g., "2025-06-30")timezone(optional): Timezone for date filtering (e.g., "Asia/Tokyo", "UTC")
Returns: Session IDs, timestamps, message counts, and project paths.
3. get_conversation_history 💬 Get Detailed Data
Retrieve paginated conversation history with smart filtering.
Key Features:
Pagination:
limit(default: 20) andoffsetfor efficient data handlingMessage Filtering:
messageTypesdefaults to["user"]to reduce data volumeTimezone Support: Automatic timezone detection or specify (e.g., "Asia/Tokyo")
Date Filtering: Smart date normalization with timezone awareness
Parameters:
sessionId(optional): Specific session IDstartDate(optional): Start date (e.g., "2025-06-30")endDate(optional): End date (e.g., "2025-06-30")limit(optional): Max entries per page (default: 20)offset(optional): Skip entries for pagination (default: 0)messageTypes(optional):["user"](default),["user", "assistant"], etc.timezone(optional): e.g., "Asia/Tokyo", "UTC" (auto-detected)
Example:
Response includes pagination info:
4. search_conversations 🔍 Find Specific Content
Search across all conversation content by keywords with advanced filtering.
Parameters:
query(required): Search termslimit(optional): Max results (default: 30)projectPath(optional): Filter by specific project pathstartDate(optional): Start date (e.g., "2025-06-30")endDate(optional): End date (e.g., "2025-06-30")timezone(optional): Timezone for date filtering (e.g., "Asia/Tokyo", "UTC")
Quick Start
Usage with MCP Clients
Add the following configuration to your MCP client (e.g., Claude Desktop):
Alternatively, if you have installed the package globally:
Recommended Workflow 🚀
1. Explore Available Data
2. Find Relevant Sessions
3. Get Targeted Data
Data Source
This server reads Claude Code history files (.jsonl format) stored in ~/.claude/projects/.
Smart Features 💡
Message Type Filtering
Default: Only
["user"]messages to reduce data volumeFull conversation: Use
["user", "assistant"]Everything: Use
["user", "assistant", "system", "result"]
Timezone Intelligence
Automatically detects your system timezone
Supports explicit timezone specification (e.g., "Asia/Tokyo")
Smart date normalization (e.g., "2025-06-30" → proper timezone bounds)
Pagination Support
Efficient handling of large datasets
total_counthelps you understand data volumehas_moreindicates if there's additional data
Use Cases
Daily Work Review
list_projects→ See active projectsget_conversation_historywith today's date andmessageTypes: ["user"]
Project Deep Dive
list_sessionswith specific project pathget_conversation_historyfor relevant sessionsUse pagination to browse through all data
Topic Research
search_conversationswith query "API integration", projectPath, and date rangeUse results to identify relevant sessions
get_conversation_historyfor detailed context
Example with advanced filtering:
License
MIT