cursor-history
MCP server for browsing, searching, and exporting Cursor AI chat history.
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:
-
Ensure Node.js 20+ is installed:
- Official Node.js site: https://nodejs.org/
-
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.
-
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
-
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
coplay-unity-plugin
Unity plugin for Coplay
mcp-mail
📧 MCP Mail Tool - AI-powered email management tool | 基于 MCP 的智能邮件管理工具
godot
GoPeak — The most comprehensive MCP server for Godot Engine. 95+ tools: scene management, GDScript LSP, DAP debugger, screenshot capture, input injection, ClassDB introspection, CC0 asset library. npx gopeak
vsync
Sync MCP servers, Skills, Agents & Commands across Claude Code, Cursor, OpenCode, Codex. One config, all tools.
mcp-client-gen
Turn any MCP server into a type-safe TypeScript SDK in seconds - with OAuth 2.1 and multi-provider support
github-to
Convert GitHub repositories to MCP servers automatically. Extract tools from OpenAPI, GraphQL & REST APIs for Claude Desktop, Cursor, Windsurf, Cline & VS Code. AI-powered code generation creates type-safe TypeScript/Python MCP servers. Zero config setup - just paste a repo URL. Built for AI assistants & LLM tool integration.