Cursor Chat History MCP

Cursor Chat History MCP

cursor-chat-history•byvltansky

An MCP server that links Cursor conversations to git commits and lets an AI assistant search chat history and retrieve context.

License: MIT•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Links conversations to git commits automatically using file overlap and recency, and installs git post-commit and Cursor hooks on first use.
  • •Provides tools to find conversations linked to files and commits, list and search conversations, and get conversation analytics.
  • •Runs locally with no external services or API keys, using on-disk SQLite databases.

BEST FOR

  • •Recovering the reasoning and discussions behind a particular commit or file.
  • •Searching chat history for debugging sessions and coding patterns.

ABOUT CURSOR-CHAT-HISTORY

Cursor Chat History MCP is cataloged as an MCP server attributed to vltansky. An MCP server that links Cursor conversations to git commits and lets an AI assistant search chat history and retrieve context. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

Capability inspector

Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.

Tools (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Resources (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

Prompts (0)

No reviewed records to display. This does not establish that upstream lacks this capability.

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Cursor Chat History MCP are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Does this send conversation data to any external service?

No; it runs entirely locally without external services or API keys and keeps data in on-disk SQLite databases.

How does it decide which conversations relate to a commit?

It weighs file overlap at 70 percent and recency at 30 percent, using conversations from the last 14 days.

Can I link a conversation to a commit manually?

Yes, the link_conversation_commit tool manually links a conversation to a commit, with an optional confidence value.

Upstream README

View this exact version on GitHub

README.md · e15492520e0e · Fetched 2026-11-13 08:50:48 UTC

Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.

Showing the last retrieved documentation snapshot; check the source for current changes.

Cursor Chat History MCP

Connect your Cursor conversations to your git history.

Cursor Conversations Server MCP server

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

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

# 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

Core Tools Parameters

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']
Git Linker Tools Parameters

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

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

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Cursor Chat History MCP from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/cursor-chat-history)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

Downloads and pulls

Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.

No reviewed package or image identity; download statistics are not listed yet.

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools