Cursor Chat Historyのロゴ

Cursor Chat History

コミュニティ
vltansky

Connect your Cursor conversations to your git history.

公開者vltansky
リポジトリcursor-chat-history-mcp
言語TypeScript
フォーク
10
スター
33
利用可能なツール
8
通信方式stdio
カテゴリ
ライセンスMIT
リンク
  • ツールをAIワークフローに接続

    Cursor Chat Historyは、対応するAIクライアントやAIエージェントから利用できるMCP機能を提供します。

  • 8個の利用可能なツール

    呼び出し可能なアクションを以下で確認できます。サーバーから提供されている場合は、名前や説明も表示されます。

  • コピーして使える設定

    セットアップ用の設定例を使って、お好みのMCPクライアントにこのサーバーを設定できます。

  • オープンソースの注目度

    リンク先のリポジトリには33件のスターと10件のフォークがあります。

Cursor Chat History MCP

Connect your Cursor conversations to your git history.

Why?

You make a commit. Weeks later you wonder: "Why did I write it this way?"

The git message says fix auth bug but the real context - the debugging session, the alternatives considered, the AI suggestions - lives in a Cursor conversation you'll never find again.

This MCP server automatically links your Cursor conversations to git commits. When you revisit code, the AI assistant can pull up the original discussion.

Quick Start

Add to .cursor/mcp.json:

json
{
  "mcpServers": {
    "cursor-chat-history": {
      "command": "npx",
      "args": ["-y", "--package=cursor-chat-history-mcp", "cursor-chat-history-mcp"]
    }
  }
}

That's it. Hooks install automatically on first use.

What You Can Do

Find Context for Code

"What was the context behind commit abc123?"
"Find the conversation that led to this fix"
"Show discussions about auth.ts from the last month"

Search Your Chat History

"Find all debugging sessions about performance"
"Search conversations mentioning useState"
"List recent conversations in this project"

Extract Patterns

"Create TypeScript guidelines from my actual usage"
"Extract error handling patterns from my conversations"
"Summarize my React patterns from chat history"

Available Tools

Git Linker

ToolPurpose
get_file_contextGet conversations and commits related to a file
get_commit_conversationsFind conversations linked to a commit
list_conversation_commitsFind commits linked to a conversation
link_conversation_commitManually link conversation ↔ commit

Chat History

ToolPurpose
list_conversationsBrowse with filters (project, keywords, files)
get_conversationGet full conversation content
search_conversationsMulti-keyword and pattern search
get_conversation_analyticsUsage patterns, file activity, language stats

Privacy

  • 100% local - No external services, no API keys
  • Your data stays on disk - SQLite databases only
  • Open source - Audit the code yourself

How It Works

Hooks are installed automatically when the MCP server starts:

  • Cursor hooks (~/.cursor/hooks.json) - capture file edits and session ends
  • Git post-commit hook (current repo) - link commits to conversations

When you commit, the system finds related conversations using:

  • File overlap (70%): Commits touching files discussed in conversations
  • Recency (30%): Conversations from the last 14 days

Efficient Context Retrieval

Large conversations aren't loaded directly into context. Instead:

  1. Use get_file_context with keywords to find relevant conversations
  2. Call get_conversation - writes to ~/.cursor-chat-history/context/conversations/<id>.md
  3. Use Read/Grep tools to navigate the markdown file efficiently

CLI Commands

bash
# Query links
npx cursor-chat-history-mcp link list-conversation-links --conversation <id>
npx cursor-chat-history-mcp link get-commit-links --hash <commit-hash>

# Manual linking
npx cursor-chat-history-mcp link manual --conversation <id> --commit <hash>

Database Locations

DatabasemacOSWindowsLinux
Cursor chats~/Library/Application Support/Cursor/User/globalStorage/state.vscdb%APPDATA%/Cursor/...~/.config/Cursor/...
Git links~/Library/Application Support/CursorChatHistory/links.sqlite%APPDATA%/CursorChatHistory/...~/.local/share/CursorChatHistory/...
Context files~/.cursor-chat-history/context/conversations/samesame

Override with CURSOR_DB_PATH or CURSOR_LINKS_DB_PATH.

Tool Reference

list_conversations

  • limit (default: 10) - Number of results
  • projectPath - Filter by project
  • keywords - Search keywords
  • hasCodeBlocks - Filter by code presence

get_conversation

  • conversationId (required) - Conversation ID
  • summaryOnly - Return summary only (saves context)

search_conversations

  • query - Text search
  • keywords + keywordOperator ('AND'/'OR') - Multi-keyword
  • likePattern - SQL LIKE patterns

get_conversation_analytics

  • scope - 'all', 'recent', 'project'
  • projectPath - Filter by project
  • includeBreakdowns - ['files', 'languages', 'temporal', 'size']

get_file_context

  • filePath (required) - File to get context for
  • keywords - Filter by keywords (e.g., ["JWT", "auth"]) - returns matching excerpts
  • limit - Max results (default: 5)

list_conversation_commits

  • conversationId - Filter by conversation
  • projectPath - Filter by project
  • filePath - Filter by file

get_commit_conversations

  • commitHash (required) - Git commit hash

link_conversation_commit

  • conversationId (required)
  • commitHash (required)
  • confidence - Link confidence (0-1)

Development

bash
git clone https://github.com/vltansky/cursor-chat-history-mcp
cd cursor-chat-history-mcp
yarn install
yarn build

Supported AI Assistants

AssistantStatusNotes
Cursor✅ FullChat, Composer, Agent modes
Claude Code✅ FullVS Code extension
Cline/Roo/Kilo✅ FullJSON task-based storage
Windsurf✅ FullSQLite (same pattern as Cursor)
GitHub Copilot Chat✅ FullVS Code native

Roadmap

  • Knowledge graph extraction - Extract entities and relationships from conversations (learn more)
  • Multi-agent support - Cline, Windsurf, Copilot Chat
  • Quality scoring - Prioritize conversations with solutions
  • Natural time filters - "last week", "yesterday"
  • Topic clustering - Group by detected themes
  • Semantic search - Find similar conversations via embeddings

Technical Notes

  • Supports legacy and modern Cursor conversation formats
  • Uses ROWID for chronological ordering (UUIDs aren't chronological)
  • Close Cursor to avoid database lock issues
  • See docs/SPEC.md for git linker specification

License

MIT

インストール

TypingMind
前提条件:

Node.js 18+

{
  "mcpServers": {
    "cursor-chat-history": {
      "command": "npx",
      "args": [
        "-y",
        "--package=cursor-chat-history-mcp",
        "cursor-chat-history-mcp"
      ]
    }
  }
}

利用可能なツール

  • list_conversations

    Lists Cursor chats with summaries, titles, and metadata ordered by recency. HIGHLY RECOMMENDED: Use projectPath parameter to filter conversations by specific project/codebase - this dramatically improves relevance by finding conversations that actually worked on files in that project. Returns conversation IDs for use with get_conversation tool. WORKFLOW TIP: Start with projectPath filtering for project-specific analysis, then call get_conversation with specific IDs from results. Includes AI-generated summaries by default. Supports date range filtering (YYYY-MM-DD format).

  • get_conversation

    Retrieves the complete content of a specific Cursor conversation including all messages, code blocks, file references, title, and AI summary. WORKFLOW TIP: Use conversation IDs from list_conversations, search_conversations, or analytics breakdowns (files/languages arrays contain conversation IDs). Use summaryOnly=true to get enhanced summary data without full message content when you need to conserve context.

  • search_conversations

    $2e

  • get_conversation_analytics

    Get comprehensive analytics and statistics about Cursor chats including usage patterns, file activity, programming language distribution, and temporal trends. BEST PRACTICE: Use projectPath parameter for project-specific analytics - this analyzes only conversations that worked on files in that project, providing much more relevant insights for understanding coding patterns, file usage, and development activity within a specific codebase. WORKFLOW TIP: Always include "files" and "languages" in breakdowns - these contain conversation IDs in their arrays that you can immediately use with get_conversation tool. Use includeConversationDetails=true when you need the full conversation ID list and basic metadata for follow-up analysis.

  • find_related_conversations

    Find conversations related to a reference conversation based on shared files, folders, programming languages, similar size, or temporal proximity. Use this to discover related discussions, find conversations about the same codebase/project, identify similar problem-solving sessions, or trace the evolution of ideas across multiple conversations.

  • extract_conversation_elements

    Extract specific elements from conversations such as file references, code blocks, programming languages, folder paths, metadata, or conversation structure. Use this to build knowledge bases, analyze code patterns, extract reusable snippets, understand project file usage, or prepare data for further analysis and documentation.

  • export_conversation_data

    Export chat data in various formats (JSON, CSV, Graph) for external analysis, visualization, or integration with other tools. TIP: Use filters.projectPath to export only project-specific conversations for focused analysis of a particular codebase. Use this to create datasets for machine learning, generate reports for stakeholders, prepare data for visualization tools like Gephi or Tableau, or backup chat data in structured formats.

  • get_system_info

    Get system information and utilities for AI assistants. Provides current date, timezone, and other helpful context that AI assistants may not have access to. Use this when you need reference information for date filtering, time-based queries, or other system context.

Cursor Chat HistoryのMCPを複数のAIモデルで活用

TypingMindはワークスペース単位でMCPツールに接続します。そのため、一度Cursor Chat Historyに接続すれば、モデルごとに個別に設定することなく、TypingMind内のさまざまなAIモデルで利用できます。 このMCPは、デバイス上のTypingMind MCPコネクタを通じてローカルで動作します。

ローカルコネクタのセットアップガイド

MCPサーバーが、お使いのコンピューター上のローカルファイル、アプリ、非公開リソースにアクセスする必要がある場合は、この方法を使います。

1

MCP設定を開く

TypingMindで「設定」、「詳細設定」、「MCP」の順に進み、「コネクタを設定」を選択してください。

  1. ブラウザでTypingMindを開いてください。
  2. 設定アイコンをクリックしてください。
  3. 「詳細設定」に移動してください。
  4. 「MCP」セクションを開いてください。
  5. 「コネクタを設定」をクリックし、「このデバイス」を選択してください。
「このデバイス」が選択されたTypingMindのMCPコネクタ設定画面
2

コネクタのコマンドを実行

「このデバイス」を選択し、TypingMindからコマンドをコピーしてターミナルで実行してください。MCPの使用中は、プロセスを実行したままにしてください。

  1. TypingMindに表示されるセットアップコマンドをコピーしてください。
  2. macOSではターミナルを、WindowsではWindows Terminalを開いてください。
  3. コマンドを貼り付けて実行してください。
  4. ターミナルで続行の確認を求められた場合は、パッケージのインストールを承認してください。
  5. MCPツールの使用中は、ターミナルウィンドウを開いたまま、プロセスの実行を継続してください。
3

Cursor Chat Historyをサーバーとして追加

コネクタのステータスが「準備完了」になったら、「サーバーを編集」をクリックし、MCPサーバーの設定を貼り付けてください。

  1. コネクタのステータスが「準備完了」になるまでお待ちください。
  2. 「サーバーを編集」をクリックしてください。
  3. Cursor Chat HistoryのMCPサーバー設定を貼り付けてください。
  4. サーバー一覧を保存してください。
  5. コネクタが引き続き使用可能か確認するには、更新してください。
稼働中のサーバーと「サーバーを編集」ボタンが表示されたTypingMindのMCP設定画面
{
  "mcpServers": {
    "cursor-chat-history": {
      "command": "npx",
      "args": [
        "-y",
        "cursor-chat-history-mcp"
      ]
    }
  }
}
4

複数のモデルで同じ接続を使用

サーバー一覧を保存し、「プラグイン」を開いてCursor Chat HistoryのMCPツールを有効にしてください。その後、TypingMindで対応するAIモデルを選択し、チャットでツールを使うか、AIエージェントに割り当ててください。

  1. TypingMindの「プラグイン」ページを開いてください。
  2. Cursor Chat HistoryのMCPツールを有効にしてください。
  3. チャットを開始し、使用するAIモデルを選択してください。
  4. MCPツールをチャットで使うか、AIエージェントに割り当ててください。
  5. MCPに再接続することなく、必要に応じて別のAIモデルに切り替えられます。
選択したAIモデルと有効なMCPツールを使用したTypingMindのチャット
Cursor Chat Historyを使ってこのタスクを手伝ってもらえますか?
Cursor Chat History
はい、読みました。
Cursor Chat Historyで調べた結果をお伝えします。

よくある質問

Cursor Chat History MCPサーバーは何に使いますか?

Cursor Chat Historyは、対応するAIクライアントを外部ツールやコンテキストに接続するためのMCPサーバーです。TypingMindでは、このMCPサーバーを一度追加するだけで、AIワークスペース内でそのツールを利用できるようになります。

TypingMindでCursor Chat History MCPを複数のAIモデルと併用できますか?

はい。TypingMindはワークスペース単位でMCPツールに接続するため、モデルごとにMCPサーバーを設定する必要はありません。Claude、ChatGPT、Geminiや、TypingMindで設定したその他のAIモデルでCursor Chat Historyを利用できます。

TypingMindでCursor Chat History MCPを使うメリットは何ですか?

TypingMindは、複数のAIモデル、プロンプト、プラグイン、AIエージェント、APIキー、MCPツールを1つのワークスペースにまとめられる、LLMチャット向けの優れたフロントエンドです。Cursor Chat Historyを接続すると、TypingMindでチャットのワークフローを整理しながら、お好みのモデルでそのMCPツールを利用できます。

Cursor Chat History MCPをTypingMindに接続するにはどうすればよいですか?

Cursor Chat HistoryはTypingMindのローカルMCPコネクタ経由で動作します。MCPサーバーがコンピューター上のローカルファイル、デスクトップアプリ、コマンドラインツール、プライベートリソースにアクセスする必要がある場合に最適です。

TypingMindでCursor Chat History MCPのどのようなツールを利用できますか?

Cursor Chat Historyは8個のMCPツールを提供しています。TypingMindのプラグインページで有効にすると、チャットで使用したり、AIエージェントに割り当てたりできます。

Cursor Chat History MCPを使うには、APIキーをTypingMindと共有する必要がありますか?

いいえ。TypingMindはローカルファーストの設計で、モデルプロバイダー、APIキー、プロンプト、MCP設定をご自身で管理できます。Cursor Chat Historyで認証が必要な場合は、接続の作成時に、そのMCPサーバーに必要なヘッダー、OAuth設定、またはローカル設定を追加してください。

関連するMCPサーバー

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇