home / mcp / cursor chat history mcp server

Cursor Chat History MCP Server

Provides access to Cursor chat history data for AI assistants to read, analyze, and extract insights.

Installation
Add the following to your MCP client configuration file.

Configuration

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

You enable your AI assistants to access and analyze your Cursor chat history by running a small MCP (Model Context Protocol) server locally. This lets AI tools read your conversations to learn your coding patterns, generate project-specific rules, extract past solutions, and export data for analysis, all while keeping control on your machine.

How to use

Configure your MCP client to connect to the Cursor chat history MCP server, then start asking your AI assistant to analyze conversations and generate guidelines. You can request insights like pattern-based coding standards, project-specific rules, or summaries of debugging sessions. Use it to extract best practices from your chat history and to create documentation derived from real conversations about your code.

How to install

Prerequisites: install Node.js and npm so you can run npm, npx, or other package commands as needed.

1. Create or update your MCP configuration to include the Cursor chat history MCP server. Add the following to your .cursor/mcp.json file:

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

Additional configuration and usage notes

Starting to use the MCP is straightforward once the server configuration is in place. You can prompt your AI assistant with requests like analyzing React conversations to create component guidelines, finding debugging patterns in your chat history, generating TypeScript coding standards from your usage, or identifying main themes in recent coding discussions.

No external services or API keys are needed. The MCP runs locally and accesses your Cursor database directly, so you retain full control over what data is accessed and when.

Security and data handling

This MCP configuration runs entirely on your machine. Your chat data is not sent to external servers, and you control when and what data is accessed by the MCP tools.

Available tools

list_conversations

Browse conversations with filtering options and optional project relevance scoring.

get_conversation

Retrieve full conversation content with code and file references.

search_conversations

Enhanced search with multi-keyword, LIKE patterns, and text search.

get_conversation_analytics

Comprehensive analytics including usage patterns, file activity, programming language distribution, and temporal trends.

find_related_conversations

Find conversations related by shared files, folders, languages, size, or temporal proximity.

extract_conversation_elements

Extract files, code blocks, languages, metadata, and conversation structure with flexible grouping.

export_conversation_data

Export chat data in JSON, CSV, or Graph formats for external analysis and visualization.