Claude Code 历史 MCP 服务器 logo

Claude Code 历史 MCP 服务器

Community
yudppp

An MCP server for retrieving and analyzing Claude Code conversation history with smart filtering and pagination.

Publisheryudppp
Repositoryclaude-code-history-mcp
LanguageTypeScript
Forks
4
Stars
11
Available tools
4
Transport typestdio
Categories
Links
  • Connect tools to AI workflows

    Claude Code 历史 MCP 服务器 exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 4 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    11 stars and 4 forks from the linked repository.

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 project
  • startDate (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) and offset for efficient data handling
  • Message Filtering: messageTypes defaults to ["user"] to reduce data volume
  • Timezone Support: Automatic timezone detection or specify (e.g., "Asia/Tokyo")
  • Date Filtering: Smart date normalization with timezone awareness

Parameters:

  • sessionId (optional): Specific session ID
  • startDate (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:

json
{
  "startDate": "2025-06-30",
  "limit": 50,
  "messageTypes": ["user"],
  "timezone": "Asia/Tokyo"
}

Response includes pagination info:

json
{
  "entries": [...],
  "pagination": {
    "total_count": 150,
    "limit": 20,
    "offset": 0,
    "has_more": true
  }
}

4. search_conversations 🔍 Find Specific Content

Search across all conversation content by keywords with advanced filtering.

Parameters:

  • query (required): Search terms
  • limit (optional): Max results (default: 30)
  • projectPath (optional): Filter by specific project path
  • startDate (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

bash
# Install directly via npx (no local installation needed)
npx claude-code-history-mcp

# Or install globally
npm install -g claude-code-history-mcp

Usage with MCP Clients

Add the following configuration to your MCP client (e.g., Claude Desktop):

json
{
  "mcpServers": {
    "claude-code-history": {
      "command": "npx",
      "args": ["claude-code-history-mcp"]
    }
  }
}

Alternatively, if you have installed the package globally:

json
{
  "mcpServers": {
    "claude-code-history": {
      "command": "claude-code-history-mcp"
    }
  }
}

Recommended Workflow 🚀

1. Explore Available Data

json
// Start with list_projects to see what's available
{"tool": "list_projects"}

2. Find Relevant Sessions

json
// List sessions for a specific project or date range with timezone
{
  "tool": "list_sessions",
  "projectPath": "/Users/yourname/code/my-project",
  "startDate": "2025-06-30",
  "timezone": "Asia/Tokyo"
}

3. Get Targeted Data

json
// Get conversation history with optimal settings
{
  "tool": "get_conversation_history", 
  "sessionId": "specific-session-id",
  "messageTypes": ["user"],  // Only your inputs (default)
  "limit": 50
}

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 volume
  • Full 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_count helps you understand data volume
  • has_more indicates if there's additional data

Use Cases

Daily Work Review

What did I work on today?
  1. list_projects → See active projects
  2. get_conversation_history with today's date and messageTypes: ["user"]

Project Deep Dive

Analyze my recent work on Project X
  1. list_sessions with specific project path
  2. get_conversation_history for relevant sessions
  3. Use pagination to browse through all data

Topic Research

Find all conversations about "API integration" in a specific project
  1. search_conversations with query "API integration", projectPath, and date range
  2. Use results to identify relevant sessions
  3. get_conversation_history for detailed context

Example with advanced filtering:

json
{
  "tool": "search_conversations",
  "query": "API integration",
  "projectPath": "/Users/yourname/code/my-project",
  "startDate": "2025-06-01",
  "endDate": "2025-06-30",
  "timezone": "Asia/Tokyo",
  "limit": 50
}

License

MIT

Installation

TypingMind
{
  "mcpServers": {
    "claude-code-history-mcp": {
      "command": "node",
      "args": [
        "/path/to/claude-code-history-mcp/dist/index.js"
      ]
    }
  }
}

Available Tools

  • list_projects

    List all projects with Claude Code conversation history (start here to explore available data)

  • list_sessions

    List conversation sessions for a project or date range (use after list_projects to find specific sessions)

  • get_conversation_history

    Get paginated conversation history (use after exploring with list_projects/list_sessions for targeted data)

  • search_conversations

    Search through conversation history by content (useful for finding specific topics across all conversations)

Use Claude Code 历史 MCP 服务器 MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Claude Code 历史 MCP 服务器 is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Claude Code 历史 MCP 服务器 as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Claude Code 历史 MCP 服务器 MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "claude-code-history-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "claude-code-history-mcp"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Claude Code 历史 MCP 服务器 MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Claude Code 历史 MCP 服务器 MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Claude Code 历史 MCP 服务器 to help me with this task?
Claude Code 历史 MCP 服务器
Sure. I read it.
Here is what I found using Claude Code 历史 MCP 服务器.

Frequently asked questions

What is the Claude Code 历史 MCP 服务器 MCP server used for?

Claude Code 历史 MCP 服务器 is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Claude Code 历史 MCP 服务器 MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Claude Code 历史 MCP 服务器 with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Claude Code 历史 MCP 服务器 MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Claude Code 历史 MCP 服务器 connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Claude Code 历史 MCP 服务器 MCP to TypingMind?

Claude Code 历史 MCP 服务器 runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Claude Code 历史 MCP 服务器 MCP provide in TypingMind?

Claude Code 历史 MCP 服务器 exposes 4 MCP tools that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Claude Code 历史 MCP 服务器 MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Claude Code 历史 MCP 服务器 requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇