Cursor History MCP

Best MCP server for browsing, searching, backup, and exporting Cursor AI chat history.

Cursor History MCP

๐Ÿ‡จ๐Ÿ‡ณ ไธญๆ–‡ๆ–‡ๆกฃ | ๐Ÿ‡ซ๐Ÿ‡ท Franรงais | ๐Ÿ‡ช๐Ÿ‡ธ Espaรฑol

npm version npm downloads License: MIT Node.js TypeScript

Install MCP Server

MCP server for browsing, searching, exporting, and backing up your Cursor AI chat history.

Bring your Cursor AI chat history directly into Claude. Search past conversations, export sessions, create backups, and generate year-in-review reportsโ€”all through natural language. Built on the Model Context Protocol for seamless AI assistant integration.

Free, open-source, and MIT licensed. Built by the community, for the community.

Why This Project?

There are other Cursor history tools out there (like the Python-based Cursor-history-MCP). Here's what makes this one different:

Featurecursor-history-mcp (this project)Other Solutions
๐Ÿ“ฆ Setupโœ… npx cursor-history-mcp - zero installโŒ Docker, Python, dependencies
โšก Speedโœ… Instant - direct SQLite readsโŒ Slow - requires LLM vectorization
๐Ÿ” Searchโœ… Grep-style text matching - precise & stableโŒ Vector retrieval - unpredictable results
๐Ÿค– LLM Requiredโœ… No - works offlineโŒ Yes - needs Ollama/embeddings
๐Ÿ› ๏ธ Languageโœ… TypeScript (type-safe)โš ๏ธ Python
๐Ÿ’พ Backup/Restoreโœ… Built-inโŒ Not available
๐Ÿšš Migrationโœ… Move sessions between workspacesโŒ Not available
๐Ÿ“‹ Dependenciesโœ… Minimal (just Node.js)โŒ Docker, LanceDB, Ollama, FastAPI

Key Advantages

  • Blazing Fast: No embedding or vectorization step. Reads directly from Cursor's native SQLite database, so results are instant.
  • Grep-Style Search: Uses direct text matching instead of vector retrieval. More lightweight, predictable, and stable for most use casesโ€”no hallucinated results, no embedding drift, and exact matches every time.
  • Zero Configuration: Run with npx - no Docker containers, no Python environments, no API keys, no LLM setup.
  • Works Offline: Everything runs locally without any external services or AI models.
  • Data Portability: Full backup, restore, and cross-workspace migration capabilities to keep your chat history safe and portable.
  • Lightweight: ~50KB package vs multi-GB Docker images with vector databases.

Installation

No installation required! Run directly via npx:

npx cursor-history-mcp

Configuration

Cursor

cursor-mcp-setup

Claude Code

Add to your Claude Code MCP settings:

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

Claude Desktop

Add to your Claude Desktop configuration (~/.claude/claude_desktop_config.json):

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

Available Tools

ToolDescription
cursor_history_listList chat sessions with metadata
cursor_history_showView full conversation content
cursor_history_searchSearch across all sessions
cursor_history_exportExport session to Markdown or JSON
cursor_history_backupCreate backup of all history
cursor_history_restoreRestore from backup (destructive)
cursor_history_migrateMove/copy sessions between workspaces (destructive)
cursor_history_year_packGenerate year-in-review data package with stats, topics, and prompt template

๐ŸŽ† Year in Review

Generate a personalized annual report from your Cursor AI chat history โ€” discover your coding patterns, favorite topics, and development journey.

What You Get

๐Ÿ“Š Chat StatsTotal questions, active months, monthly activity
๐Ÿท๏ธ Topic DiscoveryAuto-detected coding topics and interests
๐Ÿ“ˆ Trend TrackingHow your focus shifted throughout the year
๐Ÿ”‘ KeywordsYour most-used terms and phrases
๐Ÿ”’ Privacy SafeSensitive data automatically masked
๐Ÿ“ LLM PromptReady-to-use prompt for a polished report

Try It

  • "Generate my 2025 Cursor year in review"
  • "Create a year pack for ~/myapp"
  • "Generate my 2025 year in review in English"

Usage Examples

After configuring, ask your AI assistant:

  • "List my Cursor chat sessions"
  • "Show me session #1"
  • "Search my Cursor history for 'authentication'"
  • "Export session #1 as markdown"
  • "Backup my Cursor chat history"

Requirements

  • Node.js 20+
  • Cursor IDE installed with existing chat history

Contributing

Contributions are welcome! Whether it's bug reports, feature requests, documentation improvements, or code contributionsโ€”all PRs and issues are appreciated.

License

MIT

Related Servers