Get the FREE Ultimate OpenClaw Setup Guide →

cursor-history

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

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio s2thend-cursor-history-mcp npx -y cursor-history-mcp

How to use

The cursor-history MCP server lets you browse, search, export, backup, and migrate your Cursor AI chat history directly from an MCP-enabled assistant. It reads Cursor's local SQLite history and exposes a set of dedicated tools you can invoke through natural language prompts. You can access sessions, view full conversations, perform grep-style searches across all chats, export sessions to Markdown or JSON, and create or restore backups. These capabilities are designed to work offline and without requiring external AI models or embeddings, making it fast and predictable for everyday use.

Available tools include cursor_history_list (list sessions with metadata), cursor_history_show (view a full conversation), cursor_history_search (search across sessions), cursor_history_export (export sessions to Markdown or JSON), cursor_history_backup (create backups of all history), cursor_history_restore (restore from backups), cursor_history_migrate (move/copy sessions between workspaces), and cursor_history_year_pack (generate a year-in-review data package with stats, topics, and a prompt template). You can invoke these tools by phrasing requests to your AI assistant, for example: "List my Cursor chat sessions", "Show session #1", or "Export session #1 as Markdown".

How to install

Prerequisites:

  • Node.js 20+ installed on the host system
  • NPM or Yarn available
  • Cursor IDE installed (for full workflow, optional but recommended)

Installation steps:

  1. Ensure Node.js 20+ is installed:

  2. Install and run the MCP server via npx (no local install required):

    • Command: npx cursor-history-mcp
    • Or, configure via an MCP manifest as shown in the mcp_config example.
  3. If you prefer to pin a version or avoid network fetch on every run, you can install locally using npm:

    • npm install -g cursor-history-mcp
    • Then run with: cursor-history-mcp
  4. Optional: integrate with Claude (or other MCP clients) by using the provided configuration snippet in your client’s mcpServers configuration, for example: { "mcpServers": { "cursor-history": { "command": "npx", "args": ["-y", "cursor-history-mcp"] } } }

Additional notes

Tips and notes:

  • The MCP server runs locally and does not require external API keys or cloud services.
  • It reads Cursor’s local SQLite database directly for fast, grep-style search results.
  • If you upgrade Node.js, ensure compatibility with the cursor-history-mcp package.
  • The available tools operate on your local environment; ensure Cursor is installed and you have access to your chat history.
  • For backup and migration features, regular backups help protect chat history during workspace changes or restorations.
  • If you encounter issues, check that npx is available and that your network can fetch the package when first run.

Related MCP Servers

Sponsor this space

Reach thousands of developers