VC

vltansky/cursor-chat-history-mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

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:

Открыть полный README на GitHub

Установка

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"] } } }