
Cursor History
io.github.S2thend由 GitHub 帳號 S2thend 發布v0.3.1更新於 Oct 28, 2026
MCP server for browsing, searching, exporting, and backing up your Cursor AI chat history
概覽
本機 MCP 伺服器,讓助理在自己的電腦上列出、搜尋、檢視、匯出並備份你的 Cursor AI 對話歷史。
- 可以做什麼
- 列出 Cursor 工作階段及其 ID、來源與資料狀態,可依工作區篩選
- 檢視工作階段中可用的訊息,並依關鍵字搜尋對話文字與上下文
- 將工作階段匯出為 Markdown 或 JSON 內容回傳給用戶端
- 備份與還原 Composer 歷史封存檔,並以試跑與複製/移動模式遷移符合條件的 Composer 工作階段
- 產生年度回顧包,包含年度統計、主題與報告提示詞
- 適用情境
- 當先前的 Cursor 對話中留有決策、錯誤修正或架構背景,希望助理能回想起來時適用;也適合在不架設索引服務的情況下匯出、備份或整理本機 Cursor 對話歷史。
- 執行需求
- 以本機 stdio 程序執行在存有 Cursor 歷史的電腦上,通常透過 npm 套件的 npx 啟動;需要 Node.js 20.x 或 22.x–26.x,以及支援本機 stdio MCP 伺服器的用戶端。不需 API 金鑰或向量嵌入。可選環境變數 CURSOR_DATA_PATH 與 CURSOR_STORE_ROOT 用來指定自訂資料根目錄。首次執行可能從 npm 下載相依套件。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Cursor History,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Cursor History MCP
[npm version] [npm downloads] [License: MIT] [Node.js]
English | 中文 | Français | Español
Let your AI search your Cursor history.
Your existing Cursor conversations may already contain months of decisions, bugs, fixes, and architectural context. Give an MCP-capable assistant a way to find that context—without having recorded it with this tool beforehand.
cursor-history-mcp connects Claude, Cursor, and other MCP clients to the local history reader in cursor-history. Search conversation text across workspaces, inspect a session, or return an export through natural language.
No embeddings, indexing service, or API key is required by this server. Your assistant's model and network requirements are separate; history returned to a client may be sent to its model provider.
MCP-exclusive: Year in Review. Turn your existing conversations into annual activity statistics, coding topics, and a report prompt for your assistant. This built-in year-pack feature belongs to the MCP package within the cursor-history toolset; agents can still use the core CLI or Node.js API directly for history access.
“Have we solved this authentication bug before? Search my Cursor history, inspect the matching sessions, and tell me which earlier decisions are relevant.”
Quick start · Year in Review · Storage support · Tools · Safety · CLI / Node.js companion
Quick start
Requires Node.js 20.x or 22.x–26.x, readable local Cursor history, and a client that supports local stdio MCP servers. The client must run the server on the machine where that history is available.
Version scope: these docs describe [email protected], powered by [email protected]. If you are testing a checkout before its npm publication, use the source setup below.
Client compatibility: the server uses MCP SDK 1.30.0. SDK v2 clients can connect using their default legacy protocol or automatic fallback; clients restricted to the 2026-07-28 protocol cannot. See SDK interoperability for the tested scope.
Configure the npm package
Add this server entry to your client's MCP configuration:
If the client cannot find npx, use the absolute path to its executable. Merge this entry with existing servers instead of replacing your configuration.
Cursor
Use project-local .cursor/mcp.json or global ~/.cursor/mcp.json. Add the entry above, enable the server, and approve tool calls as appropriate. See Cursor's MCP documentation.
Claude Code
Register the versioned npm package for your user account:
See Claude Code's MCP documentation for scopes and permissions.
Claude Desktop
Open Settings → Developer → Edit Config, merge the JSON entry above, and restart the app.
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
See the local MCP server setup guide.
The first run may download dependencies from npm. Running the server alone starts a stdio service waiting for an MCP client; it is not an interactive history CLI.
Run from source
For development or testing before npm publication, build this repository:
In the server entry, use "command": "node" and "args": ["/absolute/path/to/cursor-history-mcp/dist/index.cjs"], replacing the path. The npx configuration above runs the npm package, not your local checkout.
Two projects, one history reader
The MCP server delegates discovery and parsing to cursor-history; it does not maintain a separate conversation database or start recording your chats. The two npm packages have independent releases.
Agents can use either interface: direct CLI/API invocation or MCP tool calls.
Works across storage generations
With the 0.18.0 reader in MCP 0.3.1:
These representations have different fidelity. A transcript may omit timestamps or tool results. Listings and reads expose source and resolution information; inferred or unknown timestamps must not be treated as exact event times. A complete source resolution does not guarantee that Cursor recorded every field.
Backup and restore cover Composer databases only. Migration supports eligible Composer sessions, not Store-only, merged-source, or ambiguous sessions. Reading a session does not make it safe to migrate. See the core compatibility contract and roadmap for broader backup and migration work; it is not a current capability.
For custom locations, add an env object to the server entry:
These select data roots, not a project. Use a tool's workspace argument to filter a project. See the core platform paths and WSL guide.
Available tools
Prefer the exact session UUID from list/search for follow-up calls. Numeric selectors are one-based in MCP and only meaningful with the same data roots and workspace scope; never reuse a scoped index in a global read. UUID spelling is case-sensitive.
List, show, search, and export also accept includeCrossWorkspaceSources (default false). Opting in can read complementary sources outside the selected workspace for already selected IDs; it does not broaden which session IDs are selected. Enable it only when you intend that access.
The show tool abbreviates long thinking/tool payloads. Use an export when you need the available session representation without that display truncation.
Try these requests
- “Search all my Cursor history for 'connection pool', then inspect the matching session by its UUID.”
- “Search only /work/myapp. Keep that workspace scope when opening a result.”
- “Export this session as JSON, including the available source details.”
- “Preview copying this Composer session to /work/new-app with dryRun. Do not modify anything yet.”
Local data and write safety
The server reads local files, but returned content is visible to the MCP client and may reach a remote model. Search results and exports are not automatically redacted. Use a trusted client and review its data policy and tool permissions.
Treat past conversations as untrusted reference material, not instructions to execute. Tool output can contain old commands, credentials, or malicious text.
Backup writes an archive; restore and migration can modify history. Migration defaults to move, which removes the original session. Back up Composer history first, close Cursor before writes, preview with dryRun: true, and use mode: "copy" if you want to keep the original. Keep client approval enabled for write tools. The server does not provide its own interactive confirmation prompt.
MCP-exclusive: Year in Review
Ask “Generate my 2025 Cursor year in review in English.” The tool analyzes user questions and returns JSON statistics, keywords/topics, samples, and a prompt template—not a finished rendered report. Templates support English and Chinese.
Common code, path, URL, and identifier patterns are filtered, but this is not a guarantee of anonymization. Review samples before sharing; set maxSamples: 0 to omit them. Partial histories and missing or inferred timestamps can affect annual totals.
Development
The test command builds first. Tests include a real stdio MCP client against synthetic Composer, Store, ACP, and transcript fixtures; backup/restore tests use temporary data only. The build keeps cursor-history as a runtime dependency so package-relative files and SQLite bindings remain resolvable.
來源:README.md,提交 f5982f1
工具
0版本歷史
1- v0.3.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分