VC

vltansky/cursor-chat-history-mcp

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

33 stars 11 forks 품질 73 트렌드 11MIT

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

개요

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. That's it. Hooks install automatically on first use. - - No external services, no API keys - - SQLite databases only - - Audit the code yourself Hooks are installed automatically when the MCP server starts: - (~/.cursor/hooks.json) - capture file edits and session ends - (current repo) - link commits to conversations When you commit, the system finds related conversations using: - : Commits touching files discussed in conversations - : Conversations from the last 14 days Large conversations aren't loaded directly into context. Instead: 1.

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:

GitHub에서 전체 README 보기

설치

npx -y --package=cursor-chat-history-mcp cursor-chat-history-mcp
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →

설정

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