How to Search Cursor Chat History Across Workspaces A developer has released cursor-history, a command-line tool that searches Cursor chat history across workspaces by reading local data stores without requiring an API key or capture hooks. The tool supports text-based search, session listing, and JSON export, and can be used interactively or via an MCP companion for AI assistants. Originally published on Extracurricular AI https://extracurricular.ai/en/blog/search-cursor-chat-history/ . You remember fixing the authentication bug. You cannot remember which project contained the conversation. cursor-history searches conversation text in supported local Cursor stores across discovered workspaces. It can read history created before you installed it, without a capture hook, embeddings, or an API key. npm install -g cursor-history cursor-history list --all cursor-history search "connection pool" Run this on the machine where the history is stored, using Node.js 20.x or 22.x–26.x. The CLI searches parsed message content using case-insensitive text matching. It does not semantically infer that “database saturation” means “connection pool.” Try a distinctive substring if a broad query returns too much: cursor-history search "ECONNRESET" -n 30 cursor-history search "oauth callback" cursor-history search "refreshToken" Search returns up to 10 matching sessions by default. -n 30 raises the limit; -n 0 returns all matching sessions. list --all removes the listing limit; it is not a switch that enables global search. Search covers discovered workspaces by default unless you select a workspace. For interactive use, copy the session index displayed in the result. If it is 12 : cursor-history show 12 cursor-history export 12 The number refers to the underlying session list within the same data roots and workspace scope. It is not the search result's ordinal position. New sessions can also change list indices, so use exact UUIDs for saved commands. With jq installed, retrieve those UUIDs directly: cursor-history search "authentication" --json | jq -r '.results .sessionId' Copy a returned ID into these commands, replacing the placeholder: session id='PASTE RETURNED SESSION UUID' cursor-history show "$session id" cursor-history export "$session id" --format json --output ./conversation.json The JSON export contains the available session representation. It may include source details and inferred timestamps; it is not proof of a complete original conversation. Keep the same scope on the follow-up read: cursor-history --workspace /absolute/path/to/project search "authentication" cursor-history --workspace /absolute/path/to/project show 1 Here 1 means session 1 in that workspace's list. Do not reuse a global index in a workspace-scoped read. A workspace filter also limits which conversation sources may be opened; it is more than a display filter. | Check | Why it matters | |---|---| | Try a shorter phrase or exact error token | Text search does not paraphrase the query | | Run cursor-history list --all --json | Inspect discovered sessions and any diagnostics | | Check which machine and user account owns the files | Local search does not fetch SSH, cloud, or another user's history | | Check custom roots or WSL paths | Composer data and ~/.cursor can live in different environments | | Review source status | Missing, partial, or ambiguous sources can affect what is searchable | For an explicit environment, set both roots to the intended directories: CURSOR DATA PATH='/absolute/path/to/Cursor/User/workspaceStorage' CURSOR STORE ROOT='/absolute/path/to/.cursor' cursor-history search "authentication" The platform guide https://github.com/S2thend/cursor-history where-cursor-stores-data explains these selectors. An empty result means no match was returned from the readable selected sources; it does not prove that a chat was deleted. To continue an Agent CLI conversation, start with Cursor's native session commands https://cursor.com/docs/cli/reference/parameters . This workflow is useful when you need to locate text across local conversations and then inspect or export the result. The MCP companion https://github.com/S2thend/cursor-history-mcp quick-start can let an assistant perform the search. As checked on September 8, 2026, MCP 0.3.1 uses reader 0.18.0. The packages release independently, so update the MCP package when upgrading the server. If the search finds something useful, keep cursor-history on GitHub https://github.com/S2thend/cursor-history . For moved projects, continue with the recovery guide https://extracurricular.ai/en/blog/recover-moved-cursor-project-chats/ . Implementation references: search traversal https://github.com/S2thend/cursor-history/blob/3558ed86842d0beec8660abbb955ec9910720bc1/src/core/storage.ts , text matcher https://github.com/S2thend/cursor-history/blob/3558ed86842d0beec8660abbb955ec9910720bc1/src/core/parser.ts , CLI JSON formatter https://github.com/S2thend/cursor-history/blob/3558ed86842d0beec8660abbb955ec9910720bc1/src/cli/formatters/json.ts .