The Cursor Conversations MCP Server enables AI assistants to locally access and analyze your Cursor chat history for personalized coding insights.
Access & Search: Browse conversations with filtering options, perform text-based searches, and discover related discussions based on files, folders, or languages.
Analyze & Extract: Generate analytics on usage patterns, extract code blocks, languages, and file references to identify recurring solutions and best practices.
Generate Content: Create personalized coding standards, project-specific documentation, and technical guides based on your actual development discussions.
Export & Visualize: Export chat data in JSON, CSV, or Graph formats for external analysis and visualization.
Privacy-Focused: Operates entirely locally without sending data to external services, ensuring your data remains private and under your control.
Supports accessing Cursor conversation data stored on Linux systems through the auto-detected database path.
Supports accessing Cursor conversation data stored on macOS systems through the auto-detected database path.
Enables analysis of React-specific conversations and code patterns to generate component guidelines and best practices.
Uses SQLite to access Cursor's conversation database for retrieving and analyzing development history.
Allows extraction of TypeScript coding standards and interface discussions from conversation history to create personalized guidelines.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Cursor Conversations MCP Serveranalyze my recent React conversations and suggest component patterns"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Related MCP server: AI Development Assistant MCP Server
Quick Start
Add to .cursor/mcp.json:
That's it. Hooks install automatically on first use.
What You Can Do
Find Context for Code
Search Your Chat History
Extract Patterns
Available Tools
Git Linker
Tool | Purpose |
| Get conversations and commits related to a file |
| Find conversations linked to a commit |
| Find commits linked to a conversation |
| Manually link conversation ↔ commit |
Chat History
Tool | Purpose |
| Browse with filters (project, keywords, files) |
| Get full conversation content |
| Multi-keyword and pattern search |
| 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 endsGit 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:
Use
get_file_contextwithkeywordsto find relevant conversationsCall
get_conversation- writes to~/.cursor-chat-history/context/conversations/<id>.mdUse Read/Grep tools to navigate the markdown file efficiently
CLI Commands
Database Locations
Database | macOS | Windows | Linux |
Cursor chats |
|
|
|
Git links |
|
|
|
Context files |
| same | same |
Override with CURSOR_DB_PATH or CURSOR_LINKS_DB_PATH.
Tool Reference
list_conversations
limit(default: 10) - Number of resultsprojectPath- Filter by projectkeywords- Search keywordshasCodeBlocks- Filter by code presence
get_conversation
conversationId(required) - Conversation IDsummaryOnly- Return summary only (saves context)
search_conversations
query- Text searchkeywords+keywordOperator('AND'/'OR') - Multi-keywordlikePattern- SQL LIKE patterns
get_conversation_analytics
scope- 'all', 'recent', 'project'projectPath- Filter by projectincludeBreakdowns- ['files', 'languages', 'temporal', 'size']
get_file_context
filePath(required) - File to get context forkeywords- Filter by keywords (e.g.,["JWT", "auth"]) - returns matching excerptslimit- Max results (default: 5)
list_conversation_commits
conversationId- Filter by conversationprojectPath- Filter by projectfilePath- Filter by file
get_commit_conversations
commitHash(required) - Git commit hash
link_conversation_commit
conversationId(required)commitHash(required)confidence- Link confidence (0-1)
Development
Supported AI Assistants
Assistant | Status | Notes |
Cursor | ✅ Full | Chat, Composer, Agent modes |
Claude Code | ✅ Full | VS Code extension |
Cline/Roo/Kilo | ✅ Full | JSON task-based storage |
Windsurf | ✅ Full | SQLite (same pattern as Cursor) |
GitHub Copilot Chat | ✅ Full | VS 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