
vltansky/cursor-chat-history-mcp
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
コミットを作成します。 先週は「この方法を書くのはなぜ?」と疑問に思います
概要
コミットを作成します。 先週は「この方法を書くのはなぜ?」と疑問に思います。 git メッセージは、auth のバグを修正しましたが、実際のコンテキスト - デバッグセッション、考慮される代替手段、AI の提案 - カーソルの会話に住んで、再び見つけられないでしょう。 この MCP サーバーは、Cursor の会話を git commit に自動的にリンクします。 コードを再訪すると、AIアシスタントは元のディスカッションをプルアップできます。 です。 ホックは最初の使用で自動的に取付けます。 - - 外部サービスなし、APIキーなし - SQLiteデータベースのみ - 自分でコードを監査する MCP サーバーが起動したときに、Hooksは自動的にインストールされます。 - (~/.cursor/hooks.json) - ファイルの編集とセッションの終了 - (現在のリポジトリ) - チャットへのコミットをリンク コミットすると、システムが関連する会話を見つけます: - : 会話で議論されたファイルへのコミット - : 過去14日間会話 大きい会話は直接コンテキストに読み込まれません。 代わりに: 1.
概要(AI 翻訳)
カーソルの会話をあなたのgit履歴に接続します。
なぜ?
コミットを作成します。 あとは不思議な週:「この方法を書くのはなぜ?」
git メッセージは fix auth bug と述べていますが、実際のコンテキスト - デバッグセッション、考慮される代替手段、AI の提案 - カーソルの会話に住んで、あなたは再び見つけられないでしょう。
この MCP サーバーは、Cursor の会話を git commit に自動的にリンクします。 コードを再訪すると、AIアシスタントは元のディスカッションをプルアップできます。
クイックスタート
[.cursor/mcp.jsonに追加します。
です。 ホックは最初の使用で自動的に取付けます。
できること
コードのコンテキストを見つける
###チャット履歴を検索する
抽出パターン
利用可能なツール
###Gitリンカー
| ツール | 目的 |
お問い合わせ
| [get_file_context | ファイルに関連する会話やコミットの取得 |
| [get_commit_conversations | コミットにリンクされた会話を見つける |
| [list_conversation_commits | 会話にリンクされたコミットを探す |
| [link_conversation_commit | 手動リンク会話 ↔ コミット |
##チャット履歴
| ツール | 目的 |
お問い合わせ
| [list_conversations | フィルター(プロジェクト、キーワード、ファイル)のブラウズ |
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
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:
{
"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
| Tool | Purpose |
|---|---|
get_file_context |
Get conversations and commits related to a file |
get_commit_conversations |
Find conversations linked to a commit |
list_conversation_commits |
Find commits linked to a conversation |
link_conversation_commit |
Manually link conversation ↔ commit |
Chat History
| Tool | Purpose |
|---|---|
list_conversations |
Browse with filters (project, keywords, files) |
get_conversation |
Get full conversation content |
search_conversations |
Multi-keyword and pattern search |
get_conversation_analytics |
Usage 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:
インストール
npx -y --package=cursor-chat-history-mcp cursor-chat-history-mcp設定
{
"mcpServers": {
"cursor-chat-history": {
"command": "npx",
"args": ["-y", "--package=cursor-chat-history-mcp", "cursor-chat-history-mcp"]
}
}
}