local-history-mcp
by xxczaki·★ 15·Score 42
MCP server providing AI access to VS Code/Cursor's Local History for data recovery.
Overview
This MCP server bridges the gap between AI assistants and editor Local History, enabling data recovery and enhanced context awareness. Unlike undo/redo, Local History captures file snapshots at save points, preserving work that would otherwise be lost. The server provides direct access to Cursor/VS Code Local History for personal use through the Model Context Protocol.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose this if you're using VS Code or Cursor and need to recover lost code versions or compare file states without leaving your AI workflow.
When NOT to choose this
Don't use this if you need history recovery for other editors, or if you're working in an environment where Local History is disabled or not supported.
Tools this server exposes
6 tools extracted from the READMElist_history_filesList all files with Local History
get_file_historyView complete history for a file
get_history_entryGet specific history entry content
restore_from_historyRestore file to previous state (with backup)
search_history_contentSearch across all history entries
get_history_statsOverview statistics
Comparable tools
Installation
Package Manager Installation
# npm
npx local-history-mcp
# pnpm
pnpm dlx local-history-mcp
# yarn
yarn global add local-history-mcp
# bun
bunx local-history-mcpClaude Desktop
Add to your Claude Desktop configuration:
{
"mcpServers": {
"local-history": {
"command": "npx",
"args": ["-y", "local-history-mcp"]
}
}
}VS Code/Cursor
Use the one-click install button or follow the official documentation to add this MCP server.
FAQ
- What is Local History?
- Local History is a feature in VS Code and Cursor that automatically saves snapshots of files when they are saved, allowing recovery of work that might be lost through accidental deletion or overwriting.
- How does this MCP server work?
- The server exposes tools that allow AI assistants to access, search, and restore file versions from the Local History database through the MCP protocol.
Compare local-history-mcp with
Last updated · Auto-generated from public README + GitHub signals.